|  |  |  | 
|---|
|  |  |  | package com.matrix.system.shopXcx.api.action; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.biz.bean.BizUser; | 
|---|
|  |  |  | import com.matrix.biz.dao.BizUserDao; | 
|---|
|  |  |  | import com.matrix.system.hive.bean.SysVipInfo; | 
|---|
|  |  |  | import com.matrix.system.hive.dao.SysVipInfoDao; | 
|---|
|  |  |  | import com.matrix.component.redis.RedisUserLoginUtils; | 
|---|
|  |  |  | import com.matrix.component.tools.WxacodeUtil; | 
|---|
|  |  |  | import com.matrix.core.pojo.AjaxResult; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.matrix.system.shopXcx.api.vo.WxActivitiesGroupBuyVO; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.bean.*; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.dao.*; | 
|---|
|  |  |  | import org.jetbrains.annotations.NotNull; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Value; | 
|---|
|  |  |  | import org.springframework.stereotype.Controller; | 
|---|
|  |  |  | 
|---|
|  |  |  | ShopActivitiesGroupInfoDao shopActivitiesGroupInfoDao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | BizUserDao bizUserDao; | 
|---|
|  |  |  | SysVipInfoDao sysVipInfoDao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/getProductShareQrcode") | 
|---|
|  |  |  | public @ResponseBody | 
|---|
|  |  |  | AjaxResult getwxacode1(@RequestBody QrcodeVo qrcodeVo) throws Exception { | 
|---|
|  |  |  | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); | 
|---|
|  |  |  | loginUser = bizUserDao.selectById(loginUser.getUserId()); | 
|---|
|  |  |  | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); | 
|---|
|  |  |  | loginUser = sysVipInfoDao.selectById(loginUser.getId()); | 
|---|
|  |  |  | //活动类型 | 
|---|
|  |  |  | ShopActivities activities=null; | 
|---|
|  |  |  | //是否为拼团分享 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ShopShareQrcord queryOrcode = new ShopShareQrcord(); | 
|---|
|  |  |  | queryOrcode.setProductId(qrcodeVo.getProductId()); | 
|---|
|  |  |  | queryOrcode.setUserId(loginUser.getOpenId()); | 
|---|
|  |  |  | queryOrcode.setUserId(loginUser.getId()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (isGroupProduct ) { | 
|---|
|  |  |  | queryOrcode.setProductId(Integer.parseInt(qrcodeVo.getActId() + "")); | 
|---|
|  |  |  | 
|---|
|  |  |  | //如果未查询到就先插入数据再更新数据 | 
|---|
|  |  |  | shareQrcord.setCreateBy(loginUser.getOpenId()); | 
|---|
|  |  |  | shareQrcord.setUpdateBy(loginUser.getOpenId()); | 
|---|
|  |  |  | shareQrcord.setUserId(loginUser.getOpenId()); | 
|---|
|  |  |  | shareQrcord.setUserId(loginUser.getId()); | 
|---|
|  |  |  | shareQrcord.setShopId(qrcodeVo.getShopId()); | 
|---|
|  |  |  | //拼团活动 | 
|---|
|  |  |  | if (isGroupProduct ) { | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param qrcodeVo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private QrcodeImgParam getSeckillQrcodeImgParam(BizUser loginUser, QrcodeVo qrcodeVo) throws Exception { | 
|---|
|  |  |  | private QrcodeImgParam getSeckillQrcodeImgParam(SysVipInfo loginUser, QrcodeVo qrcodeVo) throws Exception { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ShopActivitiesSeckillInfo seckillInfo = shopActivitiesSeckillInfoDao.selectById(qrcodeVo.getSkillId()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param qrcodeVo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private QrcodeImgParam getGroupQrcodeImgParam(BizUser loginUser, QrcodeVo qrcodeVo) throws Exception { | 
|---|
|  |  |  | private QrcodeImgParam getGroupQrcodeImgParam(SysVipInfo loginUser, QrcodeVo qrcodeVo) throws Exception { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WxActivitiesGroupBuyVO groupBuyVO = shopActivitiesGroupInfoDao.selectGroupInfoWithPriceByActId(qrcodeVo.getActId()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | return qrcodeImgParam; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @NotNull | 
|---|
|  |  |  | private QrcodeImgParam getQrcodeImgParam(BizUser loginUser, QrcodeVo qrcodeVo) throws Exception { | 
|---|
|  |  |  | private QrcodeImgParam getQrcodeImgParam(SysVipInfo loginUser, QrcodeVo qrcodeVo) throws Exception { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ShopProduct shopProduct = shopProductDao.selectById(qrcodeVo.getProductId()); | 
|---|
|  |  |  |  | 
|---|