Commit 9e652ef7 by fanjiaxin

联调问题处理

parent 3c13394c
Pipeline #71569 passed with stages
in 1 minute 8 seconds
......@@ -102,9 +102,13 @@ public class ProductServiceImpl implements IProductService {
listVO.setShopAppid(item.getShop_appid());
listVO.setProductId(item.getProduct_id());
// 获取推广链接
WeChatPromoteProductLinkVO promoteProductLinkVO = weChatShopPromoteProductLinkRequest.handle(Long.valueOf(item.getProduct_id()),
if(null != loginUserInfo && StringUtils.isNotBlank(loginUserInfo.getOpenId())){
WeChatPromoteProductLinkVO promoteProductLinkVO = weChatShopPromoteProductLinkRequest.handle(
loginUserInfo.getOpenId(),
Long.valueOf(item.getProduct_id()),
item.getShop_appid());
listVO.setProductUrl(null != promoteProductLinkVO ? promoteProductLinkVO.getShort_link() : null);
}
return listVO;
})
.filter(Objects::nonNull)
......
......@@ -41,8 +41,9 @@ public class WeChatShopPromoteProductLinkRequest implements IWeChatRequest {
/**
* 处理
*/
public WeChatPromoteProductLinkVO handle(Long productId, String shopAppid) {
public WeChatPromoteProductLinkVO handle(String openId, Long productId, String shopAppid) {
WeChatPromoteProductLinkBO params = WeChatPromoteProductLinkBO.builder()
.sharer_openid(openId)
.product_id(productId)
.shop_appid(shopAppid)
.build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment