|
|
|
@@ -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()); |
|
|
|
|
|
|
|
|