Sfoglia il codice sorgente

Merge branch 'release_toaliyun_real_202207' of https://git.malls.iformall.com/server/formallProject into release_toaliyun_real_202207

release_toaliyun_real
zhengfangyuan 3 anni fa
parent
commit
1632131462
5 ha cambiato i file con 46 aggiunte e 2 eliminazioni
  1. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java
  2. +9
    -0
      mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java
  3. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java
  4. +19
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  5. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java

+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java Vedi File

@@ -54,6 +54,8 @@ public class WxMerchantVo extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value="楼层号",name="floor") @io.swagger.annotations.ApiModelProperty(value="楼层号",name="floor")
private Integer floor; private Integer floor;


@io.swagger.annotations.ApiModelProperty(value="是否为商管商户 1是 0否",name="status")
private Integer isAdmin;


@io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "show") @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "show")
private Integer isPublic; private Integer isPublic;
@@ -125,6 +127,7 @@ public class WxMerchantVo extends TenantEntity {
this.merchantLinkPhone = m.getLinkPhone(); this.merchantLinkPhone = m.getLinkPhone();
this.merchantStatus = m.getStatus(); this.merchantStatus = m.getStatus();
this.businessId = m.getBusinessId(); this.businessId = m.getBusinessId();
this.isAdmin = m.getIsAdmin();
this.isPublic = m.getIsPublic(); this.isPublic = m.getIsPublic();
this.email = m.getEmail(); this.email = m.getEmail();
this.title = m.getTitle(); this.title = m.getTitle();


+ 9
- 0
mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java Vedi File

@@ -33,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;


import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;


import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toList;


@@ -148,6 +149,14 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService {


//获取门店 //获取门店
List<WxMerchantVo> couponMerchantList = wxCouponService.getCouponMerchantList(coupon, coupon.getId()); List<WxMerchantVo> couponMerchantList = wxCouponService.getCouponMerchantList(coupon, coupon.getId());
if(couponMerchantList.size() > 0){
List<WxMerchantVo> isAdminList = couponMerchantList.stream().filter(m -> EnumYesOrNo.YES.getCode().equals(m.getIsAdmin())).collect(Collectors.toList());
if(isAdminList != null && isAdminList.size() == 1){
couponMerchantList = isAdminList;
}else if(isAdminList != null && isAdminList.size() > 1){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"数据异常,存在多个商管商户");
}
}
List<Product.PoiStruct> poiList = new ArrayList(); List<Product.PoiStruct> poiList = new ArrayList();
for (WxMerchantVo mvo:couponMerchantList){ for (WxMerchantVo mvo:couponMerchantList){
if(StringUtils.isNotBlank(mvo.getSupplierExtId())){ if(StringUtils.isNotBlank(mvo.getSupplierExtId())){


+ 14
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java Vedi File

@@ -832,7 +832,21 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
public String getCouponOneMerchantUid(EnumPayWay payWay,Long couponChannelId, String tenantId) { public String getCouponOneMerchantUid(EnumPayWay payWay,Long couponChannelId, String tenantId) {
WxCouponChannel couponChannel = wxCouponChannelMapper.selectById(couponChannelId, tenantId); WxCouponChannel couponChannel = wxCouponChannelMapper.selectById(couponChannelId, tenantId);
List<Long> merchantIds = wxCouponMerchantMapper.findMerchantIdListByProduct(couponChannel.getCouponId(), tenantId); List<Long> merchantIds = wxCouponMerchantMapper.findMerchantIdListByProduct(couponChannel.getCouponId(), tenantId);
Long merchantId = null;
if(merchantIds != null && merchantIds.size() == 1){ if(merchantIds != null && merchantIds.size() == 1){
merchantId = merchantIds.get(0);
}else if(merchantIds != null && merchantIds.size() > 1){
WxMerchant merchantQ = new WxMerchant();
merchantQ.setTenantId(tenantId);
merchantQ.setIds(merchantIds);
merchantQ.setIsAdmin(EnumYesOrNo.YES.getCode());
merchantQ.setStatus(EnumMerchantStatus.VALID.getCode());
List<Long> list = wxMerchantMapper.findIdList(merchantQ);
if(list != null && list.size() == 1){
merchantId = list.get(0);
}
}
if(merchantId != null){
WxProfitSharingReceiver psReceiverQ = new WxProfitSharingReceiver(); WxProfitSharingReceiver psReceiverQ = new WxProfitSharingReceiver();
psReceiverQ.setTenantId(tenantId); psReceiverQ.setTenantId(tenantId);
psReceiverQ.setMerchantId(merchantIds.get(0)); psReceiverQ.setMerchantId(merchantIds.get(0));


+ 19
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Vedi File

@@ -665,10 +665,27 @@ public class WxCouponServiceImpl implements WxCouponService {
} }


if (EnumPayMchType.DIRECT.equals(payMchType)) { if (EnumPayMchType.DIRECT.equals(payMchType)) {
Long merchantId = null;
if (merchantParamList.size() > 1) { if (merchantParamList.size() > 1) {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "直连模式只能选择一个对应门店");
List<Long> merchantIds = new ArrayList<>();
for (JSONObject o:merchantParamList) {
merchantIds.add(o.getLong("id"));
}
WxMerchant merchantQ = new WxMerchant();
merchantQ.updateTenantInfo(record);
merchantQ.setIds(merchantIds);
merchantQ.setIsAdmin(EnumYesOrNo.YES.getCode());
merchantQ.setStatus(EnumMerchantStatus.VALID.getCode());
List<Long> list = wxMerchantMapper.findIdList(merchantQ);
if(list == null || list.isEmpty()){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "直连模式多门店券需包含一个商管商户");
}else if(list.size() > 1){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "直连模式多门店券只能包含一个商管商户");
}
merchantId = list.get(0);
}else{
merchantId = merchantParamList.get(0).getLong("id");
} }
Long merchantId = merchantParamList.get(0).getLong("id");
WxProfitSharingReceiver psReceiverQ = new WxProfitSharingReceiver(); WxProfitSharingReceiver psReceiverQ = new WxProfitSharingReceiver();
psReceiverQ.updateTenantInfo(record); psReceiverQ.updateTenantInfo(record);
psReceiverQ.setMerchantId(merchantId); psReceiverQ.setMerchantId(merchantId);


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Vedi File

@@ -1472,6 +1472,7 @@ public class WxMerchantServiceImpl implements WxMerchantService {
vo.setId(m.getId()); vo.setId(m.getId());
vo.setTenantId(m.getTenantId()); vo.setTenantId(m.getTenantId());
vo.setParentTenantId(m.getParentTenantId()); vo.setParentTenantId(m.getParentTenantId());
vo.setIsAdmin(m.getIsAdmin());
vo.setMerchantImgUrl(m.getImgUrl()); vo.setMerchantImgUrl(m.getImgUrl());
vo.setMerchantName(m.getName()); vo.setMerchantName(m.getName());
vo.setMerchantLinkPhone(m.getLinkPhone()); vo.setMerchantLinkPhone(m.getLinkPhone());


Caricamento…
Annulla
Salva