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
01cabc67
Commit
01cabc67
authored
Sep 10, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主页背景图
parent
7a929a72
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
8 deletions
+25
-8
CommunityConstant.java
.../main/java/com/tanpu/community/api/CommunityConstant.java
+12
-8
UserInfoResp.java
...pu/community/api/beans/vo/feign/fatools/UserInfoResp.java
+4
-0
HomePageManager.java
...ain/java/com/tanpu/community/manager/HomePageManager.java
+9
-0
No files found.
community-api/src/main/java/com/tanpu/community/api/CommunityConstant.java
View file @
01cabc67
package
com
.
tanpu
.
community
.
api
;
package
com
.
tanpu
.
community
.
api
;
import
org.springframework.beans.factory.annotation.Value
;
import
com.google.common.collect.ImmutableMap
;
import
java.util.Map
;
/**
/**
* monitor系统常量
* monitor系统常量
...
@@ -12,12 +14,6 @@ public final class CommunityConstant {
...
@@ -12,12 +14,6 @@ public final class CommunityConstant {
public
static
final
String
OSS_PREFIX_URL
=
"http://tamperfeodev.oss-cn-shanghai.aliyuncs.com/"
;
public
static
final
String
OSS_PREFIX_URL
=
"http://tamperfeodev.oss-cn-shanghai.aliyuncs.com/"
;
@Value
(
"${aliyun.oss.bucketName}"
)
public
String
OSS_BUCKET_NAME
;
@Value
(
"${aliyun.oss.endpoint}"
)
public
String
OSS_END_POINT
;
public
static
final
String
OSS_PREFIX_FOLDER
=
"community/"
;
public
static
final
String
OSS_PREFIX_FOLDER
=
"community/"
;
//图片压缩比例:50%
//图片压缩比例:50%
...
@@ -29,9 +25,17 @@ public final class CommunityConstant {
...
@@ -29,9 +25,17 @@ public final class CommunityConstant {
public
static
final
Integer
OSS_CHECK_FAIL_DEFAULT_HEIGHT
=
1115
;
public
static
final
Integer
OSS_CHECK_FAIL_DEFAULT_HEIGHT
=
1115
;
public
static
final
String
THEME_PREFIX
=
"NEW_THEME_"
;
public
static
final
String
THEME_PREFIX
=
"NEW_THEME_"
;
// 旧图片上传地址
public
static
final
String
OLD_FILE_UPLOAD_URL
=
"http://tp-fatools-svc/fatools/h5/rest/common/uploadSingleFile"
;
public
static
final
String
OLD_FILE_UPLOAD_URL
=
"http://tp-fatools-svc/fatools/h5/rest/common/uploadSingleFile"
;
// 首页背景图配置
public
static
final
Map
<
String
,
String
>
BACKGROUND_IMG_URL_MAP
=
ImmutableMap
.
of
// 西安家办
(
"309054222178349056"
,
"https://tamp-pro.oss-cn-shanghai.aliyuncs.com/corpCert/xi-an-homepage/green-yellow.png"
// 测试环境
,
"295920641461243904"
,
"https://tamp-pro.oss-cn-shanghai.aliyuncs.com/corpCert/xi-an-homepage/green-yellow.png"
// 默认
,
"default"
,
"https://tamp-pro.oss-cn-shanghai.aliyuncs.com/corpCert/xi-an-homepage/blue.png"
);
...
...
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/fatools/UserInfoResp.java
View file @
01cabc67
...
@@ -97,4 +97,8 @@ public class UserInfoResp {
...
@@ -97,4 +97,8 @@ public class UserInfoResp {
@ApiModelProperty
(
value
=
"机构用户信息"
)
@ApiModelProperty
(
value
=
"机构用户信息"
)
private
UserInfoNewOrg
userInfoNewOrg
;
private
UserInfoNewOrg
userInfoNewOrg
;
//↓↓↓↓↓首部背景图↓↓↓↓↓↓
@ApiModelProperty
(
value
=
"主页背景图"
)
private
String
backgroundImgUrl
;
}
}
\ No newline at end of file
community-service/src/main/java/com/tanpu/community/manager/HomePageManager.java
View file @
01cabc67
...
@@ -7,6 +7,7 @@ import com.tanpu.common.api.CommonResp;
...
@@ -7,6 +7,7 @@ import com.tanpu.common.api.CommonResp;
import
com.tanpu.common.constant.BizStatus
;
import
com.tanpu.common.constant.BizStatus
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.common.util.DateUtils
;
import
com.tanpu.common.util.DateUtils
;
import
com.tanpu.community.api.CommunityConstant
;
import
com.tanpu.community.api.beans.qo.FollowQo
;
import
com.tanpu.community.api.beans.qo.FollowQo
;
import
com.tanpu.community.api.beans.req.homepage.FollowRelReq
;
import
com.tanpu.community.api.beans.req.homepage.FollowRelReq
;
import
com.tanpu.community.api.beans.req.homepage.QueryFollowReq
;
import
com.tanpu.community.api.beans.req.homepage.QueryFollowReq
;
...
@@ -190,6 +191,14 @@ public class HomePageManager {
...
@@ -190,6 +191,14 @@ public class HomePageManager {
CommonResp
<
Integer
>
integerCommonResp
=
feignClientForCourse
.
getStudyCourseCount
(
userId
);
CommonResp
<
Integer
>
integerCommonResp
=
feignClientForCourse
.
getStudyCourseCount
(
userId
);
if
(
integerCommonResp
.
isSuccess
())
userInfoNew
.
setCourseNumber
(
integerCommonResp
.
getData
());
if
(
integerCommonResp
.
isSuccess
())
userInfoNew
.
setCourseNumber
(
integerCommonResp
.
getData
());
}
}
// 主页背景图
if
(
CommunityConstant
.
BACKGROUND_IMG_URL_MAP
.
containsKey
(
userInfoNew
.
getUserId
())){
userInfoNew
.
setBackgroundImgUrl
(
CommunityConstant
.
BACKGROUND_IMG_URL_MAP
.
get
(
userInfoNew
.
getUserId
()));
}
else
{
userInfoNew
.
setBackgroundImgUrl
(
CommunityConstant
.
BACKGROUND_IMG_URL_MAP
.
get
(
"default"
));
}
//刷新用户缓存
//刷新用户缓存
redisCache
.
put
(
StringUtils
.
joinWith
(
"_"
,
CACHE_FEIGN_USER_INFO
,
userId
),
userInfoNew
,
60
);
redisCache
.
put
(
StringUtils
.
joinWith
(
"_"
,
CACHE_FEIGN_USER_INFO
,
userId
),
userInfoNew
,
60
);
...
...
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