Commit 4621dbb5 by Huang Linyu

后台修改资源操作,能记录最后操作人

parent cbe81e4b
......@@ -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("批量设置资源状态异常");
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment