old mode 100644
new mode 100755
| | |
| | | private WechatAuthProperties wechatAuthProperties; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> |
| | | gateway(IPageData pd) throws Exception { |
| | | public ResponseEntity<String> gateway(IPageData pd, String wId) throws Exception { |
| | | |
| | | JSONObject paramIn = JSONObject.parseObject(pd.getReqData()); |
| | | Assert.hasKeyAndValue(paramIn, "fromUserName", "请求报文中未包含fromUserName"); |
| | |
| | | //判断用户是否绑定业主 |
| | | boolean bindFlag = judgeBindOwner(pd, fromUserName); |
| | | if (!bindFlag) { |
| | | responseStr = WechatFactory.formatText(toUserName, fromUserName, WechatConstant.NO_BIND_OWNER_RESPONSE_MESSAGE); |
| | | |
| | | String noBindOwnerResponseMessage = MappingCache.getRemark(WechatConstant.WECHAT_DOMAIN, WechatConstant.NO_BIND_OWNER); |
| | | |
| | | if (StringUtil.isEmpty(noBindOwnerResponseMessage)) { |
| | | |
| | | noBindOwnerResponseMessage = WechatConstant.NO_BIND_OWNER_RESPONSE_MESSAGE; |
| | | } |
| | | if (!noBindOwnerResponseMessage.contains("wAppId=")) { |
| | | if (noBindOwnerResponseMessage.indexOf("W_APP_ID") > 0) { |
| | | noBindOwnerResponseMessage = noBindOwnerResponseMessage.replace("W_APP_ID","wAppId=" +WechatFactory.getAppId(wId)); |
| | | } |
| | | } |
| | | |
| | | responseStr = WechatFactory.formatText(toUserName, fromUserName, noBindOwnerResponseMessage); |
| | | return new ResponseEntity<String>(responseStr, HttpStatus.OK); |
| | | } |
| | | |