| @@ -256,12 +256,16 @@ public class AliPayController extends BaseController { | |||||
| String mallName = jo.getString("mall_name"); | String mallName = jo.getString("mall_name"); | ||||
| // WxMerchant merchant = wxMerchantService.getById(Long.parseLong(mallStoreId)); | // WxMerchant merchant = wxMerchantService.getById(Long.parseLong(mallStoreId)); | ||||
| WxMerchant merchant = wxMerchantService.getMerchantByEncode(tenantId,mallStoreId); | |||||
| if(merchant == null){ | |||||
| logger.error("alipay notify . 找不到门店:"+paramMap); | |||||
| return "fail"; | |||||
| WxMerchant merchant = null; | |||||
| if (StringUtils.isNotBlank(mallStoreId)) { | |||||
| merchant = wxMerchantService.getMerchantByEncode(tenantId,mallStoreId); | |||||
| } | } | ||||
| // if(merchant == null){ | |||||
| // logger.error("alipay notify . 找不到门店:"+paramMap); | |||||
| // return "fail"; | |||||
| // } | |||||
| aliBusinessCircleOrder.updateTenantInfo(merchant); | aliBusinessCircleOrder.updateTenantInfo(merchant); | ||||
| aliBusinessCircleOrder.setTransactionId(tradeNo); | aliBusinessCircleOrder.setTransactionId(tradeNo); | ||||
| aliBusinessCircleOrder.setAmount(amount); | aliBusinessCircleOrder.setAmount(amount); | ||||
| @@ -133,15 +133,19 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder | |||||
| record.setCreateTime(now); | record.setCreateTime(now); | ||||
| record.setUpdateTime(now); | record.setUpdateTime(now); | ||||
| if(wxMerchant == null && StringUtils.isNotBlank(record.getMallStoreId())){ | |||||
| wxMerchant = wxMerchantService.getMerchantByEncode(record.getTenantId(),record.getMallStoreId()); | |||||
| } | |||||
| if(wxMerchant != null){ | |||||
| record.setMerchantId(wxMerchant.getId()); | |||||
| record.setMerchantName(wxMerchant.getName()); | |||||
| }else{ | |||||
| logger.error("--Ali商圈付款通知消息未找到门店--mallStoreId="+record.getMallStoreId()); | |||||
| record.setMerchantName("未知门店"); | |||||
| if (StringUtils.isBlank(record.getMallStoreId())) { | |||||
| record.setMerchantName("未知门店-未设置唯一码"); | |||||
| }else { | |||||
| if(wxMerchant == null && StringUtils.isNotBlank(record.getMallStoreId())){ | |||||
| wxMerchant = wxMerchantService.getMerchantByEncode(record.getTenantId(),record.getMallStoreId()); | |||||
| } | |||||
| if(wxMerchant != null){ | |||||
| record.setMerchantId(wxMerchant.getId()); | |||||
| record.setMerchantName(wxMerchant.getName()); | |||||
| }else{ | |||||
| logger.error("--Ali商圈付款通知消息未找到门店--mallStoreId="+record.getMallStoreId()); | |||||
| record.setMerchantName("未知门店-唯一码未匹配"); | |||||
| } | |||||
| } | } | ||||
| if(record.getCUserId() != null){ | if(record.getCUserId() != null){ | ||||
| @@ -162,13 +162,18 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe | |||||
| //TODO 第三方获取门店(标识可能发生变化) | //TODO 第三方获取门店(标识可能发生变化) | ||||
| // WxMerchant wxMerchant = wxMerchantService.getById(Long.parseLong(record.getWxShopNumber())); | // WxMerchant wxMerchant = wxMerchantService.getById(Long.parseLong(record.getWxShopNumber())); | ||||
| WxMerchant wxMerchant = wxMerchantService.getMerchantByEncode(record.getTenantId(),record.getWxShopNumber()); | |||||
| if (wxMerchant != null) { | |||||
| record.setMerchantId(wxMerchant.getId()); | |||||
| record.setMerchantName(wxMerchant.getName()); | |||||
| } else { | |||||
| record.setMerchantName("未知门店"); | |||||
| logger.error("--wx商圈付款通知消息未找到门店--shopName=" + record.getWxShopName() + "&shopNumber=" + record.getWxShopNumber()); | |||||
| WxMerchant wxMerchant = null; | |||||
| if (StringUtils.isBlank(record.getWxShopNumber())) { | |||||
| record.setMerchantName("未知门店-未设置唯一码"); | |||||
| }else { | |||||
| wxMerchant = wxMerchantService.getMerchantByEncode(record.getTenantId(),record.getWxShopNumber()); | |||||
| if (wxMerchant != null) { | |||||
| record.setMerchantId(wxMerchant.getId()); | |||||
| record.setMerchantName(wxMerchant.getName()); | |||||
| } else { | |||||
| record.setMerchantName("未知门店-唯一码未匹配"); | |||||
| logger.error("--wx商圈付款通知消息未找到门店--shopName=" + record.getWxShopName() + "&shopNumber=" + record.getWxShopNumber()); | |||||
| } | |||||
| } | } | ||||
| if(StringUtils.isNotBlank(record.getOpenid()) && StringUtils.isNotBlank(record.getAppid())){ | if(StringUtils.isNotBlank(record.getOpenid()) && StringUtils.isNotBlank(record.getAppid())){ | ||||