Package com.lgx8.right.entities

Examples of com.lgx8.right.entities.RunTimeUser


  @RequestMapping("/listczxx.do")
  public ModelAndView queryCZXX(HttpServletRequest request,HttpServletResponse response){
    String st_time = request.getParameter("cz_st");
    String ed_time = request.getParameter("cz_ed");
    PageArgument pageArgment = getPageInfo(request);
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    String hql = "";
    Object[] o = null;
    if(st_time!=null&&st_time.length()!=0){
      if(ed_time!=null&&ed_time.length()!=0){
        hql = " from Rechargehistory where czyhbh =? and czsjbh=? and czsj>=str_to_date(?,'%Y-%m-%d %H:%i:%s') and xfsj<=str_to_date(?,'%Y-%m-%d %H:%i:%s') order by czsj desc";
        o = new Object[]{rtUser.getId(),rtUser.getOrganizationid(),st_time,ed_time};
      }else{
        hql = " from Rechargehistory where czyhbh =? and czsjbh=? and czsj>=str_to_date(?,'%Y-%m-%d %H:%i:%s') order by czsj desc";
        o = new Object[]{rtUser.getId(),rtUser.getOrganizationid(),st_time};
      }
    }else{
      if(ed_time!=null&&ed_time.length()!=0){
        hql = " from Rechargehistory where czyhbh =? and czsjbh=? and czsj<=str_to_date(?,'%Y-%m-%d %H:%i:%s') order by czsj desc";
        o = new Object[]{rtUser.getId(),rtUser.getOrganizationid(),ed_time};
      }else{
        hql = " from Rechargehistory where czyhbh =? and czsjbh=? order by czsj desc";
        o = new Object[]{rtUser.getId(),rtUser.getOrganizationid()};
      }
    }
    PageList list = rechargehistoryDao.listRechargehistoryByConditions(hql, o, pageArgment);
    printJSON(response, list.toJSON());
    return null;
View Full Code Here


        model.addObject("errMsg", "用户被锁定");
        return model;
      }
     
      if (authuser != null) {
        RunTimeUser rtUser = new RunTimeUser(authuser);
        rtUser.setUserIp(request.getRemoteAddr());
        rtUser.setSessionID(request.getSession().getId());
        String sid = request.getSession().getId();
        request.getSession().removeAttribute(sid);
        //request.getSession().setAttribute(sid, rtUser);
        if (!ArrayUtil.isEmptyCollection(rtUser.getRoles())) {
          rtUser.setIsmanager(true);
        }
        if(rtUser.getUsertype()==2){
          long _mid = rtUser.getOrganizationid();
          rtUser.setMerchant(true);
        }
        if(rtUser.getUsertype()==3){
          long _mid = rtUser.getOrganizationid();
          rtUser.setOrganization(true);
        }
        // 设置当前登录时间ip 下次登录时拿上次的登录时间ip
        authuser.setLastlogin(new Date());
        authuser.setIp(request.getRemoteAddr());
        userCardService.updateUser(authuser);
       
        String url = "/page/management/member/member_welcome.jsp";
        if (rtUser.isIsmanager()) {
          url = "/page/management/common/main.jsp";
          rtUser.setUrl(url)
          request.getSession().setAttribute(sid, rtUser);
          return new ModelAndView("management/common/main");
        }
       
        //子帐号未授权提示无此帐号
        if (rtUser.getUsertype() != User.USER_TYPE_NORMAL) {
          ModelAndView model = new ModelAndView("gateway/login");
          model.addObject("username", username);
          model.addObject("errMsg", "用户名、密码错误");
          return model;
        }
       
        /*if(rtUser.isMerchant()){
          url = "/page/management/merchant/merchant_main.jsp";
          rtUser.setUrl(url); 
          request.getSession().setAttribute(sid, rtUser);
          return new ModelAndView("management/merchant/merchant_main");
        }
       
        if(rtUser.isOrganization()){
          url = "/page/management/organization/origanization_main.jsp";
          rtUser.setUrl(url); 
          request.getSession().setAttribute(sid, rtUser);
          return new ModelAndView("management/organization/origanization_main");
        }*/
        rtUser.setUrl(url)
        request.getSession().setAttribute(sid, rtUser);
        return new ModelAndView("management/member/member_welcome");
      }
      ModelAndView model = new ModelAndView("gateway/login");
      model.addObject("username", username);
View Full Code Here

   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    //创造JSON所需的Map(此处代码可使用StringBuffer拼接JSON字符串代替)
    Map<Object,Object> pageInfo = new HashMap<Object,Object>();
   
    RunTimeUser currentUser = RunTimeUser.getRunTimeUser(request);
    if(null==currentUser) {
      response.setContentType("html/txt");
      response.setCharacterEncoding("utf-8");  
          response.setHeader("Pragma", "no-cache");  
          response.setHeader("Cache-Control", "no-cache, must-revalidate");  
          response.setHeader("Pragma", "no-cache");  
          try {  
              response.getWriter().write("");  
              response.getWriter().flush();  
              response.getWriter().close();
          } catch (IOException e) {  
              e.printStackTrace();  
          }
    }
   
    String hql = " from Address a where a.user.id = " + currentUser.getId();
   
    String hidden = request.getParameter("hidden");
    //得到当前页数
    String page = request.getParameter("page");
    //得到每页显示行数
View Full Code Here

  /**
   * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    RunTimeUser currentUser = RunTimeUser.getRunTimeUser(request);
   
    String phoneOrCard = request.getParameter("phoneOrCard");
    String score = request.getParameter("score");
    String content = request.getParameter("content");
   
View Full Code Here

    MultipartHttpServletRequest request = (MultipartHttpServletRequest)req;
    String adId = request.getParameter("adId");
    String tplx = request.getParameter("tplx");
    String tpmx = request.getParameter("description");
    String layerOrder = request.getParameter("layerOrder");
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    Merchant merchant = null;
    if(rtUser!=null){
      long mid = rtUser.getOrganizationid();
      merchant = merchantDao.getMerchantById(mid);
    }
    if(merchant!=null){
      File picture = fileUpload(request,"picture",merchant);
      if(adId!=null&&isNumber(adId)){
View Full Code Here

    MultipartHttpServletRequest request = (MultipartHttpServletRequest)req;
    String adId = request.getParameter("adId");
    String merchantNo = request.getParameter("merchantNo");
    String tplx = request.getParameter("tplx");
    String tpmx = request.getParameter("description");
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    Merchant merchant = null;
    if(merchantNo!=null&&isNumber(merchantNo)){
      merchant = merchantDao.getMerchantById(Long.parseLong(merchantNo.trim()));
    }
    if(null!=merchant){
View Full Code Here

    return orderStr.trim().matches("[\\d]+");
  }
 
  @RequestMapping("/advertisement/listAdvertisement.do")
  public ModelAndView queryAdvertisement(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    String description = request.getParameter("description");
    List parameters = new ArrayList();
    String hql = "";
   
    if(rtUser.getUsertype() == User.USER_TYPE_GSYG)
    {
      hql = "from Advertisement ad where  ad.SFYX = 0 and ad.merchant.DELETEFLAG = '0' " ;
    }else if(rtUser.getUsertype()!=User.USER_TYPE_MERCHANT){
      hql = "from Advertisement ad where  ad.SFYX = 0 and ad.user.id =? ";
      parameters.add(rtUser.getId());
    }else{
      hql = "from Advertisement ad where  ad.SFYX = 0 and ad.merchant.id=? ";
      parameters.add(rtUser.getOrganizationid());
    }
    if(null!=description&&!"".equals(description.trim())){
      hql += " and ad.tpmx like ?";
      parameters.add("%"+description+"%");
    }
View Full Code Here

   * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    Map<Object,Object> pageInfo = new HashMap<Object,Object>();
   
    RunTimeUser currentUser = RunTimeUser.getRunTimeUser(request);
    if(null==currentUser) {
      response.setContentType("html/txt");
      response.setCharacterEncoding("utf-8");  
          response.setHeader("Pragma", "no-cache");  
          response.setHeader("Cache-Control", "no-cache, must-revalidate");  
          response.setHeader("Pragma", "no-cache");  
          try {  
              response.getWriter().write("");  
              response.getWriter().flush();  
              response.getWriter().close();
          } catch (IOException e) {  
              e.printStackTrace();  
          }
    }
   
    String hql = " from Custmerxf c where c.xfhy.id = " + currentUser.getId();
   
    //得到当前页数
    String page = request.getParameter("page");
    //得到每页显示行数
    String maxResult = request.getParameter("rp");
View Full Code Here

   * @param response
   * @return
   */
  @RequestMapping("/merchant/pageQuery.do")
  public ModelAndView pageQuery(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    String sjmc = request.getParameter("SJMC");
    String sjbh = request.getParameter("SJGSZCBH");
    String sjdlzh = request.getParameter("SJFRDBUN");
    String fzr = request.getParameter("SJFRDBTN");
    String tgzx = request.getParameter("ORG");
    long _orid = 0;
    long _type = 0;
    if(rtUser!=null){
      _type = rtUser.getUsertype();
      if( _type == 4 || _type == 5){
        Organization _or = (Organization)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(_or!=null){
          _orid = _or.getID();
        }
View Full Code Here

   * @param response
   * @return
   */
  @RequestMapping("/merchant/saveMerchant.do")
  public ModelAndView saveMerchant(HttpServletRequest request,HttpServletResponse response) {
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    String SJID = request.getParameter("SJID");//商家id
    String posturl = request.getParameter("posturl");//商家自助修改资料
    String SJMC = request.getParameter("SJMC");//商家名称
    String SJLX = request.getParameter("SJLX");//商家类型
    String SJDZ = request.getParameter("SJDZ");//商家地址
View Full Code Here

TOP

Related Classes of com.lgx8.right.entities.RunTimeUser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.