Java版本新零售小程序saas商城全开源系统

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

文章目录


🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈
 
🍂个人博客首页 KJ.JK
 
欢迎大家点赞👍收藏💖评论💬关注🔒
 
💖源码获取 | 💻学习交流 | 🤝商务合作 | 💨私信作者


一、项目介绍

今天为大家带来的是weiit-saas这款Java开源项目属于weiit团队自研产品该系统意在通过技术封装让企业无需代码开发帮助企业一键生成小程序、公众号让企业拥有独立品牌的自营商城weiit-saas是完全开源电商SaaS系统属于weiit开源的社区版旧版已不在维护和更新仅供学习和参考新版saas从底层架构到前后端UI设计已经全面优化和升级


二、技术栈以及项目特点


⭐新版saas技术栈使用⭐

  • SpringCloud + Oauth2.0 + ShiroRedis + JWT + Gateway + Nacos + Nginx + Vue
     

⭐项目特点⭐

  • 项目采用Spring+SpringMVC+Mybatis主流开源框架遵循MVC架构设计轻巧使用简单开发人员接手与二次开发简单易懂
  • 项目完成了对阿里云、腾讯云、微信生态的快速接入与代码示例并成功运用到了商业中方便大家学习对OSS/COS/短信服务/快递服务/公众号/小程序/微信开放平台/微信支付的技术点与应用场景的学习
  • 小程序与公众号第三方授权集成让开发者与企业省去繁琐的配置对AppId/AppSecret集成彻底告别
  • 微信支付第三方授权集成让开发者与企业省去繁琐的配置让企业服务成本大大降低
  • 小程序代码自动push与升级公众号基本常规功能自定义菜单、图文、素材群发全部接管让企业无需登录微信官方入口统一化管理企业信息与数据
  • 微信消息通知与模板自动同步与管理让企业场景融合无障碍
  • 自定义装修功能实现企业电商场景多元化解决不同行业不同模板让企业需求得到真正解决
  • 丰富的营销工具解决企业微营销需求并集中化管理。拼团活动、积分活动、砍价优惠券卡券礼品卡邀请有礼等营销活动方便二次开发
  • 不同企业数据隔离真正实现SAAS数据隔离模型让企业数据互不干扰
  • 不同企业不同域名自动分配让企业小程序、公众号前端隔离避免因为公众号或者小程序推广时导致域名被检测导致的封号问题出现即不同企业不同域意在防止saas平台中的企业受到其他企业的影响

三、系统设计


SAAS微信小程序电商系统系统的主要功能模块包括 概况模块店铺管理模块商品模块订单管理模块客户管理模块数据模块营销模块设置模块


          1概况模块 可以看到具体各个功能的具体信息


          2商品模块 该模块包含微页面全店风格底部菜单底部导航


          3店铺模块 该模块包含出售中的商品、库存紧张商品、仓库商品、商品标签、商品分组、商品导入


          4订单管理模块 该模块包含所有订单、维权订单、加星订单、订单设置


          5客户模块 该模块包含会员管理、会员卡管理、标签组管理、会员提现、会员设置


          6数据模块 该模块包含综合统计、店铺的概况、订单的概况、客户的分析


          7营销模块 该模块包含常规营销、人口设置


          8设置模块 该模块包含店铺设置、服务协议、支付交易、物流配送、修改密码


          9系统架构图

在这里插入图片描述


在这里插入图片描述


四、系统功能演示


🚩店铺功能演示图


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


🚩商品功能演示图


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


🚩订单功能演示图


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


🚩客户功能演示图


请添加图片描述


请添加图片描述


请添加图片描述


🚩数据功能演示图


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


🚩营销功能演示图


请添加图片描述


🚩设置功能演示图


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


请添加图片描述


五、系统源代码

/**
 * 砍价 活动
 * @company http://www.wei-it.com
 */
@Controller
@RequestMapping(value = "/ump/bargain")
public class BargainController extends AdminController {

    public static Logger logger = Logger.getLogger(BargainController.class);

    @Resource
    private BargainService bargainService;

    @Resource
    ProductService productService;


    /**
     * 砍价活动 列表
     */
    @RequestMapping("/bargainList")
    public UIview bargainList() throws Exception {
        logger.info("进入 bargainController-list,砍价活动列表");
        //获取请求参数
        FormMap formMap = getFormMap();
        //开启分页
        PageHelper.startPage(formMap.getPage(), formMap.getRows());
        //查询展示数量
        List<E> list = bargainService.selectList(formMap);

        //返回到list页面
        UIview result = UIView("/center/ump/bargain/bargainList", false);
        //绑定分页返回
        result.addObject("pageInfo", new PageInfo<E>(list));
        //绑定上一次参数
        result.addObject("queryParam", formMap);
        return result;
    }

    /**
     * 砍价活动 新增
     */
    @RequestMapping("/add")
    public UIview add() throws Exception {

        UIview result = UIView("/center/ump/bargain/bargainCreate", false);

        this.getRequest().setAttribute("title", "砍价活动新增");

        return result;
    }



    /**
     * 砍价活动 编辑
     */
    @RequestMapping("/edit")
    public UIview edit() throws Exception {

        FormMap formMap = getFormMap();

        E infoMap = bargainService.selectOne(formMap);
        formMap.put("item_id",infoMap.get("item_id"));
        E itemInfo = productService.getItemById(formMap);


        String specString ="";
        if (itemInfo!=null && itemInfo.get("spec_custom")!=null){
            formMap.put("specIds", itemInfo.getStr("spec_custom").split(";"));
            List<E> specList = productService.getSpecCustomByIds(formMap);

            for(E spec :specList){
                specString+=spec.getStr("key_name")+";";
            }
        }
        specString=specString==""?infoMap.getStr("product_name"):specString;

        infoMap.put("skuName",specString);
        UIview result = UIView("/center/ump/bargain/bargainCreate", false);

        this.getRequest().setAttribute("infoMap", infoMap);

        this.getRequest().setAttribute("title", "砍价活动编辑");

        return result;
    }

    /**
     * 砍价活动 保存
     */
    @RequestMapping("/save")
    public UIview save() throws Exception {

        FormMap param = getFormMap();
        if (param.get("validate_id") == null || param.get("validate_id").equals("")) {

            //根据生效时间判断是否现在生效
            if (System.currentTimeMillis()> DateUtil.getTimeByString(param.getStr("start_time"),"yyyy/MM/dd HH:mm:ss")){
                param.put("state", 0);
            }else {
                //未开始状态
                param.put("state", -2);
            }

            bargainService.insert(param);
        } else {
            param.set("eivt", null);
            //失效后再编辑
            if (System.currentTimeMillis()> DateUtil.getTimeByString(param.getStr("start_time"),"yyyy/MM/dd HH:mm:ss") && System.currentTimeMillis()<DateUtil.getTimeByString(param.getStr("end_time"),"yyyy/MM/dd HH:mm:ss")){
                param.put("state", 0);
            }else if (System.currentTimeMillis()<DateUtil.getTimeByString(param.getStr("start_time"),"yyyy/MM/dd HH:mm:ss")){
                param.put("state", -2);
            }

            bargainService.edit(param);
        }
        UIview result = UIView("redirect:bargainList", false);

        return result;
    }

    /**
     * 砍价活动 状态修改
     */
    @RequestMapping("/status")
    public UIview status() throws Exception {

        FormMap formMap = getFormMap();

        formMap.set("eivt", "state");

        bargainService.edit(formMap);

        UIview result = UIView("redirect:bargainList", false);

        return result;
    }

    /**
     * 秒杀活动 删除
     */
    @RequestMapping("/remove")
    public UIview remove() throws Exception {

        FormMap map = getFormMap();

        bargainService.remove(map);

        UIview result = UIView("redirect:bargainList", false);

        return result;
    }

    /**
     * 砍价活动记录列表
     */
    @RequestMapping("/bargainDetailList")
    public UIview bargainOrderList() throws Exception {
        logger.info("进入 bargainController-bargainOrderList,满减送活动列表");
        //获取请求参数
        FormMap formMap = getFormMap();
        //开启分页
        PageHelper.startPage(formMap.getPage(), formMap.getRows());
        //查询展示数量
        List<E> list = bargainService.selectBargainDetailList(formMap);
        //返回到list页面
        UIview result = UIView("/center/ump/bargain/bargainDetailList", false);
        //绑定分页返回
        result.addObject("pageInfo", new PageInfo<E>(list));
        //绑定上一次参数
        result.addObject("queryParam", formMap);
        return result;
    }

    /**
     * 砍价活动 列表
     */
    @RequestMapping("/bargainNancyList")
    public UIview bargainNancyList() throws Exception {
        logger.info("进入 bargainController-bargainOrderList,砍价活动列表");
        //获取请求参数
        FormMap formMap = getFormMap();
        //开启分页
        PageHelper.startPage(formMap.getPage(), formMap.getRows());
        //查询展示数量
        List<E> list = bargainService.selectBargainNancyList(formMap);
        //返回到list页面
        UIview result = UIView("/center/ump/bargain/bargainNancyList", false);
        //绑定分页返回
        result.addObject("pageInfo", new PageInfo<E>(list));
        //绑定上一次参数
        result.addObject("queryParam", formMap);
        return result;
    }


    /**
     * 查询商品列表
     */
    @ResponseBody
    @RequestMapping("/productList.json")
    public String productList() throws Exception {
        logger.info("进入seckillController-productList,查询商品");
        try {
            FormMap formMap = getFormMap();
            formMap.set("product_name", new String(formMap.getStr("product_name").getBytes("ISO-8859-1")));
            List<E> productList = bargainService.selectProductList(formMap);
            List<E> productJson = new ArrayList<E>();
            for (E e : productList) {
                E productinfo = new E();
                productinfo.set("product_name", "<img src='" + WeiitUtil.getFileDomain() + e.getStr("product_img") + "' width='60px' height='60px'/>" + e.getStr("product_name"));
                productinfo.set("sale_price", e.getStr("sale_price"));
                productinfo.set("stock", e.getStr("stock"));
                if (StringUtils.isEmpty(e.getStr("state"))) {
                    productinfo.set("option", "<a href='javascript:;'   title='选取' class='btn bg-green m-r-5 m-b-5 able_product_" + e.getStr("product_id") + "' style='height: 22px;padding-top: 0px;' οnclick='selectProduct(" + e.getStr("product_id") + ")' price='" + e.getStr("sale_price") + "'spec_config='" + e.getStr("spec_config") + "'>选取</a>");
                } else {
                    productinfo.set("option", "<a href='javascript:;' class='btn bg-grey m-r-5 m-b-5' style='height: 22px;padding-top: 0px;'>已参加</a>");
                }
                productJson.add(productinfo);
            }
            return toJsonAPI(productJson);
        } catch (Exception e) {
            e.printStackTrace();
            throw new Exception("出错啦...");
        }
    }

    /**
     * 选择多规格商品  规格、价格、库存、操作
     * produce_id
     */
    @ResponseBody
    @RequestMapping("/skuList.json")
    public String skuList() throws Exception {
        logger.info("BargainController-skuList,选择多规格商品");
        FormMap formMap = getFormMap();
        formMap.put("is_deleted", 0);
        formMap.put("is_disabled", 0);
        List<E> list = productService.selectItemList(formMap);

        E productInfo = productService.selectById(formMap);

        List<E> productJson = new ArrayList<E>();
        for (E e : list) {
            E productinfo = new E();
            formMap.put("specIds", e.getStr("spec_custom").split(";"));
            List<E> specList = productService.getSpecCustomByIds(formMap);
            String specString ="";
            for(E spec :specList){
                specString+=spec.getStr("key_name")+";";
            }
            specString=specString==""?productInfo.getStr("product_name"):specString;
            productinfo.set("specDesc",specString);
            productinfo.set("sale_price", e.getStr("sale_price"));
            productinfo.set("stock", e.getStr("stock"));
            productinfo.set("option", "<a href='javascript:;'   title='选取' class='btn bg-green m-r-5 m-b-5 able_item_" + e.getStr("item_id") + "' style='height: 22px;padding-top: 0px;' οnclick='selectItem(" + e.getStr("item_id") + ")' specDesc='" + specString + "'  product_id='" + e.getStr("product_id") + "' product_img='" + WeiitUtil.getFileDomain()+productInfo.getStr("product_img") + "' stock='" + e.getStr("stock") + "' price='" + e.getStr("sale_price") + "'>选取</a>");

            productJson.add(productinfo);

        }
        return toJsonAPI(productJson);
    }


    /**
     * 微页面(活动页) 根据bargain_ids 获取砍价商品活动列表
     */
    @ResponseBody
    @RequestMapping("/getProductByBargainIds")
    public String getProductByBargainIds(@RequestParam String token,String bargain_ids,Integer bargainGetType) throws Exception {
        logger.info("进入 bargainController-getProductByBargainIds,微页面根据bargain_ids 获取砍价商品活动列表");
        FormMap formMap = new FormMap();
        try {
            formMap.put("shop_id", DesUtil.decrypt(token));
        } catch (Exception e) {
            e.printStackTrace();
            logger.error("token 解密失败");
            return "";
        }
        if (!StringUtils.isEmpty(bargain_ids)&& bargainGetType==0) {
            formMap.put("bargain_ids", StringUtils.strip(bargain_ids, "[]").split(","));
        }
		formMap.put("end_time",new Date());
        List<E> BargainList = bargainService.getProductByBargainIds(formMap);
        return toJsonAPI(BargainList);
    }


}

/**
 * 营销管理-》优惠券
 * @company http://www.wei-it.com 微邦互联
 */
@Controller
@RequestMapping(value = "/ump/coupons")
public class CouponsController extends AdminController {

	public static Logger logger= Logger.getLogger(CouponsController.class);

	@Resource
	private CouponService couponService;

	@Resource
	ParameterService parameterService;

	@Resource
	WeixinOpenService weixinOpenService;
	  
	/**
	 * 优惠券》优惠券列表
	 */
	@RequestMapping("/couponsList")
	public UIview couponsList(){
		logger.info("进入CouponsController-couponsList,优惠券列表展示");
		
		UIview view = UIView("/center/ump/coupons/couponsList",false);
    	FormMap formMap=getFormMap();
    	PageHelper.startPage(formMap.getPage(), formMap.getRows());
    	List<E> list=couponService.selectList(formMap);
       
    	view.addObject("pageInfo", new PageInfo<E>(list));
    	view.addObject("queryParam", formMap);
		return view;
	}
	
    /**
     * 优惠券》优惠券创建
     */
	@RequestMapping("/create")
	public UIview create(){
		UIview view=UIView("/center/ump/coupons/couponsCreate", false);
		return view;
	}
	
    /**
     * 优惠券 》编辑
     */
	@RequestMapping("/edit")
	public UIview edit(){
		logger.info("进入CouponsController-edit,优惠券编辑");
		
		UIview view=UIView("/center/ump/coupons/couponsCreate", false);
		FormMap formMap=getFormMap();
		E coupon=couponService.selectCoupon(formMap);
		
		view.addObject("coupon", coupon);
		return view;
	}
	
    /**
     * 优惠券 》优惠券新增保存
     * @throws Exception 
     */
	@RequestMapping("/save")
	public ModelAndView save(){
		logger.info("进入CouponsController-save,优惠券新增保存");
		
		UIview view=UIView("couponsList", true);
	    FormMap formMap=getFormMap();
	    //判断优惠形式type=1,2,3
	    if(formMap.getInt("type")==1){//优惠形式表示“指定金额”
	        formMap.set("coupon_discount", null);
	        formMap.set("random_min_price", null);
	        formMap.set("random_max_price", null);
	    }else if(formMap.getInt("type")==2){//优惠形式表示“打折”
	        formMap.set("coupon_price", null);
	        formMap.set("random_min_price", null);
	        formMap.set("random_max_price", null);
	    }else{//优惠形式表示“指定金额随机”
	        formMap.set("coupon_discount", null);
	        formMap.set("coupon_price", null);
	    }
	    //判断生效条件is_condition=-1,1
		//生效条件表示“无条件”
	    if(formMap.getInt("is_condition")==-1){
	        formMap.set("condition_price", null);
	    }
		formMap.put("state",1);

	    //判断使用有效期方式use_type=1 固定范围  ,2  指定时间范围
		//使用有效期表示“固定范围”
	    if(formMap.getInt("use_type")==1){
	        formMap.set("from_day", null);
	        formMap.set("to_day", null);
	        //如果开始时间小于当前时间   则优惠券处于未生效状态  ,其他情况都是生效状态
			if (System.currentTimeMillis()< DateUtil.getTimeByString(formMap.getStr("start_time"),"yyyy/MM/dd HH:mm:ss")){
				formMap.put("state",-2);
			}
	    }else{
	        formMap.set("start_time", null);
	        formMap.set("end_time", null);
	    }
	    //判断没人领取限制
		//使用有效期表示“不限制领取熟量”
	    if(formMap.getInt("maxLimitType")==1){
	        formMap.set("max_limit", 0);
	    }
	    //判断可使用商品
		//使用有效期表示“全网商品通用”
	    if(formMap.getInt("product_range_type")==1){
	        formMap.set("product_ids", null);
	    }else{
	        formMap.set("product_ids", formMap.getStr("selectProductValues"));
	    }
	    //判断是新增还是修改
		//新增优惠券判断
		if(StringUtils.isEmpty(formMap.getStr("validate_id"))){
			couponService.insert(formMap);
		}else{//修改优惠券
			couponService.edit(formMap);
		}
		return view;
	}
	
	/**
	 * 优惠券》优惠券列表》生效&不生效
	 */
	@RequestMapping("/state")
	public UIview state(){
		logger.info("进入CouponsController-state,优惠券生效&不生效操作");
		
		UIview view=UIView("couponsList", true);
		FormMap formMap=getFormMap();
		formMap.set("onlyUpdateState", "state");
		couponService.edit(formMap);
		return view;
	}
	
	/**
	 * 优惠券》优惠券列表》删除
	 */
	@RequestMapping("/remove")
	public UIview remove(){
		logger.info("进入CouponsController-remove,优惠券删除");
		
		UIview view=UIView("couponsList", true);
		FormMap formMap=getFormMap();
		formMap.set("state", "0");
		List<E> list=couponService.selectCouponUserList(formMap);
		if(list.size() > 0){//该优惠券还有未使用的用户
			view.addErrorMessage("删除失败该优惠券还有未使用的用户!");
		}else{
			couponService.remove(formMap);
			view.addPNotifyMessage("优惠券删除成功");
		} 
		return view;
	}
 
    /**
     * 优惠券 派发用户列表 
     */ 
	@RequestMapping("/couponsGive")
	public UIview couponsGive(){
		logger.info("进入CouponsController-couponsGive,优惠券推广与派发");
		
		UIview view = UIView("/center/ump/coupons/couponsGive",false);
    	FormMap formMap=getFormMap();
    	PageHelper.startPage(formMap.getPage(), formMap.getRows());
    	//查询没有领取该优惠券的用户列表与领取了但是没有超过优惠券最大设置限购数的用户列表

    	List<E> list=couponService.selectNoCouponUserList(formMap);
    	
    	view.addObject("pageInfo", new PageInfo<E>(list));
    	view.addObject("queryParam", formMap);


		E publicInfo=(E)this.getSession().getAttribute("publicInfo");
		if (publicInfo!=null){
			//获取公众号优惠券地址  和 链接
			formMap.put("item_name","COUPONSMPQRCODE");
			E paramInfo = parameterService.selectShopParamByName(formMap);
			this.getSession().setAttribute("couponMpQrCodeUrl",String.format(Constants.COUPON_QR_CODE,publicInfo.getStr("authorizer_app_id")));
			if (paramInfo!=null){
				this.getSession().setAttribute("couponMpQrcode",paramInfo.getStr("item_value"));
			}else {
				WeiitQrCodeUtil qrCodeUtil = new WeiitQrCodeUtil();
				String qrCodePath = qrCodeUtil.createQRCodeAndUploadQcloud(String.format(Constants.COUPON_QR_CODE,publicInfo.getStr("authorizer_app_id")));
				//入库
				FormMap insertParam = new FormMap();
				insertParam.put("item_code","COUPONQRCODE");
				insertParam.put("item_name","COUPONSMPQRCODE");
				insertParam.put("item_value",WeiitUtil.getFileDomain()+qrCodePath);
				insertParam.put("item_desc","公众号优惠券领取二维码");
				insertParam.put("state",0);
				insertParam.put("shop_id",formMap.get("shop_id"));
				parameterService.insert(insertParam);
				this.getSession().setAttribute("couponMpQrcode",WeiitUtil.getFileDomain()+qrCodePath);
			}
		}
		E miniPublicInfo = (E) this.getSession().getAttribute("miniPublicInfo");
		if (miniPublicInfo!=null){
			//获取公众号优惠券地址  和 链接
			formMap.put("item_name","COUPONSMAQRCODE");
			E paramInfo = parameterService.selectShopParamByName(formMap);
			if (paramInfo!=null){
				this.getSession().setAttribute("couponMaQrcode",paramInfo.getStr("item_value"));
			}else {
				try {
					formMap.put("appid",miniPublicInfo.getStr("authorizer_app_id"));
					File file = weixinOpenService.getInstance(formMap).getWxOpenComponentService().getWxMaServiceByAppid(miniPublicInfo.getStr("authorizer_app_id")).getQrcodeService().createWxaCode("pages/Receive_coupons/Receive_coupons",225);
					String qrCodePath = WeiitUtil.uploadFile(FileUtils.readFileToByteArray(file),"png");

					FormMap insertParam = new FormMap();
					insertParam.put("item_code","COUPONQRCODE");
					insertParam.put("item_name","COUPONSMAQRCODE");
					insertParam.put("item_value",WeiitUtil.getFileDomain()+qrCodePath);
					insertParam.put("item_desc","小程序优惠券领取二维码");
					insertParam.put("state",0);
					insertParam.put("shop_id",formMap.get("shop_id"));
					parameterService.insert(insertParam);
					this.getSession().setAttribute("couponMaQrcode",WeiitUtil.getFileDomain()+qrCodePath);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}

		return view;
	}
	
	/**
	 * 派发优惠券  保存 
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/couponsGiveSave")
	public UIview couponsGiveSave(){
		logger.info("进入CouponsController-couponsGiveSave,优惠券推广提交");
		
		FormMap formMap=getFormMap();
		String message=couponService.insertCouponUserTrans(formMap);
		UIview view = UIView("couponsGive?validate_id="+formMap.getStr("validate_id")+"&validate_id_token="+formMap.getStr("validate_id_token"),true);
		if(message==null){
			view.addPNotifyMessage("会员优惠券派送成功");
		}else{
			view.addErrorMessage(message);
		}
		return view;
	}
	
	/**
	 * 派发优惠券记录
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/couponsUserList")
	public UIview couponsUserList(){
		logger.info("进入CouponsController-couponsUserList,发优惠券记录");
		
		UIview view = UIView("/center/ump/coupons/couponsUserList",false);
    	FormMap formMap=getFormMap();
    	E coupon = couponService.selectOne(formMap);
    	PageHelper.startPage(formMap.getPage(), formMap.getRows());
    	//查询该优惠券已经派发过的用户
    	List<E> list=couponService.selectCouponUserList(formMap);
    	
    	view.addObject("pageInfo", new PageInfo<E>(list));
    	view.addObject("queryParam", formMap);
    	view.addObject("coupon", coupon);
		return view; 
	}

	
	/**
	 * 派发优惠券》回收
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/couponsUserRemove")
	public UIview couponsUserRemove(){
		logger.info("进入CouponsController-couponsUserRemove,派发优惠券 回收");
		
		FormMap formMap=getFormMap();
		String message=couponService.removeCouponUserTrans(formMap);
		UIview view = UIView("couponsUserList?validate_id="+formMap.getStr("validate_id")+"&validate_id_token="+formMap.getStr("validate_id_token"),true);
		if(message==null){
			view.addPNotifyMessage("优惠券回收成功!");
		}else{
			view.addErrorMessage(message);
		}
		return view;
	}


	/**
	 * 装修页面 获取优惠券列表
	 *
	 *
	 * */
	@RequestMapping(value = "/getCouponList",method = RequestMethod.GET)
	@ResponseBody
	public E getCouponList(@RequestParam String token,String coupon_name) {
		logger.info("进入CouponsController-getCouponList,获取优惠券列表");
		FormMap formMap=new FormMap();
		E result = new E();
		try {
			formMap.put("shop_id", DesUtil.decrypt(token));
		} catch (Exception e) {
			e.printStackTrace();
			logger.error("token 解密失败");
			result.put("couponList",null);
			return result;
		}
		formMap.put("coupon_name",coupon_name);
		List<E> list = couponService.selectList(formMap);
		result.put("couponList",list);
		//绑定上一次参数
		return result;
	}


	/**
	 * 微页面  优惠券展示   不展示是否领取  过滤失效优惠券
	 * @author lhq
	 * @date 2018年5月10日
	 * */

	@RequestMapping(value = "/couponListByIds",method = RequestMethod.GET)
	@ResponseBody
	public String couponListByIds(@RequestParam String token,String coupon_ids,Integer couponType){
		logger.info("ActivityController-couponListByIds微页面  优惠券展示");
		FormMap formMap = new FormMap();
		try {
			formMap.put("shop_id", DesUtil.decrypt(token));
		} catch (Exception e) {
			e.printStackTrace();
			logger.error("token 解密失败");
			return "";
		}
		formMap.put("couponType",couponType);
		if (!StringUtils.isEmpty(coupon_ids) && couponType==0){
			formMap.put("coupon_ids", StringUtils.strip(coupon_ids, "[]").split(","));
		}
		formMap.put("end_time",new Date());
		List<E> list = couponService.couponListByIds(formMap);
		return toJsonAPI(list);
	}
	
}

🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈 🌈
 
🍂个人博客首页 KJ.JK
 
欢迎大家点赞👍收藏💖评论💬关注🔒
 
💖源码获取 | 💻学习交流 | 🤝商务合作 | 💨私信作者


作者KJ.JK

文章对你有所帮助的话欢迎给个赞或者 star你的支持是对作者最大的鼓励不足之处可以在评论区多多指正交流学习

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: Java