Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
b49984c1
Commit
b49984c1
authored
Jul 22, 2021
by
吴泽佳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加相关枚举值
parent
882a4927
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
225 additions
and
12 deletions
+225
-12
FundCompanyTypeEnum.java
...va/com/tanpu/community/api/enums/FundCompanyTypeEnum.java
+36
-0
PersonalCenterTypeEnum.java
...com/tanpu/community/api/enums/PersonalCenterTypeEnum.java
+31
-0
ShowFollowStatusEnum.java
...a/com/tanpu/community/api/enums/ShowFollowStatusEnum.java
+36
-0
UserLevelEnum.java
...ain/java/com/tanpu/community/api/enums/UserLevelEnum.java
+80
-0
UserTypeEnum.java
...main/java/com/tanpu/community/api/enums/UserTypeEnum.java
+31
-0
HomePageManager.java
...ain/java/com/tanpu/community/manager/HomePageManager.java
+11
-12
No files found.
community-api/src/main/java/com/tanpu/community/api/enums/FundCompanyTypeEnum.java
0 → 100644
View file @
b49984c1
package
com
.
tanpu
.
community
.
api
.
enums
;
/**
* @program: wealthgrow-new
* @description: 基金公司类型枚举
* @author: zejia zj wu
* @create: 2021-07-22 11:24
**/
public
enum
FundCompanyTypeEnum
{
PUBLIC
(
0
,
"公募"
),
PRIVATE
(
1
,
"私募"
);
private
Integer
code
;
private
String
type
;
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
FundCompanyTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/PersonalCenterTypeEnum.java
0 → 100644
View file @
b49984c1
package
com
.
tanpu
.
community
.
api
.
enums
;
public
enum
PersonalCenterTypeEnum
{
GENERAL
(
1
,
"普通主页"
),
CHIEF
(
2
,
"首席投顾主页"
),
ORG
(
3
,
"机构主页"
);
private
Integer
code
;
private
String
type
;
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
PersonalCenterTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/ShowFollowStatusEnum.java
0 → 100644
View file @
b49984c1
package
com
.
tanpu
.
community
.
api
.
enums
;
/**
* @program: wealthgrow-new
* @description: 圈子关注状态枚举
* @author: zejia zj wu
* @create: 2021-07-22 11:15
**/
public
enum
ShowFollowStatusEnum
{
NOT_FOLLOWED
(
0
,
"未关注"
),
FOLLOWED
(
1
,
"已关注"
);
private
Integer
code
;
private
String
type
;
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
ShowFollowStatusEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/UserLevelEnum.java
0 → 100644
View file @
b49984c1
package
com
.
tanpu
.
community
.
api
.
enums
;
import
com.tanpu.common.api.CommonResp
;
import
javax.validation.constraints.NotNull
;
/**
* @program: wealthgrow-new
* @description: 用户权限等级
* @author: zejia zj wu
* @create: 2021-07-22 10:59
**/
public
enum
UserLevelEnum
{
USER_TOURIST
(
0
,
"游客"
,
"游客"
),
USER_REGISTERED
(
1
,
"注册会员"
,
"注册会员"
),
/**
* 如果当前登录用户是投资人且要求权限大于投资人 返回 actionCode T1
* 弹框提示
* 该功能只对{levelGrade}开放哦
* 如需更改认证信息,可前往“我的”进行重新认证
* 点击「知道了」关闭弹框
*/
USER_INVESTOR
(
10
,
"投资人"
,
"普通会员"
,
"D2"
),
/**
* tamp理顾问卷 D2
*/
USER_FINANCIAL_PRACTITIONER
(
20
,
"探普理顾"
,
"投资顾问"
,
"D2"
),
/**
* tamp专家理顾问卷 D3
*/
USER_FINANCIAL_ADVISOR
(
30
,
"探普专家理顾"
,
"专家投顾"
,
"D3"
),
/**
* 发生基金交易 (系统自动判断) T0 (提示文案: 该功能只对完成交易的探普理财师开放)
*/
USER_SENIOR_FINANCIAL_ADVISER
(
40
,
"交易理财师"
,
"专家投顾"
,
"T0"
),
/**
* 探普签约理财师
*/
USER_CHIEF_FINANCIAL_ADVISER
(
50
,
"首席投顾"
,
"首席投顾"
,
"T0"
),
/**
* 白名单用户
*/
USER_WHITE_LIST
(
999
,
"白名单用户"
,
"特定用户"
,
"T0"
),
;
private
int
code
;
private
String
name
;
private
String
label
;
private
String
actionCode
;
UserLevelEnum
(
int
code
,
String
name
,
String
label
)
{
this
.
code
=
code
;
this
.
name
=
name
;
this
.
label
=
label
;
}
UserLevelEnum
(
int
code
,
String
name
,
String
label
,
String
functionCode
)
{
this
.
code
=
code
;
this
.
name
=
name
;
this
.
label
=
label
;
this
.
actionCode
=
functionCode
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
public
String
getLabel
()
{
return
label
;
}
public
String
getActionCode
()
{
return
actionCode
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/UserTypeEnum.java
0 → 100644
View file @
b49984c1
package
com
.
tanpu
.
community
.
api
.
enums
;
public
enum
UserTypeEnum
{
USER_GENERAL
(
1
,
"普通个人"
),
USER_ORG
(
2
,
"机构账号"
),
USER_ORG_PERSONNEL
(
3
,
"机构人员"
);
private
Integer
code
;
private
String
type
;
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
UserTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
}
community-service/src/main/java/com/tanpu/community/manager/HomePageManager.java
View file @
b49984c1
...
...
@@ -11,8 +11,7 @@ import com.tanpu.community.api.beans.req.page.Page;
import
com.tanpu.community.api.beans.resp.Customer
;
import
com.tanpu.community.api.beans.vo.feign.fatools.UserInfoNew
;
import
com.tanpu.community.api.beans.vo.feign.fatools.UserInfoOrg
;
import
com.tanpu.community.api.enums.OperationTypeEnum
;
import
com.tanpu.community.api.enums.QueryFollowTypeEnum
;
import
com.tanpu.community.api.enums.*
;
import
com.tanpu.community.dao.entity.community.FollowRelEntity
;
import
com.tanpu.community.dao.entity.fund.CompanyInfo
;
import
com.tanpu.community.dao.entity.fund.FundInfo
;
...
...
@@ -77,9 +76,9 @@ public class HomePageManager {
// 关注 按钮的显示逻辑
FollowRelEntity
followRelEntity
=
followRelService
.
queryRecord
(
userId
,
userIdMyself
);
if
(
ObjectUtils
.
allNotNull
(
followRelEntity
)
&&
BizStatus
.
DeleteTag
.
tag_init
==
followRelEntity
.
getDeleteTag
()){
userInfoNew
.
setShowFollowStatus
(
1
);
// 已关注
userInfoNew
.
setShowFollowStatus
(
ShowFollowStatusEnum
.
FOLLOWED
.
getCode
()
);
// 已关注
}
else
{
userInfoNew
.
setShowFollowStatus
(
0
);
// 未关注
userInfoNew
.
setShowFollowStatus
(
ShowFollowStatusEnum
.
NOT_FOLLOWED
.
getCode
()
);
// 未关注
}
if
(
userInfoNew
.
getWorkshopStatus
()
==
2
)
userInfoNew
.
setWorkshopStatus
(
1
);
//别人的主页不需要展示 工作室
}
else
{
...
...
@@ -90,9 +89,9 @@ public class HomePageManager {
getFansNUmAndFollowNum
(
userInfoNew
);
// 主页类型 显示逻辑
if
(
50
==
userInfoNew
.
getLevelGrade
()){
if
(
UserLevelEnum
.
USER_CHIEF_FINANCIAL_ADVISER
.
getCode
()
==
userInfoNew
.
getLevelGrade
()){
// 首席投顾
userInfoNew
.
setPersonalCenterType
(
2
);
userInfoNew
.
setPersonalCenterType
(
PersonalCenterTypeEnum
.
CHIEF
.
getCode
()
);
// 成功案例客户
// 默认显示该投顾管理的客户里,总资产最高的客户
if
(
StringUtils
.
isBlank
(
userInfoNew
.
getUserInfoNewChief
().
getClientId
()))
{
...
...
@@ -104,10 +103,10 @@ public class HomePageManager {
userInfoNew
.
getUserInfoNewChief
().
setClientId
(
null
);
}
}
}
else
if
(
2
==
userInfoNew
.
getUserType
()){
}
else
if
(
UserTypeEnum
.
USER_ORG
.
getCode
()
==
userInfoNew
.
getUserType
()){
// 机构账号
userInfoNew
.
setPersonalCenterType
(
3
);
if
(
0
==
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgType
()
&&
StringUtils
.
isNotBlank
(
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgId
())){
// 公募
userInfoNew
.
setPersonalCenterType
(
PersonalCenterTypeEnum
.
ORG
.
getCode
()
);
if
(
FundCompanyTypeEnum
.
PUBLIC
.
getCode
()
==
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgType
()
&&
StringUtils
.
isNotBlank
(
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgId
())){
// 公募
//设置 基金数
MfAdvisorscalerank
mfAdvisorscalerank
=
mfAdvisorscalerankMapper
.
selectOne
(
new
LambdaQueryWrapper
<
MfAdvisorscalerank
>()
.
eq
(
MfAdvisorscalerank:
:
getInvestadvisorcode
,
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgId
())
...
...
@@ -119,7 +118,7 @@ public class HomePageManager {
.
last
(
"limit 1"
));
userInfoNew
.
setFounded
(
ObjectUtils
.
anyNotNull
(
mfInvestadvisoroutline
)
?
mfInvestadvisoroutline
.
getEstablishmentdate
().
getTime
()
:
null
);
}
if
(
1
==
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgType
()
&&
StringUtils
.
isNotBlank
(
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgId
())){
// 私募
if
(
FundCompanyTypeEnum
.
PRIVATE
.
getCode
()
==
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgType
()
&&
StringUtils
.
isNotBlank
(
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgId
())){
// 私募
//设置 基金数
Integer
integer
=
fundInfoMapper
.
selectCount
(
new
LambdaQueryWrapper
<
FundInfo
>().
eq
(
FundInfo:
:
getTrustId
,
userInfoNew
.
getUserInfoNewOrg
().
getBelongOrgId
()));
userInfoNew
.
setFundNumber
(
integer
);
...
...
@@ -143,14 +142,14 @@ public class HomePageManager {
.
eq
(
FollowRelEntity:
:
getDeleteTag
,
BizStatus
.
DeleteTag
.
tag_init
));
Map
<
String
,
FollowRelEntity
>
collect1
=
followRelEntities
.
stream
().
collect
(
Collectors
.
toMap
(
FollowRelEntity:
:
getFollowUserId
,
Function
.
identity
()));
userInfoOrgs
.
forEach
(
userInfoOrg
->
{
if
(
collect1
.
containsKey
(
userInfoOrg
.
getUserId
()))
userInfoOrg
.
setIsFollower
(
1
);
if
(
collect1
.
containsKey
(
userInfoOrg
.
getUserId
()))
userInfoOrg
.
setIsFollower
(
ShowFollowStatusEnum
.
FOLLOWED
.
getCode
());
//1已关注
});
userInfoNew
.
setUserInfoOrgList
(
userInfoOrgs
);
}
}
else
{
//普通主页
userInfoNew
.
setPersonalCenterType
(
1
);
userInfoNew
.
setPersonalCenterType
(
PersonalCenterTypeEnum
.
GENERAL
.
getCode
()
);
//设置课程数(学习数)
CommonResp
<
Integer
>
integerCommonResp
=
feignClientForCourse
.
getStudyCourseCount
(
userId
);
if
(
integerCommonResp
.
isSuccess
())
userInfoNew
.
setCourseNumber
(
integerCommonResp
.
getData
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment