| | |
| | | |
| | | JSONObject paramOut = JSONObject.parseObject(responseEntity.getBody()); |
| | | |
| | | String industryName = paramOut.getJSONObject("primary_industry").getString("second_class"); |
| | | // String industryName = paramOut.getJSONObject("primary_industry").getString("second_class"); |
| | | |
| | | if ("物业".equals(industryName)) { //如果是物业 直接 返回 无需设置 |
| | | JSONObject primaryIndustry = paramOut.getJSONObject("primary_industry"); |
| | | if (primaryIndustry != null && "物业".equals(primaryIndustry.getString("second_class"))) { //如果是物业 直接 返回 无需设置 |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | return accessToken; |
| | | } |
| | | |
| | | @Override |
| | | public String getAppId(String communityId) { |
| | | SmallWeChatDto smallWeChatDto = new SmallWeChatDto(); |
| | | smallWeChatDto.setWeChatType(SmallWeChatDto.WECHAT_TYPE_PUBLIC); |
| | | smallWeChatDto.setObjType(SmallWeChatDto.OBJ_TYPE_COMMUNITY); |
| | | smallWeChatDto.setObjId(communityId); |
| | | List<SmallWeChatDto> smallWeChatDtos = smallWeChatInnerServiceSMOImpl.querySmallWeChats(smallWeChatDto); |
| | | |
| | | if (smallWeChatDtos == null || smallWeChatDtos.size() < 1) { |
| | | String appIdCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"); |
| | | String appSecretCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"); |
| | | String mchIdCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId"); |
| | | String keyCache = MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key"); |
| | | smallWeChatDto = new SmallWeChatDto(); |
| | | smallWeChatDto.setAppId(appIdCache); |
| | | smallWeChatDto.setAppSecret(appSecretCache); |
| | | smallWeChatDto.setMchId(mchIdCache); |
| | | smallWeChatDto.setPayPassword(keyCache); |
| | | } else { |
| | | smallWeChatDto = smallWeChatDtos.get(0); |
| | | } |
| | | return smallWeChatDto.getAppId(); |
| | | } |
| | | } |