xhxu 3 лет назад
Родитель
Сommit
4cc08344c8
2 измененных файлов: 17 добавлений и 1 удалений
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/TtMerchantPoi.java
  2. +16
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java

+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/TtMerchantPoi.java Просмотреть файл

@@ -19,7 +19,7 @@ public class TtMerchantPoi extends TenantEntity {

protected Long id;//merchant_id

@io.swagger.annotations.ApiModelProperty(value=" merchant_id",name="supplierExtId")
@io.swagger.annotations.ApiModelProperty(value=" 暂定merchant_id",name="supplierExtId")
private String supplierExtId;

@io.swagger.annotations.ApiModelProperty(value="商户名",name="merchantName")


+ 16
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Просмотреть файл

@@ -136,6 +136,8 @@ public class WxCouponServiceImpl implements WxCouponService {
@Autowired
private TtGoodsCategoryService ttGoodsCategoryService;

@Autowired
private TtMerchantPoiService ttMerchantPoiService;

@Autowired
WxAppinfoService wxAppinfoService;
@@ -578,6 +580,20 @@ public class WxCouponServiceImpl implements WxCouponService {
return new ResultData(ErrorCode.APP_ID_NOT_FOUND);
}

//判断商户是否匹配poi
if (EnumAppPlat.TOUTIAO.equals(plat)) {
List<String> badPoiNames = new ArrayList();
for (WxMerchant merchant:merchantList) {
TtMerchantPoi byId = ttMerchantPoiService.getById(merchant.getId());
if(byId == null || !EnumSupplierMathStatus.match_success.getCode().equals(byId.getMatchStatus())){
badPoiNames.add(merchant.getName());
}
}
if(!badPoiNames.isEmpty()){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), JSONArray.toJSONString(badPoiNames)+"未匹配poi");
}
}

EnumPayMchType payMchType = EnumPayMchType.getEnum(payAccount.getMchType());
EnumPayShare isShare = EnumPayShare.getEnum(payAccount.getShare());



Загрузка…
Отмена
Сохранить