| | |
| | | public class WxShareProductAction { |
| | | |
| | | @Autowired |
| | | WxacodeUtil wxacodeUtil; |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | |
| | | @Value("${static_resource_url}") |
| | | private String staticResourceUrl; |
| | | |
| | | @Autowired |
| | | WeChatApiTools weChatApiTools; |
| | | @Autowired |
| | | private ShopProductDao shopProductDao; |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 秒杀分享图片参数 |
| | | * @param loginUser |
| | |
| | | |
| | | 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); |
| | | // 图片保存目录路径 |
| | | String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | String baseSavePath = fileStoragePath; |
| | | // 图片访问URL |
| | | String baseSaveUrl = PropertiesUtil.getString(AppConstance.NGINX_URL); |
| | | String baseSaveUrl = staticResourceUrl; |
| | | String productImg = shopProduct.getImgMobile(); |
| | | productImg = productImg.replace(baseSaveUrl, baseSavePath); |
| | | String targetImg = UUIDUtil.getRandomID() + ".png"; |
| | |
| | | |
| | | 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); |
| | | // 图片保存目录路径 |
| | | String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | String baseSavePath =fileStoragePath; |
| | | // 图片访问URL |
| | | String baseSaveUrl = PropertiesUtil.getString(AppConstance.NGINX_URL); |
| | | String baseSaveUrl =staticResourceUrl; |
| | | String productImg = shopProduct.getImgMobile(); |
| | | productImg = productImg.replace(baseSaveUrl, baseSavePath); |
| | | String targetImg = UUIDUtil.getRandomID() + ".png"; |
| | |
| | | |
| | | |
| | | |
| | | 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); |
| | | // 图片保存目录路径 |
| | | String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | String baseSavePath =fileStoragePath; |
| | | // 图片访问URL |
| | | String baseSaveUrl = PropertiesUtil.getString(AppConstance.NGINX_URL); |
| | | String baseSaveUrl =staticResourceUrl; |
| | | String productImg = shopProduct.getImgMobile(); |
| | | String productPath = baseSavePath + "wxacode" + File.separatorChar + MD5Util.strToMD5(loginUser.getOpenId()) + "poster.png"; |
| | | ImageUtil.downloadPicture(productImg, productPath); |