Package com.lgx8.right.entities

Examples of com.lgx8.right.entities.RunTimeUser


    String password = request.getParameter("password");
    String realName = request.getParameter("realName");
    String sex = request.getParameter("sex");
    String phoneNum = request.getParameter("phoneNum");
    String userName = request.getParameter("userName");
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    long _orid = 0;
    long _type = 0l;
    if(rtUser!=null){
      _type = rtUser.getUsertype();
      if(_type==2){
        Merchant _or = (Merchant)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(_or!=null){
          _orid = _or.getID();
        }
View Full Code Here


 
  @RequestMapping("/listsubcount.do")
  public ModelAndView listaddCount(HttpServletRequest request,HttpServletResponse response){
    String userName = request.getParameter("userName");
    PageArgument pageArgment = getPageInfo(request);
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    long _orid = 0;
    long _type = 0l;
    if(rtUser!=null){
      _type = rtUser.getUsertype();
      if(_type==2){
        Merchant _or = (Merchant)userOrganizationMerchantService.getOrganizationOrMerchantByUser(rtUser);
        if(_or!=null){
          _orid = _or.getID();
        }
View Full Code Here

    return null;
  }
 
  @RequestMapping("/initmerchantdmxx.do")
  public String initProuctPage(HttpServletRequest request,HttpServletResponse response) {
    RunTimeUser rt = RunTimeUser.getRunTimeUser(request);
    if(rt!=null){
      long _mid = rt.getOrganizationid();
      Merchant _m = merchantDao.getMerchantById(_mid);
      request.setAttribute("merchant", _m);
    }
    return "/management/merchant/create_merchant_dmxx";
  }
View Full Code Here

  }

  @RequestMapping("/savemerchantdmxx.do")
  public String saveProductPage(HttpServletRequest request,
      HttpServletResponse response) {
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    Merchant _m = null;
    if(rtUser!=null){
      long _mid = rtUser.getOrganizationid();
      _m = merchantDao.getMerchantById(_mid);
    }
    if(_m!=null){
      DiskFileItemFactory factory = new DiskFileItemFactory();
      factory.setSizeThreshold(102400);
View Full Code Here

    return "/management/merchant/result_merchant_dmxx";
  }
 
  @RequestMapping("/initmerchantadvertisement.do")
  public String initMerchantAdvertisement(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    if(rtUser!=null){
      long _mid = rtUser.getOrganizationid();
      Merchant _m = merchantDao.getMerchantById(_mid);
      request.setAttribute("merchant", _m);
    }
    return "/management/merchant/upload_merchantImg";
  }
View Full Code Here

    return "/management/merchant/upload_merchantImg";
  }
 
  @RequestMapping("/saveadvertisement.do")
  public String saveMerchantAdvertisement(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    Merchant _m = null;
    if(rtUser!=null){
      long _mid = rtUser.getOrganizationid();
      _m = merchantDao.getMerchantById(_mid);
    }
    if(_m!=null){
      DiskFileItemFactory factory = new DiskFileItemFactory();
      factory.setSizeThreshold(102400);
View Full Code Here

  @Resource(name="roleDao")
  IRoleDao roleDao;
 
  @RequestMapping(value="/authorize.do")
  public void authorize(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser user = RunTimeUser.getRunTimeUser(request);
    response.setContentType("text/html; charset=UTF-8");
        response.setCharacterEncoding("UTF-8");
        //获取树形结构的字符串
        String xmlStr = this.loadXML(user);
        this.printXML(response, xmlStr);
View Full Code Here

    if(yourLoveProducts!=null) {
      root.put("yourLoveProducts", yourLoveProducts);
    }
   
   
    RunTimeUser user = null;
    try {
      user = RunTimeUser.getRunTimeUser(request);
    } catch (Exception e1) {
      user = null;
    }
View Full Code Here

  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    Template temp = getConfiguration().getTemplate("messagerecord/MessageRecord.ftl");
   
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IMessageRecordDao messageRecordDao = (IMessageRecordDao) ac.getBean("messageRecordDao");
   
    String pageno = request.getParameter("pageno");
    //处理当前页
    if(pageno==null) {
      pageno = "1";
    }
    int pagenum = 1;
    try {
      pagenum = Integer.parseInt(pageno);
    } catch (Exception e1) {
      pagenum = 1;
    }
   
    String sender = request.getParameter("sender");
   
    String hql = " from MessageRecord m where 1=1 ";
   
    if(!StringUtil.isEmptyStr(sender))
    {
      hql += " and m.sender like '%"+sender+"%'";
    }
   
    if(rtUser.isMerchant() || rtUser.isOrganization())
    {
      hql += " and m.sendId = '"+rtUser.getId()+"'";
    }
   
    hql += " order by m.id desc";
   
    PageList page =  messageRecordDao.findByPage4Report(hql, new Object[]{}, pagenum, 15);
View Full Code Here

    }

    public int doEndTag() throws JspException {
        try {
          //从session中提取当前登录用户
          RunTimeUser user = RunTimeUser.getRunTimeUser(this.pageContext.getSession());
            // 若当前用户有权限则显示权限点,否则则不显示
            if (isAuthorized(user,this.getAuthorityId())) {
                this.getBodyContent().writeOut(this.pageContext.getOut());
                this.pageContext.getOut().flush();
            }
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.