• 进度日报18


     今天是角色管理的最后的一个模板;

    protected void jueselist(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException
        {
            req.setCharacterEncoding("utf-8");
            Userservice userservice=new Userservice();
            List<Juesebean> jueselist=userservice.jueselist();
            resp.setCharacterEncoding("utf-8");
            PrintWriter out = resp.getWriter();
            out.print(JSON.toJSONString(jueselist));
            out.flush();
            out.close();
        }
    protected void fenpeijuese(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException
        {
            req.setCharacterEncoding("utf-8");
            int userid=StringUtil.StringToInt(req.getParameter("qxuserid"));
            String qxjuese=req.getParameter("qxjuese");
            new Quanxianservice().fenpeiquan(userid,qxjuese);
            resp.setCharacterEncoding("utf-8");
            PrintWriter out = resp.getWriter();
            out.print(JSON.toJSONString("1"));
            out.flush();
            out.close();
        }
    public void fenpeiquan(int userid, String qxjuese) {
            Session session = HibernateUtils.getCurrentSession();
            Transaction tr = session.beginTransaction();
            
            try {
                new Quanxiandao().fenpeiquan(userid,qxjuese);
                tr.commit();    
            } catch (Exception e) {
                e.printStackTrace();
                tr.rollback();
            }
            
        }
  • 相关阅读:
    自定义指令directive
    angular中的表单验证
    ng-init,ng-controller,ng-model
    Redis执行lua脚本,key不存在的返回值
    消息队列对比
    数据库设计范式
    网络IO模型
    .NET 线程、线程池
    异步和多线程
    Memcache知识点
  • 原文地址:https://www.cnblogs.com/1234yyf/p/13954723.html
Copyright © 2020-2023  润新知