| | |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.shopXcx.api.WeChatApiTools; |
| | | import com.matrix.system.shopXcx.api.pojo.QrcodeImgParam; |
| | | import com.matrix.system.shopXcx.api.vo.QrcodeVo; |
| | | import com.matrix.system.shopXcx.api.vo.WxActivitiesGroupBuyVO; |
| | |
| | | @CrossOrigin(origins = "*", maxAge = 3600) |
| | | public class WxShareProductAction { |
| | | |
| | | |
| | | @Autowired |
| | | WeChatApiTools weChatApiTools; |
| | | @Autowired |
| | | private ShopProductDao shopProductDao; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | ShopActivitiesSeckillInfoDao shopActivitiesSeckillInfoDao; |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 生成二维码 |
| | |
| | | qrcodeImgParam = getQrcodeImgParam(loginUser, qrcodeVo); |
| | | shareQrcord.setProductId(qrcodeVo.getProductId()); |
| | | } |
| | | |
| | | qrcodeImgParam.logo=""; |
| | | //绘制二维码 |
| | | drawQrcode(qrcodeImgParam); |
| | | |
| | |
| | | |
| | | ShopProduct shopProduct = shopProductDao.selectById(seckillInfo.getGoodsId().intValue()); |
| | | |
| | | String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID()); |
| | | String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID() |
| | | ,weChatApiTools.getAppid(loginUser.getCompanyId()),weChatApiTools.getSecret(loginUser.getCompanyId())); |
| | | |
| | | LogUtil.debug("qrcodeSavePath={}", qrcodeSavePath); |
| | | // 图片保存目录路径 |
| | |
| | | qrcodeImgParam.targetImg = baseSavePath + "/" + "wxacode" + "/" + targetImg; |
| | | qrcodeImgParam.title = "【秒杀】" + shopProduct.getTitle(); |
| | | qrcodeImgParam.price = "¥" +seckillInfo.getSiPrice(); |
| | | qrcodeImgParam.logo = "深圳肽妍"; |
| | | qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验肽妍产品"; |
| | | |
| | | qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验"; |
| | | return qrcodeImgParam; |
| | | } |
| | | |
| | |
| | | |
| | | ShopProduct shopProduct = shopProductDao.selectById(groupBuyVO.getGoodsId().intValue()); |
| | | |
| | | String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID()); |
| | | String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID() |
| | | ,weChatApiTools.getAppid(loginUser.getCompanyId()),weChatApiTools.getSecret(loginUser.getCompanyId())); |
| | | |
| | | LogUtil.debug("qrcodeSavePath={}", qrcodeSavePath); |
| | | // 图片保存目录路径 |
| | |
| | | qrcodeImgParam.targetImg = baseSavePath + "/" + "wxacode" + "/" + targetImg; |
| | | qrcodeImgParam.title = "【拼团】" + shopProduct.getTitle(); |
| | | qrcodeImgParam.price = "¥" + price.getGpPrice(); |
| | | qrcodeImgParam.logo = "深圳肽妍"; |
| | | qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验肽妍产品"; |
| | | |
| | | qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验"; |
| | | return qrcodeImgParam; |
| | | } |
| | | |
| | |
| | | |
| | | ShopProduct shopProduct = shopProductDao.selectById(qrcodeVo.getProductId()); |
| | | |
| | | String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID()); |
| | | |
| | | |
| | | String qrcodeSavePath = WxacodeUtil.getWxacode(qrcodeVo.getScene(), qrcodeVo.getPath(), UUIDUtil.getRandomID() |
| | | ,weChatApiTools.getAppid(loginUser.getCompanyId()),weChatApiTools.getSecret(loginUser.getCompanyId())); |
| | | |
| | | LogUtil.debug("qrcodeSavePath={}", qrcodeSavePath); |
| | | // 图片保存目录路径 |
| | |
| | | qrcodeImgParam.targetImg = baseSavePath + "/" + "wxacode" + "/" + targetImg; |
| | | qrcodeImgParam.title = shopProduct.getTitle(); |
| | | qrcodeImgParam.price = "¥" + shopProduct.getPrice().toString(); |
| | | qrcodeImgParam.logo = "深圳肽妍"; |
| | | |
| | | ShopCoupon shopCoupon = shopProduct.getShopCoupon(); |
| | | qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验肽妍产品"; |
| | | qrcodeImgParam.couponName = loginUser.getNickName() + "邀您体验"; |
| | | if (shopCoupon != null) { |
| | | String beginTiem = DateUtil.dateFormatStr(shopCoupon.getBeginTime(), DateUtil.DATE_FORMAT_SPLITE_DD); |
| | | String endTiem = DateUtil.dateFormatStr(shopCoupon.getEndTime(), DateUtil.DATE_FORMAT_SPLITE_DD); |