Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4621dbb5
authored
Jan 18, 2018
by
Huang Linyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台修改资源操作,能记录最后操作人
parent
cbe81e4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
src/main/java/com/ctrip/fun/admin/controller/JsonController.java
src/main/java/com/ctrip/fun/admin/controller/golf/CourseResourceController.java
src/main/java/com/ctrip/fun/admin/controller/JsonController.java
View file @
4621dbb5
...
...
@@ -67,6 +67,7 @@ import com.ctrip.fun.admin.service.system.UserService;
import
com.ctrip.fun.admin.service.tag.TagService
;
import
com.ctrip.fun.admin.service.tools.ToolsService
;
import
com.ctrip.fun.admin.service.tour.TourBasicService
;
import
com.ctrip.fun.admin.utility.SpringSecurityUtil
;
import
com.ctrip.fun.admin.utility.Util
;
import
com.ctrip.fun.admin.vo.product.AsmCourseResourceBeanv1
;
import
com.ctrip.fun.admin.vo.product.InventoryResizeBean
;
...
...
@@ -1153,11 +1154,13 @@ public class JsonController {
for
(
String
id
:
ids
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
bean
.
setResourceId
(
Integer
.
parseInt
(
id
));
bean
.
setUpdateUser
(
SpringSecurityUtil
.
getCurrentUserName
());
if
(!
courseResourceService
.
setPrice
(
request
.
getAttribute
(
"userName"
).
toString
(),
bean
))
{
throw
new
Exception
(
"批量设置定价异常"
);
}
inventoryBean
.
setResourceId
(
Integer
.
parseInt
(
id
));
inventoryBean
.
setUpdateUser
(
SpringSecurityUtil
.
getCurrentUserName
());
inventoryBean
.
setResourceCategory
(
ResourceCategoryEnum
.
COURSE
.
getValue
());
courseResourceService
.
setInventory
(
request
.
getAttribute
(
"userName"
).
toString
(),
inventoryBean
);
...
...
@@ -1222,6 +1225,7 @@ public class JsonController {
CourseResourceStatusBean
bean
=
new
CourseResourceStatusBean
();
bean
.
setResourceStatus
(
resourceStatus
);
bean
.
setResourceIds
(
rids
);
bean
.
setUpdateUser
(
SpringSecurityUtil
.
getCurrentUserName
());
if
(!
courseResourceService
.
setStatus
(
request
.
getAttribute
(
"userName"
).
toString
(),
bean
))
{
throw
new
Exception
(
"批量设置资源状态异常"
);
}
...
...
src/main/java/com/ctrip/fun/admin/controller/golf/CourseResourceController.java
View file @
4621dbb5
...
...
@@ -38,6 +38,7 @@ import com.ctrip.fun.admin.service.golf.CourseResourceService;
import
com.ctrip.fun.admin.service.golf.CourseService
;
import
com.ctrip.fun.admin.service.operation.ResourceOpInfoService
;
import
com.ctrip.fun.admin.service.system.UserService
;
import
com.ctrip.fun.admin.utility.SpringSecurityUtil
;
import
com.ctrip.fun.admin.validator.IntegerEditor
;
import
com.ctrip.fun.admin.validator.InventoryValidator
;
import
com.ctrip.fun.admin.vo.product.TeeTimeSelectBean
;
...
...
@@ -338,7 +339,8 @@ public class CourseResourceController {
form
.
setStartTeeTime
(
form
.
getStartTeeTimeDisplay
());
form
.
setEndTeeTime
(
form
.
getEndTeeTimeDisplay
());
BeanConverter
.
copyProperties
(
bean
,
form
);
String
currentUserName
=
SpringSecurityUtil
.
getCurrentUserName
();
bean
.
setUpdateUser
(
currentUserName
);
service
.
update
(
request
.
getAttribute
(
"userName"
).
toString
(),
bean
);
if
(
returnPage
==
null
){
returnPage
=
"0"
;
...
...
@@ -466,6 +468,8 @@ public class CourseResourceController {
ResourcePriceBean
bean
=
new
ResourcePriceBean
();
BeanConverter
.
copyProperties
(
bean
,
form
);
bean
.
setResourceCategory
(
ResourceCategoryEnum
.
COURSE
.
getValue
());
String
currentUserName
=
SpringSecurityUtil
.
getCurrentUserName
();
bean
.
setUpdateUser
(
currentUserName
);
service
.
setPrice
(
request
.
getAttribute
(
"userName"
).
toString
(),
bean
);
return
String
.
format
(
"redirect:/golf/course-resource/price?resourceId=%d"
,
bean
.
getResourceId
());
}
...
...
@@ -502,6 +506,8 @@ public class CourseResourceController {
ModelMap
model
)
{
ResourceInventoryBean
bean
=
new
ResourceInventoryBean
();
BeanConverter
.
copyProperties
(
bean
,
form
);
String
currentUserName
=
SpringSecurityUtil
.
getCurrentUserName
();
bean
.
setUpdateUser
(
currentUserName
);
bean
.
setResourceCategory
(
ResourceCategoryEnum
.
COURSE
.
getValue
());
service
.
setInventory
(
request
.
getAttribute
(
"userName"
).
toString
(),
bean
);
return
String
.
format
(
"redirect:/golf/course-resource/price?resourceId=%d"
,
resourceId
);
...
...
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