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
70280d53
Commit
70280d53
authored
Jul 12, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志
parent
4100dc38
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
11 deletions
+67
-11
HelpController.java
.../com/gic/haoban/manage/web/controller/HelpController.java
+0
-1
HmLinkController.java
...gic/haoban/manage/web/controller/hm/HmLinkController.java
+67
-10
No files found.
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/HelpController.java
View file @
70280d53
...
...
@@ -17,7 +17,6 @@ import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
@RestController
public
class
HelpController
extends
WebBaseController
{
private
static
final
String
LOGIN_URL
=
"/haoban-manage3-web/yw-login"
;
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
HelpController
.
class
);
@Autowired
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmLinkController.java
View file @
70280d53
...
...
@@ -7,6 +7,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -25,6 +26,7 @@ import com.gic.commons.webapi.reponse.RestResponse;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreSettingDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmPageDTO
;
import
com.gic.haoban.manage.api.dto.hm.WxUserAddLogDTO
;
...
...
@@ -107,7 +109,7 @@ public class HmLinkController {
ServiceResponse
<
String
>
saveResp
=
this
.
hmLinkApiService
.
save
(
dto
);
if
(
saveResp
.
isSuccess
())
{
String
logContent
=
this
.
getUpdateLog
(
oldDTO
,
dto
);
if
(
StringUtils
.
isBlank
(
logContent
))
{
if
(
StringUtils
.
isBlank
(
logContent
))
{
GicLogRecordEvaluationContext
.
noWriteLog
();
}
logger
.
info
(
logContent
);
...
...
@@ -135,7 +137,7 @@ public class HmLinkController {
content
.
append
(
c
);
}
String
d
=
comp
(
wxEnterpriseId
,
enterpriseId
,
"分配规则"
,
oldDTO
.
getCustomRuleJson
(),
newDTO
.
getCustomRuleJson
(),
4
);
oldDTO
,
newDTO
);
if
(
null
!=
d
)
{
content
.
append
(
d
);
}
...
...
@@ -155,6 +157,15 @@ public class HmLinkController {
return
sb
.
append
(
content
).
toString
();
}
public
String
comp
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
title
,
String
oldValue
,
String
newValue
,
HmLinkDTO
oldDTO
,
HmLinkDTO
newDTO
)
{
// 其他门店
JSONObject
oldStoreRuleObj
=
JSONObject
.
parseObject
(
oldValue
);
JSONObject
newStoreRuleObj
=
JSONObject
.
parseObject
(
newValue
);
logger
.
info
(
"{},{}"
,
oldStoreRuleObj
,
newStoreRuleObj
);
return
otherStoreRuleLog
(
oldStoreRuleObj
,
newStoreRuleObj
,
oldDTO
,
newDTO
);
}
// type 会员标签1 , 2 欢迎语
public
String
comp
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
title
,
String
oldValue
,
String
newValue
,
int
type
)
{
...
...
@@ -221,17 +232,11 @@ public class HmLinkController {
sb
.
append
(
ruleLog
(
oldXgStore
,
newXgStore
,
2
));
return
sb
.
toString
();
}
// 其他门店
if
(
type
==
4
)
{
JSONObject
oldStoreRuleObj
=
JSONObject
.
parseObject
(
oldValue
);
JSONObject
newStoreRuleObj
=
JSONObject
.
parseObject
(
newValue
);
logger
.
info
(
"{},{}"
,
oldStoreRuleObj
,
newStoreRuleObj
);
return
otherStoreRuleLog
(
oldStoreRuleObj
,
newStoreRuleObj
);
}
return
null
;
}
private
String
otherStoreRuleLog
(
JSONObject
oldStoreRuleObj
,
JSONObject
newStoreRuleObj
)
{
private
String
otherStoreRuleLog
(
JSONObject
oldStoreRuleObj
,
JSONObject
newStoreRuleObj
,
HmLinkDTO
oldDTO
,
HmLinkDTO
newDTO
)
{
StringBuilder
tempSb
=
new
StringBuilder
();
int
oldOpenFlag
=
oldStoreRuleObj
.
getIntValue
(
"open"
);
int
newOpenFlag
=
newStoreRuleObj
.
getIntValue
(
"open"
);
...
...
@@ -254,6 +259,8 @@ public class HmLinkController {
}
String
cityLog
=
otherOpenLog
(
newCityStore
,
4
);
tempSb
.
append
(
cityLog
);
// 门店
tempSb
.
append
(
this
.
getStoreListLog
(
null
,
newDTO
,
1
));
}
else
{
if
(
newStoreType
==
1
)
{
tempSb
.
append
(
otherChangeLog
(
oldtore
,
newStore
,
5
));
...
...
@@ -261,8 +268,58 @@ public class HmLinkController {
tempSb
.
append
(
otherChangeLog
(
oldtore
,
newStore
,
6
));
}
tempSb
.
append
(
ruleLog
(
oldCityStore
,
newCityStore
,
4
));
tempSb
.
append
(
this
.
getStoreListLog
(
oldDTO
,
newDTO
,
2
));
}
}
return
tempSb
.
toString
();
}
private
String
getStoreListLog
(
HmLinkDTO
oldDTO
,
HmLinkDTO
newDTO
,
int
type
)
{
StringBuilder
tempSb
=
new
StringBuilder
();
if
(
1
==
type
&&
null
!=
newDTO
&&
CollectionUtils
.
isNotEmpty
(
newDTO
.
getStoreList
()))
{
tempSb
.
append
(
"门店为「"
);
List
<
String
>
list
=
new
ArrayList
<>();
newDTO
.
getStoreList
().
forEach
(
item
->
{
list
.
add
(
item
.
getStoreName
()
+
"("
+
item
.
getStoreCode
()
+
")"
);
});
tempSb
.
append
(
list
.
stream
().
collect
(
Collectors
.
joining
(
"、"
)));
tempSb
.
append
(
"」"
);
}
if
(
2
==
type
)
{
// 本次新加的
List
<
String
>
addList
=
new
ArrayList
<>();
List
<
String
>
delIdList
=
new
ArrayList
<>();
List
<
String
>
oldStoreIdList
=
new
ArrayList
<>();
List
<
HmLinkStoreDTO
>
oldList
=
oldDTO
.
getStoreList
();
List
<
HmLinkStoreDTO
>
newList
=
newDTO
.
getStoreList
();
if
(
CollectionUtils
.
isEmpty
(
oldList
)
&&
CollectionUtils
.
isEmpty
(
newList
))
{
return
""
;
}
if
(
CollectionUtils
.
isNotEmpty
(
oldList
))
{
oldStoreIdList
=
oldList
.
stream
().
map
(
dto
->
dto
.
getStoreId
()).
collect
(
Collectors
.
toList
());
for
(
HmLinkStoreDTO
dto
:
newList
)
{
if
(!
oldStoreIdList
.
contains
(
dto
.
getStoreId
()))
{
addList
.
add
(
dto
.
getStoreName
()
+
"("
+
dto
.
getStoreCode
()
+
")"
);
}
}
tempSb
.
append
(
"新增门店「"
).
append
(
addList
.
stream
().
collect
(
Collectors
.
joining
(
"、"
)));
tempSb
.
append
(
"」"
);
}
if
(
CollectionUtils
.
isNotEmpty
(
newList
))
{
List
<
String
>
newStoreIdList
=
newList
.
stream
().
map
(
dto
->
dto
.
getStoreId
())
.
collect
(
Collectors
.
toList
());
for
(
HmLinkStoreDTO
item
:
oldList
)
{
if
(!
newStoreIdList
.
contains
(
item
.
getStoreId
()))
{
delIdList
.
add
(
item
.
getStoreName
()
+
"("
+
item
.
getStoreCode
()
+
")"
);
}
}
tempSb
.
append
(
"删除门店「"
).
append
(
delIdList
.
stream
().
collect
(
Collectors
.
joining
(
"、"
)));
tempSb
.
append
(
"」"
);
}
}
// 更新
return
tempSb
.
toString
();
}
...
...
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