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
7e9775d4
Commit
7e9775d4
authored
Jun 15, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店控件增加接口
parent
09f3eeee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
StoreDictController.java
...ava/com/gic/store/web/controller/StoreDictController.java
+21
-11
No files found.
gic-store-web/src/main/java/com/gic/store/web/controller/StoreDictController.java
View file @
7e9775d4
...
...
@@ -16,6 +16,7 @@ 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.StoreApiService
;
import
com.gic.store.service.StoreDictApiService
;
import
com.gic.store.web.vo.StoreDictVO
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -39,6 +40,8 @@ public class StoreDictController {
private
EnterpriseInitApiService
enterpriseInitApiService
;
@Autowired
private
AuditLogApiService
auditLogApiService
;
@Autowired
private
StoreApiService
storeApiService
;
@RequestMapping
(
"list-all-businesscategory"
)
...
...
@@ -136,7 +139,7 @@ public class StoreDictController {
@RequestMapping
(
"save-status-type"
)
@ResponseBody
public
RestResponse
saveStoreStatusAndStoreType
(
String
storeStatus
,
String
storeType
){
AuditLogDTO
auditLogDTO
=
new
AuditLogDTO
();
/*
AuditLogDTO auditLogDTO = new AuditLogDTO();
// 商户id
auditLogDTO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
// 申请人id
...
...
@@ -151,16 +154,23 @@ public class StoreDictController {
jsonObject.put("storeType", storeType);
auditLogDTO.setExtraInfo(jsonObject.toJSONString());
ServiceResponse<Void> serviceResponse = auditLogApiService.apply(auditLogDTO);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
// Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
// ServiceResponse serviceResponse = this.storeDictApiService.saveStoreStatusAndStoreType(enterpriseId, storeStatus.split(","), storeType.split(","));
// if(serviceResponse.isSuccess()){
// LogUtils.createLog("配置商户门店类型和门店状态", "门店状态和门店类型");
// this.enterpriseInitApiService.setStoreStatusAndType(enterpriseId);
// return RestResponse.success();
// }else {
// return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
// }
return ResultControllerUtils.commonResult(serviceResponse);*/
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
String
key
=
"storeStatusAndType:"
+
enterpriseId
;
Object
cache
=
RedisUtil
.
getCache
(
key
);
if
(
cache
!=
null
){
return
RestResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
"请稍后重试"
);
}
RedisUtil
.
setCache
(
key
,
1
,
12
l
,
TimeUnit
.
HOURS
);
ServiceResponse
serviceResponse
=
this
.
storeDictApiService
.
saveStoreStatusAndStoreType
(
enterpriseId
,
storeStatus
.
split
(
","
),
storeType
.
split
(
","
));
if
(
serviceResponse
.
isSuccess
()){
LogUtils
.
createLog
(
"配置商户门店类型和门店状态"
,
"门店状态和门店类型"
);
this
.
enterpriseInitApiService
.
setStoreStatusAndType
(
enterpriseId
);
this
.
storeApiService
.
bulkAddStoreToIndex
(
enterpriseId
);
return
RestResponse
.
success
();
}
else
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
}
...
...
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