| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.core.context.PageData; |
| | | import com.java110.dto.app.AppDto; |
| | | import com.java110.dto.owner.OwnerAppUserDto; |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import com.java110.front.properties.WechatAuthProperties; |
| | | import com.java110.front.smo.AppAbstractComponentSMO; |
| | |
| | | JSONObject orderInfo = JSONObject.parseObject(responseEntity.getBody().toString()); |
| | | String orderId = orderInfo.getString("oId"); |
| | | double money = Double.parseDouble(orderInfo.getString("receivableAmount")); |
| | | String appType = OwnerAppUserDto.APP_TYPE_WECHAT_MINA; |
| | | if (AppDto.WECHAT_OWNER_APP_ID.equals(pd.getAppId())) { |
| | | appType = OwnerAppUserDto.APP_TYPE_WECHAT; |
| | | }else if(AppDto.WECHAT_MINA_OWNER_APP_ID.equals(pd.getAppId())){ |
| | | appType = OwnerAppUserDto.APP_TYPE_WECHAT_MINA; |
| | | }else{ |
| | | appType = OwnerAppUserDto.APP_TYPE_APP; |
| | | } |
| | | Map tmpParamIn = new HashMap(); |
| | | tmpParamIn.put("userId", pd.getUserId()); |
| | | responseEntity = super.getUserAndAttr(pd, restTemplate, tmpParamIn); |
| | | tmpParamIn.put("appType", appType); |
| | | responseEntity = super.getOwnerAppUser(pd, restTemplate, tmpParamIn); |
| | | logger.debug("查询用户信息返回报文:" + responseEntity); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | throw new IllegalArgumentException("未查询用户信息异常" + tmpParamIn); |
| | |
| | | throw new IllegalArgumentException("未查询微信用户"); |
| | | } |
| | | |
| | | JSONObject realUserInfo = userResult.getJSONArray("users").getJSONObject(0); |
| | | JSONObject realUserInfo = userResult.getJSONArray("data").getJSONObject(0); |
| | | |
| | | String openId = realUserInfo.getString("openId"); |
| | | // String payAppId = orderInfo.getString("payAppId"); |