Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-store
Commits
d2e7cdc0
Commit
d2e7cdc0
authored
Mar 16, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加log
parent
1342aaa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
StoreDictController.java
...ava/com/gic/store/web/controller/StoreDictController.java
+25
-0
No files found.
gic-store-web/src/main/java/com/gic/store/web/controller/StoreDictController.java
View file @
d2e7cdc0
package
com
.
gic
.
store
.
web
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.constant.Constants
;
import
com.gic.enterprise.dto.AuditLogDTO
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
import
com.gic.enterprise.service.AuditLogApiService
;
import
com.gic.enterprise.service.EnterpriseInitApiService
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.store.constant.StoreESFieldsEnum
;
import
com.gic.store.dto.StoreDictDTO
;
import
com.gic.store.service.StoreDictApiService
;
...
...
@@ -22,6 +27,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
@Controller
public
class
StoreDictController
{
...
...
@@ -30,6 +36,8 @@ public class StoreDictController {
private
StoreDictApiService
storeDictApiService
;
@Autowired
private
EnterpriseInitApiService
enterpriseInitApiService
;
@Autowired
private
AuditLogApiService
auditLogApiService
;
@RequestMapping
(
"list-all-businesscategory"
)
@ResponseBody
...
...
@@ -152,6 +160,23 @@ public class StoreDictController {
if
(
StringUtils
.
isBlank
(
values
)){
return
EnterpriseRestResponse
.
failure
(
com
.
gic
.
enterprise
.
error
.
ErrorCode
.
MISS_PARAMETER
);
}
String
key
=
"relevanceStorefield:"
+
enterpriseId
;
Object
cache
=
RedisUtil
.
getCache
(
key
);
if
(
cache
!=
null
){
return
RestResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
"请稍后重试"
);
}
AuditLogDTO
auditLogDTO
=
new
AuditLogDTO
();
auditLogDTO
.
setEnterpriseId
(
1129
);
auditLogDTO
.
setApplyUserId
(
124
);
auditLogDTO
.
setProjectItemCode
(
Constants
.
PROJECT_ITEM_RISK_MODE_APPLY
);
JSONObject
jsonObject
=
new
JSONObject
();
// 自定义的信息
jsonObject
.
put
(
"enterpriseId"
,
enterpriseId
);
jsonObject
.
put
(
"values"
,
values
);
jsonObject
.
put
(
"userId"
,
userId
);
auditLogDTO
.
setExtraInfo
(
jsonObject
.
toJSONString
());
auditLogApiService
.
apply
(
auditLogDTO
);
RedisUtil
.
setCache
(
key
,
1
,
12
l
,
TimeUnit
.
HOURS
);
ServiceResponse
serviceResponse
=
this
.
storeDictApiService
.
saveStoreField
(
enterpriseId
,
values
,
userId
);
if
(
serviceResponse
.
isSuccess
()){
LogUtils
.
createLog
(
"自定义字段列表支持筛选配置"
,
"自定义字段"
);
...
...
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