Commit 3a21d0b1 authored by 吴泽佳's avatar 吴泽佳

个人主页

parent e3616ad3
...@@ -15,10 +15,10 @@ import java.util.List; ...@@ -15,10 +15,10 @@ import java.util.List;
* @create: 2021-07-15 14:37 * @create: 2021-07-15 14:37
**/ **/
@Data @Data
@Builder
@ApiModel(description = "用户信息 圈子使用") @ApiModel(description = "用户信息 圈子使用")
public class UserInfoNew implements Serializable { public class UserInfoNew implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主页等级 1普通主页 2首席投顾主页 3机构主页") @ApiModelProperty("主页等级 1普通主页 2首席投顾主页 3机构主页")
private Integer personalCenterType; private Integer personalCenterType;
...@@ -85,59 +85,11 @@ public class UserInfoNew implements Serializable { ...@@ -85,59 +85,11 @@ public class UserInfoNew implements Serializable {
private String workshopIntroduction;//工作室简介 private String workshopIntroduction;//工作室简介
//↓↓↓↓↓首席投顾↓↓↓↓↓↓ //↓↓↓↓↓首席投顾↓↓↓↓↓↓
@ApiModelProperty(value = "姓名") @ApiModelProperty(value = "首席投顾")
private String userName; private UserInfoNewChief userInfoNewChief;
@ApiModelProperty(value = "头像背图url")
private String backImageUrl; //↓↓↓↓↓机构用户信息↓↓↓↓↓↓
@ApiModelProperty(value = "是否展示专访视频 0不展示 1展示") @ApiModelProperty(value = "机构用户信息")
private Integer interviewVideoIsShow; private UserInfoNewOrg userInfoNewOrg;
@ApiModelProperty(value = "专访视频 标题")
private String interviewVideoTitle;
@ApiModelProperty(value = "专访视频 url")
private String interviewVideoUrl;
@ApiModelProperty(value = "个人简介")
private String personalProfile;
@ApiModelProperty(value = "管理规模")
private String managementScale;
@ApiModelProperty(value = "从业年限 (单位:年)")
private String workingYears;
@ApiModelProperty(value = "投资理念")
private String investmentPhilosophy;
@ApiModelProperty(value = "擅长领域")
private String areasOfExpertise;
@ApiModelProperty(value = "证书 json")
private String credentials;
@ApiModelProperty(value = "成功案例客户id")
private String clientId;
//↓↓↓↓ 机构 ↓↓↓↓
@ApiModelProperty(value = "申请用户id")
private String applyUserId;
@ApiModelProperty(value = "机构id")
private String userIdOrg;
@ApiModelProperty(value = "公司名称")
private String companyName;
@ApiModelProperty(value = "公司全称")
private String companyFullName;
@ApiModelProperty(value = "营业执照账号")
private String businessLicenseNumber;
@ApiModelProperty(value = "营业执照 图片url")
private String businessLicenseImageUrl;
@ApiModelProperty(value = "机构用户身份公函 url")
private String identityLetterUrl;
@ApiModelProperty(value = "机构认证信息登记表 url")
private String orgAuthInfoFormUrl;
@ApiModelProperty(value = "运营人员 职位")
private String position;
@ApiModelProperty(value = "审核状态 1初始提交 2审核不通过 3审核通过")
private Integer auditStatus;
@ApiModelProperty(value = "认证名称")
private String certName;
@ApiModelProperty(value = "是否匹配现有基金公司 0不匹配 1匹配")
private Integer isExistOrg;
@ApiModelProperty(value = "所属基金公司id")
private String belongOrgId;
@ApiModelProperty(value = "所属基金公司类型 0公募 1私募")
private Integer belongOrgType;
} }
\ No newline at end of file
package com.tanpu.community.api.beans.vo.feign.fatools;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable;
/**
* @description: 用户信息 圈子使用
* @author: zejia zj wu
* @create: 2021-07-15 14:37
**/
@Data
@Builder
@ApiModel(description = "用户信息 首席投顾专用信息")
public class UserInfoNewChief implements Serializable {
private static final long serialVersionUID = 1L;
//↓↓↓↓↓首席投顾↓↓↓↓↓↓
@ApiModelProperty(value = "姓名")
private String userName;
@ApiModelProperty(value = "头像背图url")
private String backImageUrl;
@ApiModelProperty(value = "是否展示专访视频 0不展示 1展示")
private Integer interviewVideoIsShow;
@ApiModelProperty(value = "专访视频 标题")
private String interviewVideoTitle;
@ApiModelProperty(value = "专访视频 url")
private String interviewVideoUrl;
@ApiModelProperty(value = "个人简介")
private String personalProfile;
@ApiModelProperty(value = "管理规模")
private String managementScale;
@ApiModelProperty(value = "从业年限 (单位:年)")
private String workingYears;
@ApiModelProperty(value = "投资理念")
private String investmentPhilosophy;
@ApiModelProperty(value = "擅长领域")
private String areasOfExpertise;
@ApiModelProperty(value = "证书 json")
private String credentials;
@ApiModelProperty(value = "成功案例客户id")
private String clientId;
}
\ No newline at end of file
package com.tanpu.community.api.beans.vo.feign.fatools;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable;
/**
* @description: 用户信息 机构
* @author: zejia zj wu
* @create: 2021-07-15 14:37
**/
@Data
@Builder
@ApiModel(description = "用户信息 机构")
public class UserInfoNewOrg implements Serializable {
private static final long serialVersionUID = 1L;
//↓↓↓↓ 机构 ↓↓↓↓
@ApiModelProperty(value = "申请用户id")
private String applyUserId;
@ApiModelProperty(value = "机构id")
private String userIdOrg;
@ApiModelProperty(value = "公司名称")
private String companyName;
@ApiModelProperty(value = "公司全称")
private String companyFullName;
@ApiModelProperty(value = "营业执照账号")
private String businessLicenseNumber;
@ApiModelProperty(value = "营业执照 图片url")
private String businessLicenseImageUrl;
@ApiModelProperty(value = "机构用户身份公函 url")
private String identityLetterUrl;
@ApiModelProperty(value = "机构认证信息登记表 url")
private String orgAuthInfoFormUrl;
@ApiModelProperty(value = "运营人员 职位")
private String position;
@ApiModelProperty(value = "审核状态 1初始提交 2审核不通过 3审核通过")
private Integer auditStatus;
@ApiModelProperty(value = "认证名称")
private String certName;
@ApiModelProperty(value = "是否匹配现有基金公司 0不匹配 1匹配")
private Integer isExistOrg;
@ApiModelProperty(value = "所属基金公司id")
private String belongOrgId;
@ApiModelProperty(value = "所属基金公司类型 0公募 1私募")
private Integer belongOrgType;
}
\ No newline at end of file
...@@ -36,6 +36,13 @@ public class FeignBackClientForCourse implements FallbackFactory<FeignClientForC ...@@ -36,6 +36,13 @@ public class FeignBackClientForCourse implements FallbackFactory<FeignClientForC
log.error("FeignClientForCourse.getCoursePackageDetailInfo-查询课程包id:{}", id); log.error("FeignClientForCourse.getCoursePackageDetailInfo-查询课程包id:{}", id);
return CommonResp.failed("调用getCoursePackageDetailInfo失败"); return CommonResp.failed("调用getCoursePackageDetailInfo失败");
} }
@Override
public CommonResp<Integer> getStudyCourseCount(String userId) {
log.error("请求信息", throwable);
log.error("FeignClientForCourse.getStudyCourseCount-查询userid:{}", userId);
return CommonResp.failed("调用getStudyCourseCount失败");
}
}; };
} }
} }
...@@ -32,4 +32,8 @@ public interface FeignClientForCourse { ...@@ -32,4 +32,8 @@ public interface FeignClientForCourse {
@ApiOperation("详情页信息") @ApiOperation("详情页信息")
@GetMapping("/course/detail") @GetMapping("/course/detail")
CommonResp<CoursePackageDetail> getCoursePackageDetailInfo(@ApiParam(value = "课程包id", required = true) @RequestParam("id") String id); CommonResp<CoursePackageDetail> getCoursePackageDetailInfo(@ApiParam(value = "课程包id", required = true) @RequestParam("id") String id);
@ApiOperation("查询已学习课程包总数")
@GetMapping("/course/getStudyCourseCount")
CommonResp<Integer> getStudyCourseCount(@ApiParam(value = "用户id") @RequestParam(value = "userId",required = false) String userId);
} }
...@@ -31,12 +31,6 @@ public class FeignBackClientForTanpuroom implements FallbackFactory<FeignClientF ...@@ -31,12 +31,6 @@ public class FeignBackClientForTanpuroom implements FallbackFactory<FeignClientF
return null; return null;
} }
@Override
public CommonResp<Integer> myOrderCount(String userId) {
log.error("请求信息", throwable);
log.error("FeignBackClientForTanpuroom.myOrderCount-userId:{}", userId);
return null;
}
}; };
} }
} }
...@@ -28,7 +28,4 @@ public interface FeignClientForTanpuroom { ...@@ -28,7 +28,4 @@ public interface FeignClientForTanpuroom {
@PostMapping(value = "/curriculumInfos/detail", produces = {"application/json"}) @PostMapping(value = "/curriculumInfos/detail", produces = {"application/json"})
CommonResp<CurriculumDetailVo> queryCurriculumDetail(@RequestBody CurriCulumInfoDetailDto req); CommonResp<CurriculumDetailVo> queryCurriculumDetail(@RequestBody CurriCulumInfoDetailDto req);
@ApiOperation("已购总数")
@GetMapping("/my/order/count")
CommonResp<Integer> myOrderCount(@ApiParam(value = "userId", required = true) @RequestParam("userId") String userId);
} }
...@@ -24,6 +24,7 @@ import com.tanpu.community.dao.mapper.fund.CompanyInfoMapper; ...@@ -24,6 +24,7 @@ import com.tanpu.community.dao.mapper.fund.CompanyInfoMapper;
import com.tanpu.community.dao.mapper.fund.FundInfoMapper; import com.tanpu.community.dao.mapper.fund.FundInfoMapper;
import com.tanpu.community.dao.mapper.jydb.MfAdvisorscalerankMapper; import com.tanpu.community.dao.mapper.jydb.MfAdvisorscalerankMapper;
import com.tanpu.community.dao.mapper.jydb.MfInvestadvisoroutlineMapper; import com.tanpu.community.dao.mapper.jydb.MfInvestadvisoroutlineMapper;
import com.tanpu.community.feign.course.FeignClientForCourse;
import com.tanpu.community.feign.diagnose.FeignClientForDiagnose; import com.tanpu.community.feign.diagnose.FeignClientForDiagnose;
import com.tanpu.community.feign.fatools.FeignClientForFatools; import com.tanpu.community.feign.fatools.FeignClientForFatools;
import com.tanpu.community.feign.tanpuroom.FeignClientForTanpuroom; import com.tanpu.community.feign.tanpuroom.FeignClientForTanpuroom;
...@@ -46,9 +47,9 @@ import java.util.stream.Collectors; ...@@ -46,9 +47,9 @@ import java.util.stream.Collectors;
@Service @Service
public class HomePageManager { public class HomePageManager {
@Autowired @Resource
private FollowRelService followRelService; private FollowRelService followRelService;
@Autowired @Resource
private UserInfoService userInfoService; private UserInfoService userInfoService;
@Resource @Resource
private FeignClientForFatools feignClientForFatools; private FeignClientForFatools feignClientForFatools;
...@@ -66,13 +67,14 @@ public class HomePageManager { ...@@ -66,13 +67,14 @@ public class HomePageManager {
private FeignClientForTanpuroom feignClientForTanpuroom; private FeignClientForTanpuroom feignClientForTanpuroom;
@Resource @Resource
private FeignClientForDiagnose feignClientForDiagnose; private FeignClientForDiagnose feignClientForDiagnose;
@Resource
private FeignClientForCourse feignClientForCourse;
//查询 个人中心 相关信息 //查询 个人中心 相关信息
public UserInfoNew queryUsersListNew(String userIdMyself, String userId) { public UserInfoNew queryUsersListNew(String userIdMyself, String userId) {
CommonResp<UserInfoNew> userInfoNewCommonResp = feignClientForFatools.queryUsersListNew(StringUtils.isNotBlank(userId) ? userId : userIdMyself); CommonResp<UserInfoNew> queryUsersListNew = feignClientForFatools.queryUsersListNew(StringUtils.isNotBlank(userId) ? userId : userIdMyself);
if (userInfoNewCommonResp.isNotSuccess()) new BizException("内部接口调用失败"); if (queryUsersListNew.isNotSuccess()) new BizException("内部接口调用失败");
UserInfoNew userInfoNew = userInfoNewCommonResp.getData(); UserInfoNew userInfoNew = queryUsersListNew.getData();
// 关注 按钮的显示逻辑 // 关注 按钮的显示逻辑
if (StringUtils.isNotBlank(userId)) { //查询别人的个人主页 if (StringUtils.isNotBlank(userId)) { //查询别人的个人主页
userInfoNew.setIsShowFollowButton(0); userInfoNew.setIsShowFollowButton(0);
...@@ -97,37 +99,37 @@ public class HomePageManager { ...@@ -97,37 +99,37 @@ public class HomePageManager {
// 首席投顾 添加专栏信息 (前端自己取) // 首席投顾 添加专栏信息 (前端自己取)
// 成功案例客户 // 成功案例客户
// 默认显示该投顾管理的客户里,总资产最高的客户 // 默认显示该投顾管理的客户里,总资产最高的客户
if (StringUtils.isBlank(userInfoNew.getClientId())) { if (StringUtils.isBlank(userInfoNew.getUserInfoNewChief().getClientId())) {
List<Customer> customers = queryUserCustomerList(userId); List<Customer> customers = queryUserCustomerList(userId);
Optional<Customer> first = customers.stream().sorted(Comparator.comparing(Customer::getTotalMarket)).findFirst(); Optional<Customer> first = customers.stream().max(Comparator.comparing(Customer::getTotalMarket));
if (first.isPresent()) { if (first.isPresent()) {
userInfoNew.setClientId(first.get().getUserId()); userInfoNew.getUserInfoNewChief().setClientId(first.get().getUserId());
} else { } else {
userInfoNew.setClientId(null); userInfoNew.getUserInfoNewChief().setClientId(null);
} }
} }
} else if (2 == userInfoNew.getUserType()){ } else if (2 == userInfoNew.getUserType()){
// 机构账号 // 机构账号
userInfoNew.setPersonalCenterType(3); userInfoNew.setPersonalCenterType(3);
if (0 == userInfoNew.getBelongOrgType() && StringUtils.isNotBlank(userInfoNew.getBelongOrgId())){ // 公募 if (0 == userInfoNew.getUserInfoNewOrg().getBelongOrgType() && StringUtils.isNotBlank(userInfoNew.getUserInfoNewOrg().getBelongOrgId())){ // 公募
//设置 基金数 //设置 基金数
MfAdvisorscalerank mfAdvisorscalerank = mfAdvisorscalerankMapper.selectOne(new LambdaQueryWrapper<MfAdvisorscalerank>() MfAdvisorscalerank mfAdvisorscalerank = mfAdvisorscalerankMapper.selectOne(new LambdaQueryWrapper<MfAdvisorscalerank>()
.eq(MfAdvisorscalerank::getInvestadvisorcode, userInfoNew.getBelongOrgId()) .eq(MfAdvisorscalerank::getInvestadvisorcode, userInfoNew.getUserInfoNewOrg().getBelongOrgId())
.last("limit 1")); .last("limit 1"));
userInfoNew.setFundNumber(ObjectUtils.anyNotNull(mfAdvisorscalerank) ? mfAdvisorscalerank.getTotalfundn() : null); userInfoNew.setFundNumber(ObjectUtils.anyNotNull(mfAdvisorscalerank) ? mfAdvisorscalerank.getTotalfundn() : null);
//设置成立时间 和 备案编号(公募没有备案编号) //设置成立时间 和 备案编号(公募没有备案编号)
MfInvestadvisoroutline mfInvestadvisoroutline = mfInvestadvisoroutlineMapper.selectOne(new LambdaQueryWrapper<MfInvestadvisoroutline>() MfInvestadvisoroutline mfInvestadvisoroutline = mfInvestadvisoroutlineMapper.selectOne(new LambdaQueryWrapper<MfInvestadvisoroutline>()
.eq(MfInvestadvisoroutline::getInvestadvisorcode, userInfoNew.getBelongOrgId()) .eq(MfInvestadvisoroutline::getInvestadvisorcode, userInfoNew.getUserInfoNewOrg().getBelongOrgId())
.last("limit 1")); .last("limit 1"));
userInfoNew.setFounded(ObjectUtils.anyNotNull(mfInvestadvisoroutline) ? mfInvestadvisoroutline.getEstablishmentdate().getTime() : null); userInfoNew.setFounded(ObjectUtils.anyNotNull(mfInvestadvisoroutline) ? mfInvestadvisoroutline.getEstablishmentdate().getTime() : null);
} }
if(1 == userInfoNew.getBelongOrgType() && StringUtils.isNotBlank(userInfoNew.getBelongOrgId())){ // 私募 if(1 == userInfoNew.getUserInfoNewOrg().getBelongOrgType() && StringUtils.isNotBlank(userInfoNew.getUserInfoNewOrg().getBelongOrgId())){ // 私募
//设置 基金数 //设置 基金数
Integer integer = fundInfoMapper.selectCount(new LambdaQueryWrapper<FundInfo>().eq(FundInfo::getTrustId, userInfoNew.getBelongOrgId())); Integer integer = fundInfoMapper.selectCount(new LambdaQueryWrapper<FundInfo>().eq(FundInfo::getTrustId, userInfoNew.getUserInfoNewOrg().getBelongOrgId()));
userInfoNew.setFundNumber(integer); userInfoNew.setFundNumber(integer);
//设置成立时间 和 备案编号 //设置成立时间 和 备案编号
CompanyInfo companyInfo = companyInfoMapper.selectById(userInfoNew.getBelongOrgId()); CompanyInfo companyInfo = companyInfoMapper.selectById(userInfoNew.getUserInfoNewOrg().getBelongOrgId());
if (ObjectUtils.anyNotNull(companyInfo)) { if (ObjectUtils.anyNotNull(companyInfo)) {
userInfoNew.setFounded(companyInfo.getEstablishDate().getTime()); userInfoNew.setFounded(companyInfo.getEstablishDate().getTime());
userInfoNew.setRecordNumber(companyInfo.getRegisterNumber()); userInfoNew.setRecordNumber(companyInfo.getRegisterNumber());
...@@ -153,8 +155,8 @@ public class HomePageManager { ...@@ -153,8 +155,8 @@ public class HomePageManager {
} else { } else {
//普通主页 //普通主页
userInfoNew.setPersonalCenterType(1); userInfoNew.setPersonalCenterType(1);
//设置课程数 //设置课程数(学习数)
CommonResp<Integer> integerCommonResp = feignClientForTanpuroom.myOrderCount(userId); CommonResp<Integer> integerCommonResp = feignClientForCourse.getStudyCourseCount(userId);
if (integerCommonResp.isSuccess()) userInfoNew.setCourseNumber(integerCommonResp.getData()); if (integerCommonResp.isSuccess()) userInfoNew.setCourseNumber(integerCommonResp.getData());
} }
return userInfoNew; return userInfoNew;
......
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