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
021224fa
Commit
021224fa
authored
Sep 03, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店启用权重设置
parent
454329ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
0 deletions
+54
-0
StoreStrategyApiService.java
...n/java/com/gic/store/service/StoreStrategyApiService.java
+21
-0
StoreStrategyApiServiceImpl.java
...store/service/outer/impl/StoreStrategyApiServiceImpl.java
+15
-0
StoreStrategyController.java
...com/gic/store/web/controller/StoreStrategyController.java
+18
-0
No files found.
gic-store-api/src/main/java/com/gic/store/service/StoreStrategyApiService.java
View file @
021224fa
...
...
@@ -130,6 +130,17 @@ public interface StoreStrategyApiService {
ServiceResponse
<
Void
>
setStoreGroupStrategyWeight
(
Integer
enterpriseId
,
int
weight
);
/**
* 门店启用策略:人为操作更改过门店启用状态后,门店资料更新不再执行启用状态策略
* @Title: setStoreEnableStrategyWeight
* @Description:
* @author guojuxing
* @param enterpriseId
* @param weight 1:勾选 0:不勾选
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
setStoreStatusEnableStrategyWeight
(
Integer
enterpriseId
,
int
weight
);
/**
* 获取门店分组策略权重
* @Title: getStoreGroupStrategyWeight
* @Description:
...
...
@@ -140,6 +151,16 @@ public interface StoreStrategyApiService {
ServiceResponse
<
Integer
>
getStoreGroupStrategyWeight
(
Integer
enterpriseId
);
/**
* 获取门店启用策略:人为操作更改过门店启用状态后,门店资料更新不再执行启用状态策略
* @Title: getStoreStatusEnableStrategyWeight
* @Description:
* @author guojuxing
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
*/
ServiceResponse
<
Integer
>
getStoreStatusEnableStrategyWeight
(
Integer
enterpriseId
);
/**
* 重置门店策略
* @Title: resetStoreGroupStrategy
* @Description:
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreStrategyApiServiceImpl.java
View file @
021224fa
...
...
@@ -223,6 +223,12 @@ public class StoreStrategyApiServiceImpl implements StoreStrategyApiService{
}
@Override
public
ServiceResponse
<
Void
>
setStoreStatusEnableStrategyWeight
(
Integer
enterpriseId
,
int
weight
)
{
RedisUtil
.
setCache
(
"enterprise:store:storeStatusEnableStrategy:"
+
enterpriseId
,
weight
);
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
getStoreGroupStrategyWeight
(
Integer
enterpriseId
)
{
Object
value
=
RedisUtil
.
getCache
(
"enterprise:store:storeGroupStrategy:"
+
enterpriseId
);
if
(
value
==
null
){
...
...
@@ -231,6 +237,15 @@ public class StoreStrategyApiServiceImpl implements StoreStrategyApiService{
return
ServiceResponse
.
success
(
Integer
.
valueOf
(
value
.
toString
()));
}
@Override
public
ServiceResponse
<
Integer
>
getStoreStatusEnableStrategyWeight
(
Integer
enterpriseId
)
{
Object
value
=
RedisUtil
.
getCache
(
"enterprise:store:storeStatusEnableStrategy:"
+
enterpriseId
);
if
(
value
==
null
){
return
ServiceResponse
.
success
(
0
);
}
return
ServiceResponse
.
success
(
Integer
.
valueOf
(
value
.
toString
()));
}
@Override
public
ServiceResponse
<
String
>
resetStoreGroupStrategy
(
List
<
Integer
>
regionIdList
,
List
<
Integer
>
storeStatusList
)
{
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreStrategyController.java
View file @
021224fa
...
...
@@ -254,6 +254,24 @@ public class StoreStrategyController {
return
RestResponse
.
success
(
result
.
getResult
());
}
@RequestMapping
(
"/update-store-status-enabble-strategy-weights"
)
public
RestResponse
setStoreStatusEnableStrategyWeight
(
Integer
weight
)
{
if
(
weight
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"参数错误"
);
}
ServiceResponse
result
=
storeStrategyApiService
.
setStoreStatusEnableStrategyWeight
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseInfo
().
getEnterpriseId
(),
weight
);
return
OperationResultUtils
.
operationResult
(
result
,
"设置门店分组策略权重"
,
UserDetailUtils
.
getUserDetail
().
getEnterpriseInfo
().
getEnterpriseName
());
}
@RequestMapping
(
"/get-store-status-enable-strategy-weights"
)
public
RestResponse
getStoreStatusEnableStrategyWeight
()
{
ServiceResponse
<
Integer
>
result
=
storeStrategyApiService
.
getStoreStatusEnableStrategyWeight
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseInfo
().
getEnterpriseId
());
return
RestResponse
.
success
(
result
.
getResult
());
}
private
StoreStrategyDTO
transferQoToDTO
(
StoreStrategyQO
storeStrategyQO
)
{
StoreStrategyDTO
storeStrategyDTO
=
EntityUtil
.
changeEntityNew
(
StoreStrategyDTO
.
class
,
storeStrategyQO
);
storeStrategyDTO
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseInfo
().
getEnterpriseId
());
...
...
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