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

Commit e74b70cd authored by 张国柄's avatar 张国柄

~API:用户个人信息+会员卡信息;

parent 4b54fe5d
package com.liquidnet.service.adam.dto.vo; package com.liquidnet.service.adam.dto.vo;
import com.liquidnet.commons.lang.util.SensitizeUtil;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
@ApiModel(value = "AdamLoginInfoVo", description = "登录成功响应数据") @ApiModel(value = "AdamLoginInfoVo", description = "登录成功响应数据")
public class AdamLoginInfoVo implements Serializable, Cloneable { public class AdamLoginInfoVo implements Serializable, Cloneable {
......
package com.liquidnet.service.adam.dto.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(value = "AdamUserProfileVo", description = "个人信息响应数据")
@Data
public class AdamUserProfileVo implements java.io.Serializable, Cloneable {
private static final long serialVersionUID = 3782062486028972984L;
@ApiModelProperty(position = 11, value = "用户信息")
private AdamUserInfoVo userInfo;
@ApiModelProperty(position = 12, value = "实名信息")
private AdamRealInfoVo realNameInfo;
@ApiModelProperty(position = 13, value = "用户第三方账号信息")
private List<AdamThirdPartInfoVo> thirdPartInfo;
@ApiModelProperty(position = 14, value = "会员信息")
private AdamMemberSimpleVo memberVo;
@ApiModelProperty(position = 15, value = "用户会员信息")
private AdamUserMemberVo userMemberVo;
@ApiModelProperty(position = 16, value = "会员卡信息")
private AdamMemberJoinusVo memberJoinusVo;
private static final AdamUserProfileVo obj = new AdamUserProfileVo();
public static AdamUserProfileVo getNew() {
try {
return (AdamUserProfileVo) obj.clone();
} catch (CloneNotSupportedException e) {
return new AdamUserProfileVo();
}
}
}
...@@ -365,22 +365,54 @@ public class AdamUserController { ...@@ -365,22 +365,54 @@ public class AdamUserController {
return ResponseDto.success(adamRdmService.getThirdPartVoListByUid(currentUid)); return ResponseDto.success(adamRdmService.getThirdPartVoListByUid(currentUid));
} }
// @ApiOperationSupport(order = 9)
// @ApiOperation(value = "个人信息")
// @PostMapping(value = {"info"})
// public ResponseDto<Map<String, Object>> info() {
// String currentUid = CurrentUtil.getCurrentUid();
//
// Map<String, Object> map = CollectionUtil.mapStringObject();
// AdamUserInfoVo userInfoVo = adamRdmService.getUserInfoVoByUid(currentUid);
// map.put("realNameInfo", adamRdmService.getRealInfoVoByUid(currentUid));
// map.put("thirdPartInfo", adamRdmService.getThirdPartVoListByUid(currentUid));
// AdamUserMemberVo userMemberVo = adamRdmService.getUserMemberVoByUid(currentUid);
// map.put("userMemberVo", userMemberVo);
// map.put("userInfo", adamRdmService.ratingProvince(userInfoVo).desensitize(reviewUserInfo).rating(userMemberVo));
// map.put("memberVo", adamRdmService.getMemberSimpleVo());
//
// return ResponseDto.success(map);
// }
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
@ApiOperation(value = "个人信息") @ApiOperation(value = "个人信息")
@PostMapping(value = {"info"}) @PostMapping(value = {"info"})
public ResponseDto<Map<String, Object>> info() { public ResponseDto<AdamUserProfileVo> info() {
String currentUid = CurrentUtil.getCurrentUid(); String currentUid = CurrentUtil.getCurrentUid();
AdamUserProfileVo userProfileVo = AdamUserProfileVo.getNew();
userProfileVo.setRealNameInfo(adamRdmService.getRealInfoVoByUid(currentUid));
userProfileVo.setThirdPartInfo(adamRdmService.getThirdPartVoListByUid(currentUid));
userProfileVo.setMemberVo(adamRdmService.getMemberSimpleVo());
userProfileVo.setUserMemberVo(adamRdmService.getUserMemberVoByUid(currentUid));
Map<String, Object> map = CollectionUtil.mapStringObject();
AdamUserInfoVo userInfoVo = adamRdmService.getUserInfoVoByUid(currentUid); AdamUserInfoVo userInfoVo = adamRdmService.getUserInfoVoByUid(currentUid);
map.put("realNameInfo", adamRdmService.getRealInfoVoByUid(currentUid)); userProfileVo.setUserInfo(userInfoVo);
map.put("thirdPartInfo", adamRdmService.getThirdPartVoListByUid(currentUid));
AdamUserMemberVo userMemberVo = adamRdmService.getUserMemberVoByUid(currentUid); AdamMemberJoinusVo memberJoinusVo = adamRdmService.getMemberJoinusVo();
map.put("userMemberVo", userMemberVo); if (org.springframework.util.StringUtils.startsWithIgnoreCase(userInfoVo.getQrCode(), "lN")) {
map.put("userInfo", adamRdmService.ratingProvince(userInfoVo).desensitize(reviewUserInfo).rating(userMemberVo)); memberJoinusVo.setState(0);
map.put("memberVo", adamRdmService.getMemberSimpleVo()); } else {
AdamUserMemberVo userMemberVo = adamRdmService.getUserMemberVoByUid(currentUid);
return ResponseDto.success(map); memberJoinusVo.setState(1);
memberJoinusVo.setType(null != userMemberVo && userMemberVo.isActive() ? 50 : 10);
memberJoinusVo.setQrCode(userInfoVo.getQrCode());
memberJoinusVo.setCardface(adamRdmService.getMemberCardface(memberJoinusVo.getType()));
}
userProfileVo.setMemberJoinusVo(memberJoinusVo);
return ResponseDto.success(userProfileVo);
} }
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
......
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