提交 501e5386 作者: 张小凤

User(add)

上级 9e888238
...@@ -8,6 +8,7 @@ import lombok.Data; ...@@ -8,6 +8,7 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
...@@ -54,4 +55,10 @@ public class UserAccountSimpleDTO implements Serializable { ...@@ -54,4 +55,10 @@ public class UserAccountSimpleDTO implements Serializable {
private String tagName; private String tagName;
@ApiModelProperty(value = "用户合作标签") @ApiModelProperty(value = "用户合作标签")
private List<CooperationTagVO> cooperationTagVOS; private List<CooperationTagVO> cooperationTagVOS;
@ApiModelProperty(value = "个人简介")
private String briefIntroduction;
@ApiModelProperty(value = "封面背景图")
private String coverPicture;
@ApiModelProperty(value = "地区")
private String region;
} }
...@@ -32,17 +32,13 @@ public class UserMessageQO { ...@@ -32,17 +32,13 @@ public class UserMessageQO {
@ApiModelProperty(value = "微信昵称",example = "小红花") @ApiModelProperty(value = "微信昵称",example = "小红花")
private String nickName; private String nickName;
@ApiModelProperty(value = "地区",example = "广东省深圳市") @ApiModelProperty(value = "地区最下级id",example = "130100")
private String region; private String districtChildId;
@ApiModelProperty(value = "个人简介",example = "航拍多年") @ApiModelProperty(value = "个人简介",example = "航拍多年")
private String briefIntroduction; private String briefIntroduction;
@ApiModelProperty(value = "经度",example = "78.321313")
private BigDecimal longitude;
@ApiModelProperty(value = "纬度",example = "67.213131")
private BigDecimal latitude;
......
...@@ -80,10 +80,6 @@ public class UserAccountVO implements Serializable { ...@@ -80,10 +80,6 @@ public class UserAccountVO implements Serializable {
private Integer xzAuthStatus; private Integer xzAuthStatus;
@ApiModelProperty(value = "是否关注公众号") @ApiModelProperty(value = "是否关注公众号")
private Integer subStatus; private Integer subStatus;
@ApiModelProperty(value = "经度")
private BigDecimal longitude;
@ApiModelProperty(value = "纬度")
private BigDecimal latitude;
@ApiModelProperty(value = "地区") @ApiModelProperty(value = "地区")
private String region; private String region;
@ApiModelProperty(value = "个人简介") @ApiModelProperty(value = "个人简介")
......
...@@ -168,6 +168,14 @@ public class UserAccountController extends BaseController { ...@@ -168,6 +168,14 @@ public class UserAccountController extends BaseController {
} }
@ApiOperation(value = "内部使用获取用户信息")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = UserAccountVO.class)})
@GetMapping("interiorInfo")
public ResultBody<UserAccountVO> interiorInfo(HttpServletRequest request,Integer userAccountId) {
return ResultBody.success(userAccountService.getUserAccountById(userAccountId));
}
......
...@@ -181,4 +181,6 @@ public interface UserServiceDao { ...@@ -181,4 +181,6 @@ public interface UserServiceDao {
void appUpdateUser(UserMessageQO userMessageQO); void appUpdateUser(UserMessageQO userMessageQO);
int selectUserAccount(UserMessageQO userMessageQO); int selectUserAccount(UserMessageQO userMessageQO);
String getDistrictChild(Integer districtChildId);
} }
...@@ -81,17 +81,14 @@ public class UserAccountDO implements Serializable { ...@@ -81,17 +81,14 @@ public class UserAccountDO implements Serializable {
private Integer totalPoints; private Integer totalPoints;
@ApiModelProperty(value = "经度")
private BigDecimal longitude;
@ApiModelProperty(value = "纬度")
private BigDecimal latitude;
@ApiModelProperty(value = "地区") @ApiModelProperty(value = "地区")
private String region; private String region;
@ApiModelProperty(value = "个人简介") @ApiModelProperty(value = "个人简介")
private String briefIntroduction; private String briefIntroduction;
@ApiModelProperty(value = "封面背景图") @ApiModelProperty(value = "封面背景图")
private String coverPicture; private String coverPicture;
@ApiModelProperty(value = "地区id")
private Integer districtChildId;
public UserAccountDO(UserAccountVO userAccountVO) { public UserAccountDO(UserAccountVO userAccountVO) {
...@@ -131,8 +128,6 @@ public class UserAccountDO implements Serializable { ...@@ -131,8 +128,6 @@ public class UserAccountDO implements Serializable {
.xzAuthStatus(this.xzAuthStatus) .xzAuthStatus(this.xzAuthStatus)
.auditStatus(this.auditStatus) .auditStatus(this.auditStatus)
.totalPoints(this.totalPoints) .totalPoints(this.totalPoints)
.longitude(this.longitude)
.latitude(this.latitude)
.region(this.region) .region(this.region)
.briefIntroduction(this.briefIntroduction) .briefIntroduction(this.briefIntroduction)
.coverPicture(this.coverPicture) .coverPicture(this.coverPicture)
...@@ -143,6 +138,9 @@ public class UserAccountDO implements Serializable { ...@@ -143,6 +138,9 @@ public class UserAccountDO implements Serializable {
return UserAccountSimpleDTO.builder().id(this.id).uid(this.id + "").phoneNum(this.phoneNum).userName(this.userName).nickName(this.nickName) return UserAccountSimpleDTO.builder().id(this.id).uid(this.id + "").phoneNum(this.phoneNum).userName(this.userName).nickName(this.nickName)
.userImg(this.userImg).openid(this.openId).userSex(this.userSex).email(this.email).source(this.source).accountStatus(this.accountStatus).portType(this.portType) .userImg(this.userImg).openid(this.openId).userSex(this.userSex).email(this.email).source(this.source).accountStatus(this.accountStatus).portType(this.portType)
.companyAuthStatus(this.companyName == null ? 0 : 1).companyName(this.companyName) .companyAuthStatus(this.companyName == null ? 0 : 1).companyName(this.companyName)
.region(this.region)
.briefIntroduction(this.briefIntroduction)
.coverPicture(this.coverPicture)
.build(); .build();
} }
......
...@@ -111,6 +111,8 @@ public class UserAccountServiceImpl implements UserAccountService { ...@@ -111,6 +111,8 @@ public class UserAccountServiceImpl implements UserAccountService {
if (userAccountDO == null) { if (userAccountDO == null) {
return null; return null;
} }
String districtChild = userServiceDao.getDistrictChild(userAccountDO.getDistrictChildId());
userAccountDO.setRegion(districtChild);
UserAccountVO userAccountVO = userAccountDO.buildUserAccountVO(); UserAccountVO userAccountVO = userAccountDO.buildUserAccountVO();
ResultBody<RealNameAuthDTO> nameAuthDTOResultBody = realNameAuthService.userDetail(userAccountId); ResultBody<RealNameAuthDTO> nameAuthDTOResultBody = realNameAuthService.userDetail(userAccountId);
RealNameAuthDTO realNameAuthDTO = nameAuthDTOResultBody.getResult(); RealNameAuthDTO realNameAuthDTO = nameAuthDTOResultBody.getResult();
...@@ -158,6 +160,8 @@ public class UserAccountServiceImpl implements UserAccountService { ...@@ -158,6 +160,8 @@ public class UserAccountServiceImpl implements UserAccountService {
if (userAccountDO == null) { if (userAccountDO == null) {
return null; return null;
} }
String districtChild = userServiceDao.getDistrictChild(userAccountDO.getDistrictChildId());
userAccountDO.setRegion(districtChild);
UserAccountSimpleDTO userAccountSimpleDTO = userAccountDO.buildUserAccountSimpleDTO(); UserAccountSimpleDTO userAccountSimpleDTO = userAccountDO.buildUserAccountSimpleDTO();
CompanyAuthVO companyAuthVO = companyAuthService.getCompanyAuthByUId(userAccountId); CompanyAuthVO companyAuthVO = companyAuthService.getCompanyAuthByUId(userAccountId);
if (companyAuthVO != null) { if (companyAuthVO != null) {
......
...@@ -141,11 +141,9 @@ ...@@ -141,11 +141,9 @@
ua.update_time, ua.update_time,
pc.audit_status, pc.audit_status,
up.total_points, up.total_points,
ua.longitude,
ua.latitude,
ua.region,
ua.brief_introduction, ua.brief_introduction,
ua.cover_picture ua.cover_picture,
ua.district_child_id
FROM user_account ua FROM user_account ua
LEFT JOIN pilot_certification pc ON pc.user_account_id = ua.id LEFT JOIN pilot_certification pc ON pc.user_account_id = ua.id
LEFT JOIN user_points up ON up.user_account_id = ua.id LEFT JOIN user_points up ON up.user_account_id = ua.id
...@@ -170,7 +168,12 @@ ...@@ -170,7 +168,12 @@
parameterType="com.mmc.iuav.user.model.qo.UserAccountQO"> parameterType="com.mmc.iuav.user.model.qo.UserAccountQO">
select ua.id, ua.phone_num, rna.user_name, ua.nick_name, ua.user_img, ua.open_id, select ua.id, ua.phone_num, rna.user_name, ua.nick_name, ua.user_img, ua.open_id,
ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.disable, ua.create_time, ua.update_time, ca.auth_status as companyAuthStatus ua.port_type, ua.disable, ua.create_time, ua.update_time, ca.auth_status as companyAuthStatus,
ua.latitude,
ua.longitude,
ua.region,
ua.brief_introduction,
ua.cover_picture
from user_account ua left join company_auth ca on ua.id = ca.user_account_id left join real_name_auth rna on from user_account ua left join company_auth ca on ua.id = ca.user_account_id left join real_name_auth rna on
ua.id = rna.user_account_id ua.id = rna.user_account_id
where ua.disable = 0 where ua.disable = 0
...@@ -514,18 +517,12 @@ ...@@ -514,18 +517,12 @@
<if test="nickName!='' and nickName!=null "> <if test="nickName!='' and nickName!=null ">
nick_name=#{nickName}, nick_name=#{nickName},
</if> </if>
<if test="region!='' and region!=null"> <if test="districtChildId!=null">
region=#{region}, district_child_id=#{districtChildId},
</if> </if>
<if test="briefIntroduction!='' and briefIntroduction!=null"> <if test="briefIntroduction!='' and briefIntroduction!=null">
brief_introduction=#{briefIntroduction}, brief_introduction=#{briefIntroduction},
</if> </if>
<if test="longitude!=null">
longitude=#{longitude},
</if>
<if test="latitude!=null">
latitude=#{latitude}
</if>
</set> </set>
where id=#{id} where id=#{id}
</update> </update>
...@@ -535,4 +532,16 @@ ...@@ -535,4 +532,16 @@
select count(*) from user_account where disable=0 and nick_name=#{nickName} and id!=#{id} select count(*) from user_account where disable=0 and nick_name=#{nickName} and id!=#{id}
</select> </select>
<select id="getDistrictChild" resultType="java.lang.String">
SELECT
concat( p1.`name`, p2.`name` ) AS region
FROM
sys_district p1,
sys_district p2
WHERE
p2.LEVEL != 3
AND p1.id = p2.pid
AND p2.id = #{districtChildId}
</select>
</mapper> </mapper>
...@@ -37,4 +37,5 @@ data-filter: ...@@ -37,4 +37,5 @@ data-filter:
- /userapp/pay/feignPayUavWallet - /userapp/pay/feignPayUavWallet
- /userapp/fdd/contract/notifyStamp - /userapp/fdd/contract/notifyStamp
- /userapp/fdd/auth/notifyECertRes - /userapp/fdd/auth/notifyECertRes
- /userapp/user-account/interiorInfo
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论