Exemplo n.º 1
0
 @SecurityMapping(title = "直通车申请保存", value = "/seller/ztc_apply_save.htm*", rtype = "seller", rname = "竞价直通车", rcode = "ztc_seller", rgroup = "促销管理")
 @RequestMapping({ "/seller/ztc_apply_save.htm" })
 public ModelAndView ztc_apply_save(HttpServletRequest request, HttpServletResponse response, String goods_id,
         String ztc_price, String ztc_begin_time, String ztc_gold, String ztc_session) {
     ModelAndView mv = new JModelAndView("user/default/usercenter/success.html", this.configService.getSysConfig(),
             this.userConfigService.getUserConfig(), 0, request, response);
     if (!(this.configService.getSysConfig().isZtc_status())) {
         mv = new JModelAndView("error.html", this.configService.getSysConfig(),
                 this.userConfigService.getUserConfig(), 1, request, response);
         mv.addObject("op_title", "系统未开启直通车");
         mv.addObject("url", CommUtil.getURL(request) + "/seller/index.htm");
     } else {
         String ztc_session1 = CommUtil.null2String(request.getSession(false).getAttribute("ztc_session"));
         if ((!(ztc_session1.equals(""))) && (ztc_session1.equals(CommUtil.null2String(ztc_session)))) {
             request.getSession(false).removeAttribute("ztc_session");
             Goods goods = this.goodsService.getObjById(CommUtil.null2Long(goods_id));
             goods.setZtc_status(1);
             goods.setZtc_pay_status(1);
             goods.setZtc_begin_time(CommUtil.formatDate(ztc_begin_time));
             goods.setZtc_gold(CommUtil.null2Int(ztc_gold));
             goods.setZtc_price(CommUtil.null2Int(ztc_price));
             goods.setZtc_apply_time(new Date());
             this.goodsService.update(goods);
             mv.addObject("op_title", "直通车申请成功,等待审核");
             mv.addObject("url", CommUtil.getURL(request) + "/seller/ztc_list.htm");
         } else {
             mv = new JModelAndView("error.html", this.configService.getSysConfig(),
                     this.userConfigService.getUserConfig(), 1, request, response);
             mv.addObject("op_title", "不允许重复提交申请");
             mv.addObject("url", CommUtil.getURL(request) + "/seller/ztc_apply.htm");
         }
     }
     return mv;
 }
 @SecurityMapping(
     title = "楼层模板品牌加载",
     value = "/admin/goods_floor_brand_load.htm*",
     rtype = "admin",
     rname = "首页楼层",
     rcode = "goods_floor",
     rgroup = "商品")
 @RequestMapping("/admin/goods_floor_brand_load.htm")
 public ModelAndView goods_floor_brand_load(
     HttpServletRequest request, HttpServletResponse response, String currentPage, String name) {
   ModelAndView mv =
       new JModelAndView(
           "admin/blue/goods_floor_brand_load.html",
           configService.getSysConfig(),
           this.userConfigService.getUserConfig(),
           0,
           request,
           response);
   GoodsBrandQueryObject qo = new GoodsBrandQueryObject(currentPage, mv, "sequence", "asc");
   qo.addQuery("obj.audit", new SysMap("audit", 1), "=");
   if (!CommUtil.null2String(name).equals("")) {
     qo.addQuery("obj.name", new SysMap("name", "%" + name.trim() + "%"), "like");
   }
   IPageList pList = this.goodsBrandService.list(qo);
   CommUtil.saveIPageList2ModelAndView(
       CommUtil.getURL(request) + "/admin/goods_floor_brand_load.htm",
       "",
       "&name=" + CommUtil.null2String(name),
       pList,
       mv);
   return mv;
 }
 /**
  * GoodsFloor列表页
  *
  * @param currentPage
  * @param orderBy
  * @param orderType
  * @param request
  * @return
  */
 @SecurityMapping(
     title = "楼层分类列表",
     value = "/admin/goods_floor_list.htm*",
     rtype = "admin",
     rname = "首页楼层",
     rcode = "goods_floor",
     rgroup = "商品")
 @RequestMapping("/admin/goods_floor_list.htm")
 public ModelAndView goods_floor_list(
     HttpServletRequest request,
     HttpServletResponse response,
     String currentPage,
     String orderBy,
     String orderType) {
   ModelAndView mv =
       new JModelAndView(
           "admin/blue/goods_floor_list.html",
           configService.getSysConfig(),
           this.userConfigService.getUserConfig(),
           0,
           request,
           response);
   String url = this.configService.getSysConfig().getAddress();
   if (url == null || url.equals("")) {
     url = CommUtil.getURL(request);
   }
   String params = "";
   GoodsFloorQueryObject qo = new GoodsFloorQueryObject(currentPage, mv, "gf_sequence", "asc");
   qo.addQuery("obj.gf_level", new SysMap("gf_level", 0), "=");
   IPageList pList = this.goodsfloorService.list(qo);
   CommUtil.saveIPageList2ModelAndView(url + "/admin/goods_floor_list.htm", "", params, pList, mv);
   return mv;
 }
 @SecurityMapping(
     title = "楼层模板品牌编辑",
     value = "/admin/goods_floor_brand.htm*",
     rtype = "admin",
     rname = "首页楼层",
     rcode = "goods_floor",
     rgroup = "商品")
 @RequestMapping("/admin/goods_floor_brand.htm")
 public ModelAndView goods_floor_brand(
     HttpServletRequest request, HttpServletResponse response, String id) {
   ModelAndView mv =
       new JModelAndView(
           "admin/blue/goods_floor_brand.html",
           configService.getSysConfig(),
           this.userConfigService.getUserConfig(),
           0,
           request,
           response);
   GoodsFloor obj = this.goodsfloorService.getObjById(CommUtil.null2Long(id));
   GoodsBrandQueryObject qo = new GoodsBrandQueryObject("1", mv, "sequence", "asc");
   qo.addQuery("obj.audit", new SysMap("audit", 1), "=");
   IPageList pList = this.goodsBrandService.list(qo);
   CommUtil.saveIPageList2ModelAndView(
       CommUtil.getURL(request) + "/admin/goods_floor_brand_load.htm", "", "", pList, mv);
   mv.addObject("obj", obj);
   mv.addObject("gf_tools", this.gf_tools);
   return mv;
 }
 @SecurityMapping(
     title = "楼层模板编辑",
     value = "/admin/goods_floor_template.htm*",
     rtype = "admin",
     rname = "首页楼层",
     rcode = "goods_floor",
     rgroup = "商品")
 @RequestMapping("/admin/goods_floor_template.htm")
 public ModelAndView goods_floor_template(
     HttpServletRequest request,
     HttpServletResponse response,
     String currentPage,
     String id,
     String tab) {
   ModelAndView mv =
       new JModelAndView(
           "admin/blue/goods_floor_template.html",
           configService.getSysConfig(),
           this.userConfigService.getUserConfig(),
           0,
           request,
           response);
   GoodsFloor obj = this.goodsfloorService.getObjById(CommUtil.null2Long(id));
   mv.addObject("obj", obj);
   mv.addObject("gf_tools", this.gf_tools);
   mv.addObject("currentPage", currentPage);
   mv.addObject("tab", tab);
   mv.addObject("url", CommUtil.getURL(request));
   return mv;
 }
Exemplo n.º 6
0
 @SecurityMapping(title = "直通车申请列表", value = "/seller/ztc_apply_list.htm*", rtype = "seller", rname = "竞价直通车", rcode = "ztc_seller", rgroup = "促销管理")
 @RequestMapping({ "/seller/ztc_apply_list.htm" })
 public ModelAndView ztc_apply_list(HttpServletRequest request, HttpServletResponse response, String currentPage,
         String goods_name) {
     ModelAndView mv = new JModelAndView("user/default/usercenter/ztc_apply_list.html",
             this.configService.getSysConfig(), this.userConfigService.getUserConfig(), 0, request, response);
     if (!(this.configService.getSysConfig().isZtc_status())) {
         mv = new JModelAndView("error.html", this.configService.getSysConfig(),
                 this.userConfigService.getUserConfig(), 1, request, response);
         mv.addObject("op_title", "系统未开启直通车");
         mv.addObject("url", CommUtil.getURL(request) + "/seller/index.htm");
     } else {
         GoodsQueryObject qo = new GoodsQueryObject(currentPage, mv, "ztc_begin_time", "desc");
         qo.addQuery("obj.goods_store.user.id", new SysMap("user_id", SecurityUserHolder.getCurrentUser().getId()),
                 "=");
         qo.addQuery("obj.ztc_status", new SysMap("ztc_status", Integer.valueOf(1)), "=");
         if (!(CommUtil.null2String(goods_name).equals(""))) {
             qo.addQuery("obj.goods_name", new SysMap("goods_name", "%" + goods_name.trim() + "%"), "like");
         }
         IPageList pList = this.goodsService.list(qo);
         CommUtil.saveIPageList2ModelAndView("", "", "", pList, mv);
         mv.addObject("goods_name", goods_name);
     }
     return mv;
 }
Exemplo n.º 7
0
 /**
  * 其他应用登陆设置登陆状态 请修改此方法或都在子类复盖此方法来实现你的逻辑
  *
  * @param request
  * @param response
  * @param get
  * @throws MalformedURLException
  */
 protected void iskyshop_logout(
     HttpServletRequest request, HttpServletResponse response, Map<String, String> args) {
   String url = CommUtil.getURL(request) + "/iskyshop_logout.htm";
   try {
     response.sendRedirect(url);
   } catch (IOException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
Exemplo n.º 8
0
    @SecurityMapping(title = "直通车申请查看", value = "/seller/ztc_apply_view.htm*", rtype = "seller", rname = "竞价直通车", rcode = "ztc_seller", rgroup = "促销管理")
    @RequestMapping({ "/seller/ztc_apply_view.htm" })
    public ModelAndView ztc_apply_view(HttpServletRequest request, HttpServletResponse response, String id) {
        ModelAndView mv = new JModelAndView("user/default/usercenter/ztc_apply_view.html",
                this.configService.getSysConfig(), this.userConfigService.getUserConfig(), 0, request, response);
        if (!(this.configService.getSysConfig().isZtc_status())) {
            mv = new JModelAndView("error.html", this.configService.getSysConfig(),
                    this.userConfigService.getUserConfig(), 1, request, response);
            mv.addObject("op_title", "系统未开启直通车");
            mv.addObject("url", CommUtil.getURL(request) + "/seller/index.htm");
        } else {
            Goods obj = this.goodsService.getObjById(CommUtil.null2Long(id));

            if (obj.getGoods_store().getUser().getId().equals(SecurityUserHolder.getCurrentUser().getId())) {
                mv.addObject("obj", obj);
            } else {
                mv = new JModelAndView("error.html", this.configService.getSysConfig(),
                        this.userConfigService.getUserConfig(), 1, request, response);
                mv.addObject("op_title", "参数错误,不存在该直通车信息");
                mv.addObject("url", CommUtil.getURL(request) + "/seller/ztc_list.htm");
            }
        }
        return mv;
    }
Exemplo n.º 9
0
 @SecurityMapping(title = "直通车申请", value = "/seller/ztc_apply.htm*", rtype = "seller", rname = "竞价直通车", rcode = "ztc_seller", rgroup = "促销管理")
 @RequestMapping({ "/seller/ztc_apply.htm" })
 public ModelAndView ztc_apply(HttpServletRequest request, HttpServletResponse response) {
     ModelAndView mv = new JModelAndView("user/default/usercenter/ztc_apply.html",
             this.configService.getSysConfig(), this.userConfigService.getUserConfig(), 0, request, response);
     if (!(this.configService.getSysConfig().isZtc_status())) {
         mv = new JModelAndView("error.html", this.configService.getSysConfig(),
                 this.userConfigService.getUserConfig(), 1, request, response);
         mv.addObject("op_title", "系统未开启直通车");
         mv.addObject("url", CommUtil.getURL(request) + "/seller/index.htm");
     }
     String ztc_session = CommUtil.randomString(32);
     mv.addObject("ztc_session", ztc_session);
     request.getSession(false).setAttribute("ztc_session", ztc_session);
     User user = this.userService.getObjById(SecurityUserHolder.getCurrentUser().getId());
     mv.addObject("user", user);
     return mv;
 }
 @SecurityMapping(
     title = "楼层模板分类商品编辑",
     value = "/admin/goods_floor_list_goods_load.htm*",
     rtype = "admin",
     rname = "首页楼层",
     rcode = "goods_floor",
     rgroup = "商品")
 @RequestMapping("/admin/goods_floor_list_goods_load.htm")
 public ModelAndView goods_floor_list_goods_load(
     HttpServletRequest request,
     HttpServletResponse response,
     String currentPage,
     String gc_id,
     String goods_name) {
   ModelAndView mv =
       new JModelAndView(
           "admin/blue/goods_floor_list_goods_load.html",
           configService.getSysConfig(),
           this.userConfigService.getUserConfig(),
           0,
           request,
           response);
   GoodsQueryObject qo = new GoodsQueryObject(currentPage, mv, "addTime", "desc");
   if (!CommUtil.null2String(gc_id).equals("")) {
     Set<Long> ids = this.genericIds(this.goodsClassService.getObjById(CommUtil.null2Long(gc_id)));
     Map paras = new HashMap();
     paras.put("ids", ids);
     qo.addQuery("obj.gc.id in (:ids)", paras);
   }
   if (!CommUtil.null2String(goods_name).equals("")) {
     qo.addQuery("obj.goods_name", new SysMap("goods_name", "%" + goods_name + "%"), "like");
   }
   qo.addQuery("obj.goods_status", new SysMap("goods_status", 0), "=");
   IPageList pList = this.goodsService.list(qo);
   CommUtil.saveIPageList2ModelAndView(
       CommUtil.getURL(request) + "/admin/goods_floor_list_goods_load.htm",
       "",
       "&gc_id=" + gc_id + "&goods_name=" + goods_name,
       pList,
       mv);
   return mv;
 }
Exemplo n.º 11
0
 /**
  * 其他应用登陆设置登陆状态 请修改此方法或都在子类复盖此方法来实现你的逻辑
  *
  * @param request
  * @param response
  * @param get
  */
 protected void iskyshop_login(
     HttpServletRequest request, HttpServletResponse response, Map<String, String> args) {
   boolean admin_login =
       CommUtil.null2Boolean(
           request.getSession(false).getAttribute("admin_login")); // 判断是否管理员登录,管理员登录不需要进行重复登录处理
   if (!admin_login) {
     String userName = args.get("username");
     String password = "";
     User user = this.userService.getObjByProperty("userName", userName);
     if (user != null) {
       password = user.getPassword();
     } else {
       user = new User();
       user.setUserName(userName);
       user.setUserRole("BUYER");
       user.setAddTime(new Date());
       // user.setEmail(email);
       user.setPassword(Md5Encrypt.md5(password).toLowerCase());
       Map params = new HashMap();
       params.put("type", "BUYER");
       List<Role> roles =
           this.roleService.query("select obj from Role obj where obj.type=:type", params, -1, -1);
       user.getRoles().addAll(roles);
       if (this.configService.getSysConfig().isIntegral()) {
         user.setIntegral(this.configService.getSysConfig().getMemberRegister());
         this.userService.save(user);
         IntegralLog log = new IntegralLog();
         log.setAddTime(new Date());
         log.setContent("用户注册增加" + this.configService.getSysConfig().getMemberRegister() + "分");
         log.setIntegral(this.configService.getSysConfig().getMemberRegister());
         log.setIntegral_user(user);
         log.setType("reg");
         this.integralLogService.save(log);
       } else {
         this.userService.save(user);
       }
       // 创建用户默认相册
       Album album = new Album();
       album.setAddTime(new Date());
       album.setAlbum_default(true);
       album.setAlbum_name("默认相册");
       album.setAlbum_sequence(-10000);
       album.setUser(user);
       this.albumService.save(album);
     }
     String url =
         CommUtil.getURL(request)
             + "/iskyshop_login.htm?username="******"&password="******"&encode=true";
     try {
       response.sendRedirect(url);
     } catch (IOException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
     }
   }
 }