Merge branch 'hotfix' into develop

master
kira 8 years ago
commit bfad3255f4

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>au.com.royalpay.payment</groupId> <groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId> <artifactId>payment-parent</artifactId>
<version>0.2.0-dev</version> <version>0.2.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

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

@ -40,7 +40,7 @@ public class OpenimController {
@RequestMapping(value = "/check", method = RequestMethod.PUT) @RequestMapping(value = "/check", method = RequestMethod.PUT)
@RequireManager @RequireManager
public JSONObject sendMsg(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public JSONObject check(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return customerServiceService.checkAndSaveManager(manager); return customerServiceService.checkAndSaveManager(manager);
} }

Loading…
Cancel
Save