Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
6527ed0c
Commit
6527ed0c
authored
Mar 31, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
dca6d69c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
6 deletions
+31
-6
AuditDTO.java
...src/main/java/com/gic/haoban/manage/api/dto/AuditDTO.java
+11
-1
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+20
-5
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/AuditDTO.java
View file @
6527ed0c
...
...
@@ -18,6 +18,8 @@ public class AuditDTO implements Serializable {
private
String
commitStoreId
;
private
String
commitStoreName
;
private
String
changeField
;
private
String
oldValue
;
...
...
@@ -44,7 +46,15 @@ public class AuditDTO implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
public
String
getDetail
()
{
public
String
getCommitStoreName
()
{
return
commitStoreName
;
}
public
void
setCommitStoreName
(
String
commitStoreName
)
{
this
.
commitStoreName
=
commitStoreName
;
}
public
String
getDetail
()
{
return
detail
;
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
6527ed0c
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.ctrip.framework.apollo.spring.annotation.ApolloConfig
;
import
com.gic.api.base.commons.Page
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.GlobalVar
;
import
com.gic.haoban.manage.api.dto.*
;
...
...
@@ -44,6 +50,9 @@ public class AuditController extends WebBaseController{
private
AuditSettingApiService
auditSettingApiService
;
@Autowired
private
AuditApiService
auditApiService
;
@Autowired
private
StoreService
storeService
;
//设置保存
@RequestMapping
(
"open-or-close"
)
public
HaobanResponse
openOrClose
(
String
wxEnterpriseId
,
Integer
auditFlag
)
{
...
...
@@ -80,17 +89,21 @@ public class AuditController extends WebBaseController{
}
Page
<
AuditDTO
>
page
=
auditApiService
.
page
(
auditType
,
search
,
wxEnterpriseId
,
enterpriseId
,
auditStatus
,
pageInfo
);
List
<
AuditDTO
>
list
=
page
.
getResult
();
List
<
String
>
storeIds
=
list
.
stream
().
map
(
s
->
s
.
getCommitStoreId
()).
collect
(
Collectors
.
toList
());
String
[]
array
=
storeIds
.
toArray
(
new
String
[
storeIds
.
size
()]);
List
<
StoreDTO
>
stores
=
storeService
.
getStores
(
array
);
Map
<
String
,
StoreDTO
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
stores
,
"storeId"
);
for
(
AuditDTO
dto:
list
){
String
t
=
dto
.
getChangeField
();
String
detail
=
""
;
if
(
StoreFieldEnum
.
STORE_NAME
.
getValue
().
equals
(
t
)){
detail
=
"将"
+
"门店名称"
+
dto
.
getOldValue
()+
"修改为"
+
dto
.
getNewValue
()
;
detail
=
"将"
+
"门店名称"
+
"\""
+
dto
.
getOldValue
()+
"\""
+
"修改为"
+
"\""
+
dto
.
getNewValue
()+
"\""
;
}
else
if
(
StoreFieldEnum
.
STORE_AREA
.
getValue
().
equals
(
t
)){
detail
=
"将"
+
"门店面积"
+
dto
.
getOldValue
()+
"修改为"
+
dto
.
getNewValue
()
;
detail
=
"将"
+
"门店面积"
+
"\""
+
dto
.
getOldValue
()+
"\""
+
"修改为"
+
"\""
+
dto
.
getNewValue
()+
"\""
;
}
else
if
(
StoreFieldEnum
.
CONACTS_PHONE
.
getValue
().
equals
(
t
)){
detail
=
"将"
+
"联系电话"
+
dto
.
getOldValue
()+
"修改为"
+
dto
.
getNewValue
()
;
detail
=
"将"
+
"联系电话"
+
"\""
+
dto
.
getOldValue
()+
"\""
+
"修改为"
+
"\""
+
dto
.
getNewValue
()+
"\""
;
}
else
if
(
StoreFieldEnum
.
BUSINESS_TIME_STRING
.
getValue
().
equals
(
t
)){
detail
=
"将"
+
"营业时间"
+
dto
.
getOldValue
()+
"修改为"
+
dto
.
getNewValue
()
;
detail
=
"将"
+
"营业时间"
+
"\""
+
dto
.
getOldValue
()+
"\""
+
"修改为"
+
"\""
+
dto
.
getNewValue
()+
"\""
;
}
else
if
(
StoreFieldEnum
.
STORE_ADDRESS
.
getValue
().
equals
(
t
)){
String
oldValue
=
dto
.
getOldValue
();
String
newValue
=
dto
.
getNewValue
();
...
...
@@ -99,11 +112,13 @@ public class AuditController extends WebBaseController{
JSONObject
newJSONObject
=
JSONObject
.
parseObject
(
newValue
);
String
newAddress
=
newJSONObject
.
get
(
"storeAddress"
).
toString
();
detail
=
"将"
+
"门店地址"
+
oldAddress
+
"修改为"
+
newAddress
;
detail
=
"将"
+
"门店地址"
+
"\""
+
oldAddress
+
"\""
+
"修改为"
+
"\""
+
newAddress
+
"\""
;
}
else
if
(
StoreFieldEnum
.
STORE_IMAG
.
getValue
().
equals
(
t
)){
detail
=
"门店图片变更"
;
}
dto
.
setDetail
(
detail
);
String
storeName
=
map
.
get
(
dto
.
getCommitStoreId
())==
null
?
""
:
map
.
get
(
dto
.
getCommitStoreId
()).
getStoreName
();
dto
.
setCommitStoreName
(
storeName
);
}
page
.
setResult
(
list
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
page
);
...
...
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