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
1
Merge Requests
1
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
3bb0f553
Commit
3bb0f553
authored
Jul 14, 2022
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 操作日志模块对应
parent
e71f7f80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
11 deletions
+29
-11
WelcomeController.java
...m/gic/haoban/manage/web/controller/WelcomeController.java
+23
-5
HmGroupController.java
...ic/haoban/manage/web/controller/hm/HmGroupController.java
+3
-3
HmPageController.java
...gic/haoban/manage/web/controller/hm/HmPageController.java
+3
-3
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WelcomeController.java
View file @
3bb0f553
...
...
@@ -5,10 +5,8 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.base.api.common.PageResult2
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.hm.HmWelcomeRelationDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.FriendSettingDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeDetailDTO
;
...
...
@@ -25,10 +23,14 @@ import com.gic.haoban.manage.api.enums.hm.HmWelcomeType;
import
com.gic.haoban.manage.api.service.hm.HmWelcomeRelationApiService
;
import
com.gic.haoban.manage.api.service.out.WelcomeApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.log.LogRecordUserServiceImpl
;
import
com.gic.haoban.manage.web.qo.welcome.ListWelcomeQO
;
import
com.gic.haoban.manage.web.qo.welcome.SaveFriendSettingQO
;
import
com.gic.haoban.manage.web.qo.welcome.SaveWelcomeQO
;
import
com.gic.log.record.anno.GicLogRecord
;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -80,6 +82,8 @@ public class WelcomeController extends WebBaseController {
* @author : YongEn
* @date : 2022/2/11
*/
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
WELCOME_ADD
,
optPage
=
"引流链接-落地页模板"
,
userFunc
=
LogRecordUserServiceImpl
.
class
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
public
RestResponse
<
Boolean
>
saveWelcome
(
@RequestBody
@Valid
SaveWelcomeQO
qo
)
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
...
...
@@ -113,8 +117,11 @@ public class WelcomeController extends WebBaseController {
logContent
=
this
.
buildEditWelcomeOpLog
(
welcomeDetail
,
qdto
);
}
}
GicLogRecordEvaluationContext
.
putAttribute
(
"
name
"
,
logContent
);
GicLogRecordEvaluationContext
.
putAttribute
(
"
logContent
"
,
logContent
);
ServiceResponse
<
Boolean
>
response
=
welcomeApiService
.
saveWelcome
(
qdto
);
if
(
response
.
isSuccess
()){
GicLogRecordEvaluationContext
.
noWriteLog
();
}
return
RestResponse
.
successResult
(
response
.
getResult
());
}
...
...
@@ -152,14 +159,25 @@ public class WelcomeController extends WebBaseController {
* @author : YongEn
* @date : 2022/2/11
*/
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
WELCOM_DEL
,
optPage
=
"引流链接-落地页模板"
,
userFunc
=
LogRecordUserServiceImpl
.
class
)
@RequestMapping
(
value
=
"/remove"
)
public
RestResponse
<
Boolean
>
removeWelcome
(
@RequestParam
(
"welcomeId"
)
String
welcomeId
)
{
public
RestResponse
<
?
>
removeWelcome
(
@RequestParam
(
"welcomeId"
)
String
welcomeId
)
{
if
(
StringUtils
.
isEmpty
(
welcomeId
))
{
RestResponse
.
failure
(
Constant
.
STRING_1
,
"欢迎语id为空"
,
Boolean
.
FALSE
);
return
RestResponse
.
failure
(
Constant
.
STRING_1
,
"欢迎语id为空"
,
Boolean
.
FALSE
);
}
String
logContent
=
"删除新增特殊欢迎语"
;
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
ServiceResponse
<
WelcomeDetailDTO
>
serviceWelcome
=
welcomeApiService
.
getWelcome
(
welcomeId
,
loginUser
.
getEnterpriseId
());
if
(
serviceWelcome
.
isSuccess
()
&&
serviceWelcome
.
getResult
()
!=
null
){
String
title
=
serviceWelcome
.
getResult
().
getTitle
();
logContent
=
logContent
+
"【"
+
title
+
"】"
;
}
GicLogRecordEvaluationContext
.
putAttribute
(
"logContent"
,
logContent
);
ServiceResponse
<
WelcomeRemoveCheckDTO
>
serviceResponse
=
welcomeApiService
.
removeWelcomeWithErrorInfo
(
welcomeId
);
if
(
serviceResponse
.
getResult
()
!=
null
)
{
// can't remove
GicLogRecordEvaluationContext
.
noWriteLog
();
return
RestResponse
.
failure
(
HaoBanErrCode
.
ERR_9
.
getCode
()
+
""
,
this
.
buildErrorMessage
(
serviceResponse
.
getResult
()));
}
return
RestResponse
.
successResult
();
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmGroupController.java
View file @
3bb0f553
...
...
@@ -38,7 +38,7 @@ public class HmGroupController extends WebBaseController {
@Autowired
private
HmGroupApiService
groupApiService
;
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
TEST_OPT
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
HUOMA_GROUP_ADD
,
optPage
=
"员工活码"
,
userFunc
=
LogRecordUserServiceImpl
.
class
)
@RequestMapping
(
path
=
"/save"
,
method
=
RequestMethod
.
POST
)
public
RestResponse
<?>
saveHmGroupSetting
(
@Valid
HmGroupSettingVO
hmGroupSettingVO
){
...
...
@@ -74,7 +74,7 @@ public class HmGroupController extends WebBaseController {
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
TEST_OPT
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
HUOMA_GROUP_UPDATE
,
optPage
=
"员工活码"
,
userFunc
=
LogRecordUserServiceImpl
.
class
)
@RequestMapping
(
path
=
"/edit"
,
method
=
RequestMethod
.
POST
)
public
RestResponse
<?>
editHmGroupSetting
(
@Valid
HmGroupSettingVO
hmGroupSettingVO
){
...
...
@@ -100,7 +100,7 @@ public class HmGroupController extends WebBaseController {
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
TEST_OPT
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
HUOMA_GROUP_DEL
,
optPage
=
"员工活码"
,
userFunc
=
LogRecordUserServiceImpl
.
class
)
@RequestMapping
(
path
=
"/delete"
,
method
=
RequestMethod
.
POST
)
public
RestResponse
<?>
deleteHmGroupSetting
(
HmGroupSettingVO
hmGroupSettingVO
){
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmPageController.java
View file @
3bb0f553
...
...
@@ -41,7 +41,7 @@ public class HmPageController {
@Autowired
private
HmPageApiService
pageApiService
;
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
TEST_OPT
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
HUOMA_PAGE_ADD
,
optPage
=
"引流链接-落地页模板-新建模板"
,
userFunc
=
LogRecordUserServiceImpl
.
class
)
@RequestMapping
(
path
=
"/page/save"
)
public
RestResponse
<?>
savePage
(
@Valid
HmPageSettingReq
pageSettingReq
){
...
...
@@ -69,7 +69,7 @@ public class HmPageController {
}
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
TEST_OPT
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
HUOMA_PAGE_UPDATE
,
optPage
=
"引流链接-落地页模板-编辑模板"
,
userFunc
=
LogRecordUserServiceImpl
.
class
)
@RequestMapping
(
path
=
"/page/edit"
)
public
RestResponse
<?>
editPage
(
@Valid
HmPageSettingReq
pageSettingReq
){
...
...
@@ -161,7 +161,7 @@ public class HmPageController {
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
TEST_OPT
@GicLogRecord
(
value
=
"${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
HUOMA_PAGE_DEL
,
optPage
=
"引流链接-落地页模板"
,
userFunc
=
LogRecordUserServiceImpl
.
class
)
@RequestMapping
(
path
=
"/page/delete"
)
public
RestResponse
<?>
deletePage
(
Long
pageId
){
...
...
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