记得上下班打卡 | git大法好,push需谨慎

Commit 37bb6953 authored by GaoHu's avatar GaoHu

exit

parent 446fa0de
...@@ -36,6 +36,9 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS ...@@ -36,6 +36,9 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
@Autowired @Autowired
QueueUtils queueUtils; QueueUtils queueUtils;
@Autowired
GoblinAnticipateUtils goblinAnticipateUtils;
@Override @Override
public ResponseDto<Object> userAbout(String skuId) { public ResponseDto<Object> userAbout(String skuId) {
//查询该skuId是否能被预约 //查询该skuId是否能被预约
...@@ -45,7 +48,6 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS ...@@ -45,7 +48,6 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
if (!anticipateValueVo.getState().equals(1)) { if (!anticipateValueVo.getState().equals(1)) {
return ResponseDto.failure("该商品预约尚未开始或已经结束,不可预约!"); return ResponseDto.failure("该商品预约尚未开始或已经结束,不可预约!");
} }
GoblinAnticipateUtils goblinAnticipateUtils = new GoblinAnticipateUtils();
AdamUserInfoVo userInfo = goblinAnticipateUtils.getUserInfo(); AdamUserInfoVo userInfo = goblinAnticipateUtils.getUserInfo();
if (userInfo==null){ if (userInfo==null){
return ResponseDto.failure("登陆信息有误"); return ResponseDto.failure("登陆信息有误");
......
...@@ -31,16 +31,16 @@ public class GoblinAnticipateUtils { ...@@ -31,16 +31,16 @@ public class GoblinAnticipateUtils {
header.add("Authorization", "Bearer " + CurrentUtil.getToken()); header.add("Authorization", "Bearer " + CurrentUtil.getToken());
header.add("Accept", "application/json;charset=UTF-8"); header.add("Accept", "application/json;charset=UTF-8");
String returnData = HttpUtil.post(adamUrl+"/adam/user/info",null, header); String returnData = HttpUtil.post(adamUrl + "/adam/user/info", null, header);
ResponseDto<AdamUserProfileVo> innerReturnVo = JsonUtils.fromJson(returnData, new TypeReference<ResponseDto<AdamUserProfileVo>>() { ResponseDto<AdamUserProfileVo> innerReturnVo = JsonUtils.fromJson(returnData, new TypeReference<ResponseDto<AdamUserProfileVo>>() {
}); });
if (innerReturnVo.getData()!=null){ if (innerReturnVo.getData() != null) {
return innerReturnVo.getData().getUserInfo(); return innerReturnVo.getData().getUserInfo();
} }
log.info("post url:{}<----->Authorization:{}",adamUrl+" /adam/user/info",CurrentUtil.getToken()); log.info("post url:{}<----->Authorization:{}", adamUrl + " /adam/user/info", CurrentUtil.getToken());
return null; return null;
} catch (Exception e) { } catch (Exception e) {
log.info("post url:{}<----->Authorization:{}",adamUrl+" /adam/user/info",CurrentUtil.getToken()); log.info("post url:{}<----->Authorization:{}", adamUrl + " /adam/user/info", CurrentUtil.getToken());
log.error("获取用户头像失败", e); log.error("获取用户头像失败", e);
return null; return null;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment