Commit 3c13394c by fanjiaxin

联调问题处理

parent 639eafeb
Pipeline #71568 passed with stages
in 59 seconds
...@@ -325,12 +325,12 @@ public class DrmSharerConfig { ...@@ -325,12 +325,12 @@ public class DrmSharerConfig {
/** /**
* 获取推客分佣比例 * 获取推客分佣比例
*/ */
private BigDecimal getSharerCommissionRatio(String openId, Integer productId) { private BigDecimal getSharerCommissionRatio(String openId, Long productId) {
Optional<CommissionSharerProductBO> sharerProductCommissionOpt = Optional.ofNullable(commissionSharerProductList) Optional<CommissionSharerProductBO> sharerProductCommissionOpt = Optional.ofNullable(commissionSharerProductList)
.orElseGet(ArrayList::new) .orElseGet(ArrayList::new)
.stream() .stream()
.filter(item -> item.getOpenId().equals(openId)) .filter(item -> item.getOpenId().equals(openId))
.filter(item -> null == productId || item.getProductId().equals(productId)) .filter(item -> null == productId || item.getProductId().equals(String.valueOf(productId)))
.findFirst(); .findFirst();
if(sharerProductCommissionOpt.isPresent()){ if(sharerProductCommissionOpt.isPresent()){
// 返回推客商品分佣 // 返回推客商品分佣
...@@ -365,7 +365,7 @@ public class DrmSharerConfig { ...@@ -365,7 +365,7 @@ public class DrmSharerConfig {
boolean isSuccess = false; boolean isSuccess = false;
try { try {
// 设置推客分佣比例 // 设置推客分佣比例
weChatShopSetSharerProductCommissionRequest.handle(sharerAppid, Integer.valueOf(newBo.getProductId()), commissionRatio.toPlainString()); weChatShopSetSharerProductCommissionRequest.handle(sharerAppid, Long.valueOf(newBo.getProductId()), commissionRatio.toPlainString());
isSuccess = true; isSuccess = true;
} catch (Exception e) { } catch (Exception e) {
log.error("设置推客的的分佣类型和比例信息失败", e); log.error("设置推客的的分佣类型和比例信息失败", e);
...@@ -391,7 +391,7 @@ public class DrmSharerConfig { ...@@ -391,7 +391,7 @@ public class DrmSharerConfig {
try { try {
// 设置推客分佣比例 // 设置推客分佣比例
weChatShopSetSharerProductCommissionRequest.handle(sharerAppid, weChatShopSetSharerProductCommissionRequest.handle(sharerAppid,
Integer.valueOf(oldBo.getProductId()), null); Long.valueOf(oldBo.getProductId()), null);
isSuccess = true; isSuccess = true;
} catch (Exception e) { } catch (Exception e) {
log.error("设置推客的的分佣类型和比例信息失败", e); log.error("设置推客的的分佣类型和比例信息失败", e);
......
...@@ -54,7 +54,7 @@ public class ProductServiceImpl implements IProductService { ...@@ -54,7 +54,7 @@ public class ProductServiceImpl implements IProductService {
.stream() .stream()
.map(item -> { .map(item -> {
WeChatPromoteProductDetailVO detailVO = weChatShopPromoteProductDetailRequest.handle(item.getShop_appid(), WeChatPromoteProductDetailVO detailVO = weChatShopPromoteProductDetailRequest.handle(item.getShop_appid(),
Integer.valueOf(item.getProduct_id())); Long.valueOf(item.getProduct_id()));
if (null == detailVO) { if (null == detailVO) {
return null; return null;
} }
...@@ -102,7 +102,7 @@ public class ProductServiceImpl implements IProductService { ...@@ -102,7 +102,7 @@ public class ProductServiceImpl implements IProductService {
listVO.setShopAppid(item.getShop_appid()); listVO.setShopAppid(item.getShop_appid());
listVO.setProductId(item.getProduct_id()); listVO.setProductId(item.getProduct_id());
// 获取推广链接 // 获取推广链接
WeChatPromoteProductLinkVO promoteProductLinkVO = weChatShopPromoteProductLinkRequest.handle(Integer.valueOf(item.getProduct_id()), WeChatPromoteProductLinkVO promoteProductLinkVO = weChatShopPromoteProductLinkRequest.handle(Long.valueOf(item.getProduct_id()),
item.getShop_appid()); item.getShop_appid());
listVO.setProductUrl(null != promoteProductLinkVO ? promoteProductLinkVO.getShort_link() : null); listVO.setProductUrl(null != promoteProductLinkVO ? promoteProductLinkVO.getShort_link() : null);
return listVO; return listVO;
......
...@@ -41,7 +41,7 @@ public class WeChatShopGetSharerProductCommissionRequest implements IWeChatReque ...@@ -41,7 +41,7 @@ public class WeChatShopGetSharerProductCommissionRequest implements IWeChatReque
/** /**
* 处理 * 处理
*/ */
public WeChatGetSharerProductCommissionVO handle(String sharerAppid, Integer productId) { public WeChatGetSharerProductCommissionVO handle(String sharerAppid, Long productId) {
WeChatGetSharerProductCommissionBO params = WeChatGetSharerProductCommissionBO.builder() WeChatGetSharerProductCommissionBO params = WeChatGetSharerProductCommissionBO.builder()
.sharer_appid(sharerAppid) .sharer_appid(sharerAppid)
.product_id(productId) .product_id(productId)
......
...@@ -42,7 +42,7 @@ public class WeChatShopPromoteProductDetailRequest implements IWeChatRequest { ...@@ -42,7 +42,7 @@ public class WeChatShopPromoteProductDetailRequest implements IWeChatRequest {
/** /**
* 处理 * 处理
*/ */
public WeChatPromoteProductDetailVO handle(String shopAppid, Integer productId) { public WeChatPromoteProductDetailVO handle(String shopAppid, Long productId) {
WeChatPromoteProductDetailBO params = WeChatPromoteProductDetailBO.builder() WeChatPromoteProductDetailBO params = WeChatPromoteProductDetailBO.builder()
.plan_type(ProductPlanTypeEnum.OPEN.getCode()) .plan_type(ProductPlanTypeEnum.OPEN.getCode())
.shop_appid(shopAppid) .shop_appid(shopAppid)
......
...@@ -41,7 +41,7 @@ public class WeChatShopPromoteProductLinkRequest implements IWeChatRequest { ...@@ -41,7 +41,7 @@ public class WeChatShopPromoteProductLinkRequest implements IWeChatRequest {
/** /**
* 处理 * 处理
*/ */
public WeChatPromoteProductLinkVO handle(Integer productId, String shopAppid) { public WeChatPromoteProductLinkVO handle(Long productId, String shopAppid) {
WeChatPromoteProductLinkBO params = WeChatPromoteProductLinkBO.builder() WeChatPromoteProductLinkBO params = WeChatPromoteProductLinkBO.builder()
.product_id(productId) .product_id(productId)
.shop_appid(shopAppid) .shop_appid(shopAppid)
......
...@@ -41,7 +41,7 @@ public class WeChatShopSetSharerProductCommissionRequest implements IWeChatReque ...@@ -41,7 +41,7 @@ public class WeChatShopSetSharerProductCommissionRequest implements IWeChatReque
/** /**
* 处理 * 处理
*/ */
public WeChatCoreVO handle(String sharerAppid, Integer productId, String commissionRatio) { public WeChatCoreVO handle(String sharerAppid, Long productId, String commissionRatio) {
WeChatSetSharerProductCommissionBO params = WeChatSetSharerProductCommissionBO.builder() WeChatSetSharerProductCommissionBO params = WeChatSetSharerProductCommissionBO.builder()
.sharer_appid(sharerAppid) .sharer_appid(sharerAppid)
.product_id(productId) .product_id(productId)
......
...@@ -22,5 +22,5 @@ public class WeChatGetSharerProductCommissionBO implements Serializable { ...@@ -22,5 +22,5 @@ public class WeChatGetSharerProductCommissionBO implements Serializable {
/** /**
* 商品列表 * 商品列表
*/ */
private Integer product_id; private Long product_id;
} }
...@@ -22,7 +22,7 @@ public class WeChatPromoteProductDetailBO implements Serializable { ...@@ -22,7 +22,7 @@ public class WeChatPromoteProductDetailBO implements Serializable {
/** /**
* 商品id * 商品id
*/ */
private Integer product_id; private Long product_id;
/** /**
* 商品的计划类型 1:定向计划 2:公开计划 * 商品的计划类型 1:定向计划 2:公开计划
*/ */
......
...@@ -26,7 +26,7 @@ public class WeChatPromoteProductLinkBO implements Serializable { ...@@ -26,7 +26,7 @@ public class WeChatPromoteProductLinkBO implements Serializable {
/** /**
* 商品 id,如果使用该参数,需要传入shop_appid * 商品 id,如果使用该参数,需要传入shop_appid
*/ */
private Integer product_id; private Long product_id;
/** /**
* 商品所属店铺 appid * 商品所属店铺 appid
*/ */
......
...@@ -22,7 +22,7 @@ public class WeChatSetSharerProductCommissionBO implements Serializable { ...@@ -22,7 +22,7 @@ public class WeChatSetSharerProductCommissionBO implements Serializable {
/** /**
* 商品列表 * 商品列表
*/ */
private Integer product_id; private Long product_id;
/** /**
* 平台分佣时的分佣比例,范围为【100000 - 900000】,代表【10%-90%】 * 平台分佣时的分佣比例,范围为【100000 - 900000】,代表【10%-90%】
*/ */
......
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