| | |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.PayUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } else { |
| | | openId = map.get("openid").toString(); |
| | | } |
| | | String useId = "-1"; |
| | | if(!StringUtil.isEmpty(openId)) { |
| | | |
| | | responseEntity = getUserInfoByOpenId(restTemplate, openId); |
| | | responseEntity = getUserInfoByOpenId(restTemplate, openId); |
| | | |
| | | logger.debug("查询用户信息返回报文:" + responseEntity); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | throw new IllegalArgumentException("根绝openId 查询用户信息异常" + openId); |
| | | logger.debug("查询用户信息返回报文:" + responseEntity); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | throw new IllegalArgumentException("根绝openId 查询用户信息异常" + openId); |
| | | } |
| | | |
| | | JSONObject userResult = JSONObject.parseObject(responseEntity.getBody()); |
| | | JSONObject realUserInfo = userResult.getJSONArray("data").getJSONObject(0); |
| | | useId = realUserInfo.getString("userId"); |
| | | } |
| | | |
| | | JSONObject userResult = JSONObject.parseObject(responseEntity.getBody()); |
| | | JSONObject realUserInfo = userResult.getJSONArray("data").getJSONObject(0); |
| | | String useId = realUserInfo.getString("userId"); |
| | | |
| | | //查询用户ID |
| | | JSONObject paramIn = new JSONObject(); |