|
@ -249,21 +249,24 @@ public class AdminPrizeServiceImpl extends ServiceImpl<AdminPrizeMapper, Prize> |
|
|
// userDetail.setIsFixed(1); |
|
|
// userDetail.setIsFixed(1); |
|
|
// userDetail.setIsDel(0); |
|
|
// userDetail.setIsDel(0); |
|
|
// adminUserDetailMapper.insert(userDetail); |
|
|
// adminUserDetailMapper.insert(userDetail); |
|
|
String url = apiConfig.getHljwUrl() + "/api/v2/member/info"; |
|
|
|
|
|
String jwcode = fixUserDto.getJwcode(); |
|
|
|
|
|
// 准备请求参数 |
|
|
|
|
|
Map<String, String> params = new HashMap<>(); |
|
|
|
|
|
params.put("jwcode", jwcode); |
|
|
|
|
|
// 调用接口 |
|
|
|
|
|
String response = HttpUtils.postUrlencoded(url, params); |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(response); |
|
|
|
|
|
String locMarket = rootNode.path("data").path("loc_market").asText(); |
|
|
|
|
|
if(rootNode.path("code").asInt() == 401){ |
|
|
|
|
|
throw new BusinessException(400, "精网号错误"); |
|
|
|
|
|
|
|
|
// String url = apiConfig.getHljwUrl() + "/api/v2/member/info"; |
|
|
|
|
|
// String jwcode = fixUserDto.getJwcode(); |
|
|
|
|
|
// // 准备请求参数 |
|
|
|
|
|
// Map<String, String> params = new HashMap<>(); |
|
|
|
|
|
// params.put("jwcode", jwcode); |
|
|
|
|
|
// // 调用接口 |
|
|
|
|
|
// String response = HttpUtils.postUrlencoded(url, params); |
|
|
|
|
|
// JsonNode rootNode = objectMapper.readTree(response); |
|
|
|
|
|
// String locMarket = rootNode.path("data").path("loc_market").asText(); |
|
|
|
|
|
// if(rootNode.path("code").asInt() == 401){ |
|
|
|
|
|
// throw new BusinessException(400, "精网号错误"); |
|
|
|
|
|
// } |
|
|
|
|
|
String locMarket = adminUserMapper.selectLocMarketByJwcode(fixUserDto.getJwcode()); |
|
|
|
|
|
if (locMarket == null) { |
|
|
|
|
|
throw new BusinessException(400,"精网号错误"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
// 1. 检查用户是否存在,不存在则创建 |
|
|
// 1. 检查用户是否存在,不存在则创建 |
|
|
Long userId = adminUserMapper.selectByJwcode(fixUserDto.getJwcode()); |
|
|
Long userId = adminUserMapper.selectByJwcode(fixUserDto.getJwcode()); |
|
|