Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
f92de300
Commit
f92de300
authored
Jan 30, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加主题缓存
parent
3b217b2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
22 deletions
+17
-22
base-manager/src/main/java/com/mortals/xhx/module/site/web/SiteThemeController.java
.../com/mortals/xhx/module/site/web/SiteThemeController.java
+11
-17
base-manager/src/test/java/com/mortals/httpclient/site/SiteThemeController.http
...java/com/mortals/httpclient/site/SiteThemeController.http
+6
-5
No files found.
base-manager/src/main/java/com/mortals/xhx/module/site/web/SiteThemeController.java
View file @
f92de300
...
...
@@ -26,12 +26,10 @@ import com.mortals.xhx.module.site.model.SiteThemeEntity;
import
com.mortals.xhx.module.site.service.SiteThemeService
;
import
org.apache.commons.lang3.ArrayUtils
;
import
com.mortals.framework.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.Arrays
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
...
...
@@ -62,25 +60,21 @@ public class SiteThemeController extends BaseCRUDJsonBodyMappingController<SiteT
/**
* 根据站点id获取当前站点主题
*/
@PostMapping
(
value
=
"
s
ite"
)
@PostMapping
(
value
=
"
getThemeByS
ite"
)
@UnAuth
public
String
getThemeCacheBySite
(
@RequestBody
SiteThemeEntity
site
)
{
JSONObject
jsonObject
=
new
JSONObject
();
String
busiDesc
=
"根据站点id获取当前站点主题列表"
+
this
.
getModuleDesc
();
try
{
if
(
ObjectUtils
.
isEmpty
(
site
.
getSiteId
()))
throw
new
AppException
(
"站点id不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
site
.
getUserType
()))
throw
new
AppException
(
"服务类型不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
site
.
getSiteId
()))
throw
new
AppException
(
"站点id不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
site
.
getUserType
()))
throw
new
AppException
(
"服务类型不能为空!"
);
String
jsonstr
=
cacheService
.
hget
(
RedisCacheKeys
.
getSiteUserTypeThemeCodeKey
()
+
site
.
getSiteId
(),
site
.
getUserType
(),
String
.
class
);
List
<
SiteThemeEntity
>
siteThemeEntities
=
JSON
.
parseObject
(
jsonstr
,
new
TypeReference
<
List
<
SiteThemeEntity
>>()
{
});
jsonObject
.
put
(
KEY_RESULT_DATA
,
siteThemeEntities
);
List
<
SiteThemeEntity
>
siteThemeEntities
=
JSON
.
parseObject
(
jsonstr
,
new
TypeReference
<
List
<
SiteThemeEntity
>>()
{});
if
(
ObjectUtils
.
isEmpty
(
siteThemeEntities
)){
jsonObject
.
put
(
KEY_RESULT_DATA
,
new
ArrayList
<
SiteThemeEntity
>());
}
else
{
jsonObject
.
put
(
KEY_RESULT_DATA
,
siteThemeEntities
);
}
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
jsonObject
.
put
(
KEY_RESULT_MSG
,
"根据站点id获取当前站点主题列表成功!"
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
...
...
base-manager/src/test/java/com/mortals/httpclient/site/SiteThemeController.http
View file @
f92de300
...
...
@@ -13,14 +13,15 @@ client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###主题列表
POST {{baseUrl}}/site/theme/list
###主题站点
POST {{baseUrl}}/site/theme/site
Content-Type: application/json
{
"siteId":22,
"page":1,
"size":10
"siteId":1,
"userType":4
}
...
...
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