|
|
|
@ -111,13 +111,20 @@ public class EncourageUseProcessor implements Ordered, EncourageService {
|
|
|
|
|
logger.debug("用户关系不存在");
|
|
|
|
|
return new JSONObject();
|
|
|
|
|
}
|
|
|
|
|
JSONObject wxUser = customerMapper.findCustomerByOpenId(visitorOpenId);
|
|
|
|
|
String merchantId = order.getString("merchant_id");
|
|
|
|
|
WeChatPayConfig.Merchant mch = WechatPayEnvironment.getEnv().getMerchantConfig(merchantId);
|
|
|
|
|
MpWechatApi api = mpWechatApiProvider.getApi(mch.getMpId());
|
|
|
|
|
if (!StringUtils.equals(wxUser.getString(api.getOpenIdKey()), openId)) {
|
|
|
|
|
logger.debug("不是同一人");
|
|
|
|
|
return new JSONObject();
|
|
|
|
|
if (mch.getMpId()==null){
|
|
|
|
|
if (!StringUtils.equals(visitorOpenId, openId)) {
|
|
|
|
|
logger.debug("不是同一人");
|
|
|
|
|
return new JSONObject();
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
JSONObject wxUser = customerMapper.findCustomerByOpenId(visitorOpenId);
|
|
|
|
|
MpWechatApi api = mpWechatApiProvider.getApi(mch.getMpId());
|
|
|
|
|
if (!StringUtils.equals(wxUser.getString(api.getOpenIdKey()), openId)) {
|
|
|
|
|
logger.debug("不是同一人");
|
|
|
|
|
return new JSONObject();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ("Alipay".equals(channel)) {
|
|
|
|
|