dcs před 10 měsíci
rodič
revize
fa911a556a
23 změnil soubory, kde provedl 446 přidání a 2 odebrání
  1. 6 0
      virgo.api/src/main/java/com/bosshand/virgo/api/controller/ContractController.java
  2. 2 0
      virgo.api/src/main/java/com/bosshand/virgo/api/controller/LookRecordController.java
  3. 14 0
      virgo.api/src/main/java/com/bosshand/virgo/api/controller/MeetingMinutesController.java
  4. 6 0
      virgo.api/src/main/java/com/bosshand/virgo/api/controller/MerchantController.java
  5. 6 0
      virgo.api/src/main/java/com/bosshand/virgo/api/controller/ProjectController.java
  6. 7 1
      virgo.api/src/main/java/com/bosshand/virgo/api/controller/ProjectItemController.java
  7. 4 0
      virgo.api/src/main/java/com/bosshand/virgo/api/controller/ProjectItemTargetController.java
  8. 9 0
      virgo.api/src/main/java/com/bosshand/virgo/api/controller/WorkOrderController.java
  9. 19 0
      virgo.core/src/main/java/com/bosshand/virgo/core/config/OperationControllerLog.java
  10. 87 0
      virgo.core/src/main/java/com/bosshand/virgo/core/config/OperationLogAspect.java
  11. 47 0
      virgo.core/src/main/java/com/bosshand/virgo/core/controller/OperationLogController.java
  12. 20 0
      virgo.core/src/main/java/com/bosshand/virgo/core/dao/OperationLogDao.java
  13. 97 0
      virgo.core/src/main/java/com/bosshand/virgo/core/model/OperationLog.java
  14. 33 0
      virgo.core/src/main/java/com/bosshand/virgo/core/service/OperationLogService.java
  15. 42 0
      virgo.core/src/main/resources/mapper/OperationLogMapper.xml
  16. 5 0
      virgo.file/src/main/java/com/bosshand/virgo/file/controller/DocumentCategoryController.java
  17. 11 0
      virgo.file/src/main/java/com/bosshand/virgo/file/controller/DocumentTemplateController.java
  18. 7 0
      virgo.file/src/main/java/com/bosshand/virgo/file/seal/controller/SealController.java
  19. 5 0
      virgo.manager/src/main/java/com/bosshand/virgo/controller/AgentController.java
  20. 7 1
      virgo.manager/src/main/java/com/bosshand/virgo/controller/ClientController.java
  21. 2 0
      virgo.manager/src/main/java/com/bosshand/virgo/controller/OrganizationController.java
  22. 5 0
      virgo.manager/src/main/java/com/bosshand/virgo/controller/RoleController.java
  23. 5 0
      virgo.manager/src/main/java/com/bosshand/virgo/controller/UserController.java

+ 6 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/controller/ContractController.java

@@ -5,6 +5,7 @@ import com.bosshand.virgo.api.model.Contract;
 import com.bosshand.virgo.api.model.Tag;
 import com.bosshand.virgo.api.service.ContractService;
 import com.bosshand.virgo.api.service.ProjectItemTargetRoomService;
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import com.bosshand.virgo.core.utils.StringUtil;
 import io.swagger.annotations.Api;
@@ -28,6 +29,7 @@ public class ContractController {
     @Autowired
     ProjectItemTargetRoomService projectItemTargetRoomService;
 
+    @OperationControllerLog(module = "合同管理", operation = "新建合同")
     @ApiOperation("保存")
     @RequestMapping(value = "", method = RequestMethod.POST)
     public Response insert(@RequestBody Contract contract) {
@@ -65,6 +67,7 @@ public class ContractController {
         }
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同列表")
     @ApiOperation("分页获取")
     @RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
     public Response list(@RequestBody Contract contract, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -85,6 +88,7 @@ public class ContractController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "编辑合同")
     @ApiOperation("更新合同和条款")
     @RequestMapping(value = "/updateAll", method = RequestMethod.PUT)
     public Response updateAll(@RequestBody Contract contract) {
@@ -92,6 +96,7 @@ public class ContractController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "删除合同")
     @ApiOperation("删除")
     @RequestMapping(value = "/delete/{id}", method = RequestMethod.DELETE)
     public Response delete(@PathVariable long id) {
@@ -99,6 +104,7 @@ public class ContractController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同详情")
     @ApiOperation("详情")
     @RequestMapping(value = "/{id}", method = RequestMethod.GET)
     public Response get(@PathVariable long id) {

+ 2 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/controller/LookRecordController.java

@@ -2,6 +2,7 @@ package com.bosshand.virgo.api.controller;
 
 import com.bosshand.virgo.api.model.LookRecord;
 import com.bosshand.virgo.api.service.LookRecordService;
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -20,6 +21,7 @@ public class LookRecordController {
     @Autowired
     LookRecordService lookRecordService;
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-会议设置-会议类型-新增")
     @ApiOperation("获取")
     @RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
     public Response list(@RequestBody LookRecord lookRecord, @PathVariable int currPage, @PathVariable int pageSize) {

+ 14 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/controller/MeetingMinutesController.java

@@ -4,6 +4,7 @@ import com.bosshand.virgo.api.model.MeetingMinutes;
 import com.bosshand.virgo.api.model.MeetingPlace;
 import com.bosshand.virgo.api.model.MeetingType;
 import com.bosshand.virgo.api.service.MeetingMinutesService;
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -22,6 +23,7 @@ public class MeetingMinutesController {
     @Autowired
     MeetingMinutesService meetingMinutesService;
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-新增")
     @ApiOperation("保存")
     @RequestMapping(value = "", method = RequestMethod.POST)
     public Response insert(@RequestBody MeetingMinutes meetingMinutes) {
@@ -29,6 +31,7 @@ public class MeetingMinutesController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-列表")
     @ApiOperation("获取")
     @RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
     public Response list(@RequestBody MeetingMinutes meetingMinutes, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -40,6 +43,7 @@ public class MeetingMinutesController {
         return Response.ok(result);
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-编辑")
     @ApiOperation("更新")
     @RequestMapping(value = "", method = RequestMethod.PUT)
     public Response update(@RequestBody MeetingMinutes meetingMinutes) {
@@ -47,6 +51,7 @@ public class MeetingMinutesController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-删除")
     @ApiOperation("删除")
     @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
     public Response delete(@PathVariable long id) {
@@ -54,6 +59,7 @@ public class MeetingMinutesController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-详情")
     @ApiOperation("详情")
     @RequestMapping(value = "/{id}", method = RequestMethod.GET)
     public Response get(@PathVariable long id) {
@@ -63,6 +69,7 @@ public class MeetingMinutesController {
     /**
      * 会议场所
      */
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-会议设置-会议场所-新增")
     @ApiOperation("保存会议场所")
     @RequestMapping(value = "/place", method = RequestMethod.POST)
     public Response insertMeetingPlace(@RequestBody MeetingPlace meetingPlace) {
@@ -70,12 +77,14 @@ public class MeetingMinutesController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-会议设置-会议场所-列表")
     @ApiOperation("获取会议场所")
     @RequestMapping(value = "/place/query", method = RequestMethod.POST)
     public Response getMeetingPlaceList(@RequestBody MeetingPlace meetingPlace) {
         return Response.ok(meetingMinutesService.getMeetingPlaceList(meetingPlace));
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-会议设置-会议场所-编辑")
     @ApiOperation("更新会议场所")
     @RequestMapping(value = "/place", method = RequestMethod.PUT)
     public Response updateMeetingPlace(@RequestBody MeetingPlace meetingPlace) {
@@ -83,6 +92,7 @@ public class MeetingMinutesController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-会议设置-会议场所-删除")
     @ApiOperation("删除会议场所")
     @RequestMapping(value = "/place/{id}", method = RequestMethod.DELETE)
     public Response deleteMeetingPlace(@PathVariable long id) {
@@ -94,6 +104,7 @@ public class MeetingMinutesController {
     /**
      * 会议类别
      */
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-会议设置-会议类型-新增")
     @ApiOperation("保存会议类别")
     @RequestMapping(value = "/type", method = RequestMethod.POST)
     public Response insertMeetingPlace(@RequestBody MeetingType meetingType) {
@@ -101,12 +112,14 @@ public class MeetingMinutesController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-会议设置-会议类型-列表")
     @ApiOperation("获取会议类别")
     @RequestMapping(value = "/type/query", method = RequestMethod.POST)
     public Response getMeetingPlaceList(@RequestBody MeetingType meetingType) {
         return Response.ok(meetingMinutesService.getMeetingTypeList(meetingType));
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-会议设置-会议类型-编辑")
     @ApiOperation("更新会议类别")
     @RequestMapping(value = "/type", method = RequestMethod.PUT)
     public Response updateMeetingPlace(@RequestBody MeetingType meetingType) {
@@ -114,6 +127,7 @@ public class MeetingMinutesController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "运维管理", operation = "会议纪要-会议设置-会议类型-删除")
     @ApiOperation("删除会议类别")
     @RequestMapping(value = "/type/{id}", method = RequestMethod.DELETE)
     public Response deleteMeetingType(@PathVariable long id) {

+ 6 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/controller/MerchantController.java

@@ -3,6 +3,7 @@ package com.bosshand.virgo.api.controller;
 
 import com.bosshand.virgo.api.model.Merchant;
 import com.bosshand.virgo.api.service.MerchantService;
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -21,6 +22,7 @@ public class MerchantController {
     @Autowired
     MerchantService merchantService;
 
+    @OperationControllerLog(module = "客商管理", operation = "新增")
     @ApiOperation("保存")
     @RequestMapping(value = "", method = RequestMethod.POST)
     public Response insert(@RequestBody Merchant merchant) {
@@ -34,6 +36,7 @@ public class MerchantController {
         return Response.ok(merchantService.getList(merchant));
     }
 
+    @OperationControllerLog(module = "客商管理", operation = "列表")
     @ApiOperation("分页获取")
     @RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
     public Response list(@RequestBody Merchant merchant, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -45,6 +48,7 @@ public class MerchantController {
         return Response.ok(result);
     }
 
+    @OperationControllerLog(module = "客商管理", operation = "编辑")
     @ApiOperation("更新")
     @RequestMapping(value = "/update", method = RequestMethod.PUT)
     public Response update(@RequestBody Merchant merchant) {
@@ -52,6 +56,7 @@ public class MerchantController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "客商管理", operation = "删除")
     @ApiOperation("删除")
     @RequestMapping(value = "/delete/{id}", method = RequestMethod.DELETE)
     public Response delete(@PathVariable long id) {
@@ -59,6 +64,7 @@ public class MerchantController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "客商管理", operation = "详情")
     @ApiOperation("详情")
     @RequestMapping(value = "/{id}", method = RequestMethod.GET)
     public Response get(@PathVariable long id) {

+ 6 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/controller/ProjectController.java

@@ -4,6 +4,7 @@ import com.bosshand.virgo.api.model.Project;
 import com.bosshand.virgo.api.service.ProjectItemTargetRoomService;
 import com.bosshand.virgo.api.service.ProjectService;
 import com.bosshand.virgo.api.service.QuartzService;
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -28,6 +29,7 @@ public class ProjectController {
     @Autowired
     QuartzService quartzService;
 
+    @OperationControllerLog(module = "空间管理", operation = "项目列表")
     @ApiOperation("获取")
     @RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
     public Response list(@RequestBody Project project, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -52,6 +54,7 @@ public class ProjectController {
         return Response.ok(projectService.getProjectListIdentity());
     }
 
+    @OperationControllerLog(module = "空间管理", operation = "项目详情")
     @ApiOperation("详情")
     @RequestMapping(value = "/getProject/{id}", method = RequestMethod.GET)
     public Response getProject(@PathVariable long id) {
@@ -64,6 +67,7 @@ public class ProjectController {
         return Response.ok(projectService.getProjectByOrganizationId(organizationId));
     }
 
+    @OperationControllerLog(module = "空间管理", operation = "项目新增")
     @ApiOperation("新增")
     @RequestMapping(value = "", method = RequestMethod.POST)
     public Response insertProject(@RequestBody Project project) {
@@ -75,6 +79,7 @@ public class ProjectController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "空间管理", operation = "项目删除")
     @ApiOperation("删除")
     @RequestMapping(value = "/delete/{id}", method = RequestMethod.DELETE)
     public Response deleteProject(@PathVariable long id) {
@@ -85,6 +90,7 @@ public class ProjectController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "空间管理", operation = "项目编辑")
     @ApiOperation("修改")
     @RequestMapping(value = "/update", method = RequestMethod.PUT)
     public Response updateProject(@RequestBody Project project) {

+ 7 - 1
virgo.api/src/main/java/com/bosshand/virgo/api/controller/ProjectItemController.java

@@ -3,6 +3,7 @@ package com.bosshand.virgo.api.controller;
 import com.bosshand.virgo.api.model.ProjectItem;
 import com.bosshand.virgo.api.service.ProjectItemService;
 import com.bosshand.virgo.api.service.ProjectItemTargetRoomService;
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -24,6 +25,7 @@ public class ProjectItemController {
 	@Autowired
 	ProjectItemTargetRoomService projectItemTargetRoomService;
 
+	@OperationControllerLog(module = "空间管理", operation = "楼宇设置-列表")
 	@ApiOperation("获取")
 	@RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
 	public Response list(@RequestBody ProjectItem projectItem, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -35,6 +37,7 @@ public class ProjectItemController {
 		return Response.ok(result);
 	}
 
+	@OperationControllerLog(module = "空间管理", operation = "楼宇设置-新增")
 	@ApiOperation("新增")
 	@RequestMapping(value = "", method = RequestMethod.POST)
 	public Response insertProjectItem(@RequestBody ProjectItem projectItem) {
@@ -43,6 +46,7 @@ public class ProjectItemController {
 		return Response.ok();
 	}
 
+	@OperationControllerLog(module = "空间管理", operation = "楼宇设置-删除")
 	@ApiOperation("删除")
 	@RequestMapping(value = "/delete/{id}", method = RequestMethod.DELETE)
 	public Response deleteProjectItem(@PathVariable long id) {
@@ -50,7 +54,8 @@ public class ProjectItemController {
 		projectItemTargetRoomService.projectItemCache.clear();
 		return Response.ok();
 	}
-	
+
+	@OperationControllerLog(module = "空间管理", operation = "楼宇设置-编辑")
 	@ApiOperation("修改")
 	@RequestMapping(value = "/update", method = RequestMethod.PUT)
 	public Response updateProjectItem(@RequestBody ProjectItem projectItem) {
@@ -59,6 +64,7 @@ public class ProjectItemController {
 		return Response.ok();
 	}
 
+	@OperationControllerLog(module = "空间管理", operation = "楼宇设置-详情")
 	@ApiOperation("详情")
 	@RequestMapping(value = "/{id}", method = RequestMethod.GET)
 	public Response get(@PathVariable long id) {

+ 4 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/controller/ProjectItemTargetController.java

@@ -3,6 +3,7 @@ package com.bosshand.virgo.api.controller;
 import com.bosshand.virgo.api.model.ProjectItemTarget;
 import com.bosshand.virgo.api.service.ProjectItemTargetRoomService;
 import com.bosshand.virgo.api.service.ProjectItemTargetService;
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -26,6 +27,7 @@ public class ProjectItemTargetController {
         return Response.ok(projectItemTargetService.get(id));
     }
 
+    @OperationControllerLog(module = "空间管理", operation = "楼宇设置-楼层-新增")
     @ApiOperation("新增")
     @RequestMapping(value = "", method = RequestMethod.POST)
     public Response insert(@RequestBody ProjectItemTarget projectItemTarget) {
@@ -34,6 +36,7 @@ public class ProjectItemTargetController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "空间管理", operation = "楼宇设置-楼层-删除")
     @ApiOperation("删除")
     @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
     public Response delete(@PathVariable long id) {
@@ -42,6 +45,7 @@ public class ProjectItemTargetController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "空间管理", operation = "楼宇设置-楼层-编辑")
     @ApiOperation("修改")
     @RequestMapping(value = "", method = RequestMethod.PUT)
     public Response update(@RequestBody ProjectItemTarget projectItemTarget) {

+ 9 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/controller/WorkOrderController.java

@@ -5,6 +5,7 @@ import com.bosshand.virgo.api.model.WorkOrder;
 import com.bosshand.virgo.api.model.WorkOrderProcess;
 import com.bosshand.virgo.api.service.ProjectItemTargetRoomService;
 import com.bosshand.virgo.api.service.WorkOrderService;
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import com.bosshand.virgo.core.utils.StringUtil;
 import io.swagger.annotations.Api;
@@ -27,6 +28,7 @@ public class WorkOrderController {
     @Autowired
     ProjectItemTargetRoomService projectItemTargetRoomService;
 
+    @OperationControllerLog(module = "工单管理", operation = "列表")
     @ApiOperation("分页获取")
     @RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
     public Response list(@RequestBody WorkOrder workOrder, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -39,6 +41,7 @@ public class WorkOrderController {
         return Response.ok(result);
     }
 
+    @OperationControllerLog(module = "工单管理", operation = "新增")
     @ApiOperation("保存")
     @RequestMapping(value = "", method = RequestMethod.POST)
     public Response insert(@RequestBody WorkOrder workOrder) {
@@ -46,6 +49,7 @@ public class WorkOrderController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "工单管理", operation = "编辑")
     @ApiOperation("更新")
     @RequestMapping(value = "/update", method = RequestMethod.PUT)
     public Response update(@RequestBody WorkOrder workOrder) {
@@ -53,6 +57,7 @@ public class WorkOrderController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "工单管理", operation = "删除")
     @ApiOperation("删除")
     @RequestMapping(value = "/delete/{id}", method = RequestMethod.DELETE)
     public Response delete(@PathVariable long id) {
@@ -60,6 +65,7 @@ public class WorkOrderController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "工单管理", operation = "详情")
     @ApiOperation("详情")
     @RequestMapping(value = "/{id}", method = RequestMethod.GET)
     public Response get(@PathVariable long id) {
@@ -80,6 +86,7 @@ public class WorkOrderController {
         }
     }
 
+    @OperationControllerLog(module = "工单管理", operation = "新增操作")
     @ApiOperation("保存过程")
     @RequestMapping(value = "/process", method = RequestMethod.POST)
     public Response insertProcess(@RequestBody WorkOrderProcess workOrderProcess) {
@@ -87,6 +94,7 @@ public class WorkOrderController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "工单管理", operation = "处理操作")
     @ApiOperation("更新过程")
     @RequestMapping(value = "/process/update", method = RequestMethod.PUT)
     public Response updateProcess(@RequestBody WorkOrderProcess workOrderProcess) {
@@ -94,6 +102,7 @@ public class WorkOrderController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "工单管理", operation = "删除操作")
     @ApiOperation("删除过程")
     @RequestMapping(value = "/process/delete/{id}", method = RequestMethod.DELETE)
     public Response deleteProcess(@PathVariable long id) {

+ 19 - 0
virgo.core/src/main/java/com/bosshand/virgo/core/config/OperationControllerLog.java

@@ -0,0 +1,19 @@
+package com.bosshand.virgo.core.config;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * controller层切面日志注解
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface OperationControllerLog {
+    // 操作
+    String operation();
+
+    // 模块
+    String module();
+}

+ 87 - 0
virgo.core/src/main/java/com/bosshand/virgo/core/config/OperationLogAspect.java

@@ -0,0 +1,87 @@
+package com.bosshand.virgo.core.config;
+
+import cn.hutool.json.JSONUtil;
+import com.bosshand.virgo.core.model.OperationLog;
+import com.bosshand.virgo.core.response.Response;
+import com.bosshand.virgo.core.service.OperationLogService;
+import com.bosshand.virgo.core.utils.ContextUtils;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+
+@Aspect
+@Component
+public class OperationLogAspect {
+
+    private static final Logger logger = LoggerFactory.getLogger(OperationLogAspect.class);
+
+    @Autowired
+    private OperationLogService operationLogService;
+
+    /**
+     * Controller层切点
+     */
+    @Pointcut("@annotation(com.bosshand.virgo.core.config.OperationControllerLog)")
+    public void OperationControllerLog() {
+
+    }
+
+    /**
+     * 前置通知 用于拦截Controller层记录用户的操作
+     *
+     * @param joinPoint 切点
+     * @throws InterruptedException
+     */
+    @Before("OperationControllerLog()")
+    public void doBefore(JoinPoint joinPoint) throws InterruptedException {
+        logger.info("进入日志切面前置通知!");
+    }
+
+    //使用这个方法先注释前面三个方法,留before方法就行
+
+    /**
+     * 通知包裹了目标方法,在目标方法调用之前和之后执行自定义的行为
+     * ProceedingJoinPoint切入点可以获取切入点方法上的名字、参数、注解和对象
+     *
+     * @param joinPoint
+     */
+    @Around("OperationControllerLog() && @annotation(operationControllerLog)")
+    public Response doAfterReturning(ProceedingJoinPoint joinPoint, OperationControllerLog operationControllerLog) throws Throwable {
+        logger.info("设置日志信息存储到表中!");
+        //joinPoint.proceed() 结果集
+        //参数数组
+        Object[] args = joinPoint.getArgs();
+        //请求参数数据
+        String requestJson = JSONUtil.toJsonStr(args);
+        //方法名
+        String methodName = joinPoint.getSignature().getName();
+        //得到request
+        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+        //得到url
+        String url = request.getRequestURL().toString();
+        //写入操作日志
+        long userId = ContextUtils.getCurrentUser().getId();
+        OperationLog operationLog = new OperationLog();
+        operationLog.setUserId(userId);
+        operationLog.setUrl(url);
+        operationLog.setData(requestJson);
+        operationLog.setModule(operationControllerLog.module());
+        operationLog.setOperation(operationControllerLog.operation());
+        //保存
+        operationLogService.insert(operationLog);
+        Response response = (Response) joinPoint.proceed();
+        return response;
+    }
+
+}

+ 47 - 0
virgo.core/src/main/java/com/bosshand/virgo/core/controller/OperationLogController.java

@@ -0,0 +1,47 @@
+package com.bosshand.virgo.core.controller;
+
+import com.bosshand.virgo.core.model.OperationLog;
+import com.bosshand.virgo.core.service.OperationLogService;
+import com.bosshand.virgo.core.response.Response;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping({"operationLog"})
+@Api(tags = {"日志管理"})
+public class OperationLogController {
+
+    @Autowired
+    OperationLogService operationLogService;
+
+    @ApiOperation("分页获取")
+    @RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
+    public Response list(@RequestBody OperationLog operationLog, @PathVariable int currPage, @PathVariable int pageSize) {
+        int totalCount = operationLogService.getTotalCount(operationLog);
+        List<OperationLog> dataList = operationLogService.getLimit(operationLog, currPage, pageSize);
+        Map<String, Object> result = new HashMap<>();
+        result.put("dataList", dataList);
+        result.put("totalCount", totalCount);
+        return Response.ok(result);
+    }
+
+    @ApiOperation("保存")
+    @RequestMapping(value = "", method = RequestMethod.POST)
+    public Response insert(@RequestBody OperationLog operationLog) {
+        operationLogService.insert(operationLog);
+        return Response.ok();
+    }
+
+    @ApiOperation("详情")
+    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+    public Response get(@PathVariable long id) {
+        return Response.ok(operationLogService.get(id));
+    }
+
+}

+ 20 - 0
virgo.core/src/main/java/com/bosshand/virgo/core/dao/OperationLogDao.java

@@ -0,0 +1,20 @@
+package com.bosshand.virgo.core.dao;
+
+import com.bosshand.virgo.core.model.OperationLog;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface OperationLogDao {
+
+    int insert(OperationLog operationLog);
+
+    OperationLog get(long id);
+
+    int getTotalCount(OperationLog operationLog);
+
+    List<OperationLog> getLimit(@Param("p") OperationLog p, @Param("currIndex") int currIndex, @Param("pageSize") int pageSize);
+
+}

+ 97 - 0
virgo.core/src/main/java/com/bosshand/virgo/core/model/OperationLog.java

@@ -0,0 +1,97 @@
+package com.bosshand.virgo.core.model;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.util.Date;
+
+/**
+ * 操作日志
+ */
+public class OperationLog {
+
+    private long id;
+
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date date;
+
+    /**
+     * 用户id
+     */
+    private long userId;
+
+    /**
+     * 模块
+     */
+    private String module;
+
+    /**
+     * 操作
+     */
+    private String operation;
+
+    /**
+     * 请求Url
+     */
+    private String url;
+
+    /**
+     * 请求数据
+     */
+    private String data;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(long userId) {
+        this.userId = userId;
+    }
+
+    public String getModule() {
+        return module;
+    }
+
+    public void setModule(String module) {
+        this.module = module;
+    }
+
+    public String getOperation() {
+        return operation;
+    }
+
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+}

+ 33 - 0
virgo.core/src/main/java/com/bosshand/virgo/core/service/OperationLogService.java

@@ -0,0 +1,33 @@
+package com.bosshand.virgo.core.service;
+
+import com.bosshand.virgo.core.dao.OperationLogDao;
+import com.bosshand.virgo.core.model.OperationLog;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class OperationLogService {
+
+    @Autowired
+    OperationLogDao operationLogDao;
+
+    public int getTotalCount(OperationLog operationLog) {
+        return operationLogDao.getTotalCount(operationLog);
+    }
+
+    public List<OperationLog> getLimit(OperationLog operationLog, int currPage, int pageSize) {
+        int currIndex = (currPage - 1) * pageSize;
+        return operationLogDao.getLimit(operationLog, currIndex, pageSize);
+    }
+
+    public int insert(OperationLog operationLog) {
+        return operationLogDao.insert(operationLog);
+    }
+
+    public OperationLog get(long id) {
+        return operationLogDao.get(id);
+    }
+
+}

+ 42 - 0
virgo.core/src/main/resources/mapper/OperationLogMapper.xml

@@ -0,0 +1,42 @@
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.bosshand.virgo.core.dao.OperationLogDao">
+
+    <resultMap type="com.bosshand.virgo.core.model.OperationLog" id="result">
+        <id column="id" property="id"/>
+        <result column="date" property="date"/>
+        <result column="userId" property="userId"/>
+        <result column="url" property="url"/>
+        <result column="module" property="module"/>
+        <result column="operation" property="operation"/>
+        <result column="data" property="data"/>
+    </resultMap>
+
+    <insert id="insert" parameterType="com.bosshand.virgo.core.model.OperationLog" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO operation_log(`date`, `userId`, `url`, `module`, `operation`, `data`)
+        VALUES (now(), #{userId}, #{url}, #{module}, #{operation}, #{data})
+    </insert>
+
+    <select id="get" resultMap="result">
+        select * from operation_log where id = #{id}
+    </select>
+
+    <select id="getTotalCount" parameterType="com.bosshand.virgo.core.model.OperationLog" resultType="Integer">
+        SELECT count(*) FROM operation_log
+        <where>
+            <if test="userId!=0">and userId=#{userId}</if>
+        </where>
+    </select>
+
+    <select id="getLimit" resultMap="result">
+        SELECT * FROM operation_log
+        <where>
+            <if test="userId!=0">and a.userId=#{p.userId}</if>
+        </where>
+        order by a.date desc
+        limit #{currIndex} , #{pageSize}
+    </select>
+
+</mapper>

+ 5 - 0
virgo.file/src/main/java/com/bosshand/virgo/file/controller/DocumentCategoryController.java

@@ -1,5 +1,6 @@
 package com.bosshand.virgo.file.controller;
 
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import com.bosshand.virgo.file.document.DocumentService;
 import com.bosshand.virgo.file.document.model.DocumentCategory;
@@ -16,6 +17,7 @@ public class DocumentCategoryController {
     @Autowired
     private DocumentService documentService;
 
+    @OperationControllerLog(module = "合同管理", operation = "合同分类-新建分类")
     @ApiOperation("保存标签")
     @RequestMapping(value = "/category", method = RequestMethod.POST)
     public Response saveCategory(@RequestBody DocumentCategory documentCategory) {
@@ -23,12 +25,14 @@ public class DocumentCategoryController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同分类-分类列表")
     @ApiOperation("获取标签")
     @RequestMapping(value = "/category/{organizationId}/{projectId}", method = RequestMethod.GET)
     public Response getDirectory(@PathVariable long organizationId, @PathVariable long projectId) {
         return Response.ok(documentService.getDirectory(organizationId, projectId));
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同分类-编辑分类")
     @ApiOperation("更新标签")
     @RequestMapping(value = "/category", method = RequestMethod.PUT)
     public Response updateCategory(@RequestBody DocumentCategory documentCategory) {
@@ -36,6 +40,7 @@ public class DocumentCategoryController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同分类-删除分类")
     @ApiOperation("删除标签")
     @RequestMapping(value = "/category/{id}", method = RequestMethod.DELETE)
     public Response deleteCategory(@PathVariable long id) {

+ 11 - 0
virgo.file/src/main/java/com/bosshand/virgo/file/controller/DocumentTemplateController.java

@@ -1,5 +1,6 @@
 package com.bosshand.virgo.file.controller;
 
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import com.bosshand.virgo.exception.BadRequestException;
 import com.bosshand.virgo.exception.Constant;
@@ -28,6 +29,7 @@ public class DocumentTemplateController {
     @Autowired
     private DocumentService documentService;
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-模版列表")
     @ApiOperation("模板分页")
     @RequestMapping(value = "/{categoryId}/{currPage}/{pageSize}", method = RequestMethod.GET)
     public Response getTemplateList(@PathVariable int categoryId, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -39,12 +41,14 @@ public class DocumentTemplateController {
         return Response.ok(result);
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-预览模版")
     @ApiOperation("获取模板")
     @RequestMapping(value = "/{id}", method = RequestMethod.GET)
     public Response getTemplate(@PathVariable Long id) {
         return Response.ok(documentService.getTemplate(id));
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-下载模版")
     @ApiOperation("获取模板流")
     @RequestMapping(value = "/raw/{id}", method = RequestMethod.GET)
     public Response getRawTemplate(@PathVariable int id, final HttpServletResponse response) {
@@ -95,6 +99,7 @@ public class DocumentTemplateController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-上传合同模版")
     @ApiOperation("导入模板")
     @RequestMapping(value = "/import", method = RequestMethod.POST)
     public Response uploadTemplate(@RequestBody DocumentTemplate template) {
@@ -109,6 +114,7 @@ public class DocumentTemplateController {
         return Response.ok(template);
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-重新上传合同模版")
     @ApiOperation("更新模板")
     @RequestMapping(value = "/update", method = RequestMethod.PUT)
     public Response updateTemplate(@RequestBody DocumentTemplate template) {
@@ -123,6 +129,7 @@ public class DocumentTemplateController {
         return Response.ok(template);
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-删除合同模版")
     @ApiOperation(value = "删除模版", notes = "删除模版")
     @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
     public Response deleteTemplate(@PathVariable long id) {
@@ -137,6 +144,7 @@ public class DocumentTemplateController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-新增合同模版字段")
     @ApiOperation("保存模板字段")
     @RequestMapping(value = "/data", method = RequestMethod.POST)
     public Response insertDocumentInputData(@RequestBody DocumentInputData documentInputData) {
@@ -144,12 +152,14 @@ public class DocumentTemplateController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-合同模版字段列表")
     @ApiOperation("获取模板字段")
     @RequestMapping(value = "/data/list", method = RequestMethod.POST)
     public Response getDocumentInputDataList(@RequestBody DocumentInputData documentInputData) {
         return Response.ok(documentService.getDocumentInputDataList(documentInputData));
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-编辑合同模版字段")
     @ApiOperation("更新模板字段")
     @RequestMapping(value = "/data/update", method = RequestMethod.PUT)
     public Response updateDocumentInputData(@RequestBody DocumentInputData documentInputData) {
@@ -157,6 +167,7 @@ public class DocumentTemplateController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "合同管理", operation = "合同模版-删除合同模版字段")
     @ApiOperation("删除模板字段")
     @RequestMapping(value = "/data/delete/{id}", method = RequestMethod.DELETE)
     public Response deleteDocumentInputData(@PathVariable long id) {

+ 7 - 0
virgo.file/src/main/java/com/bosshand/virgo/file/seal/controller/SealController.java

@@ -1,5 +1,6 @@
 package com.bosshand.virgo.file.seal.controller;
 
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.response.Response;
 import com.bosshand.virgo.exception.BadRequestException;
 import com.bosshand.virgo.exception.ServiceException;
@@ -25,12 +26,15 @@ public class SealController {
     @Autowired
     private FileManagerService fileManagerService;
 
+
+    @OperationControllerLog(module = "公司管理", operation = "印章管理-印章列表")
     @ApiOperation(value = "印章", notes = "印章列表")
     @RequestMapping(value = "/seal/{organizationId}", method = RequestMethod.GET)
     public Response getList(@PathVariable int organizationId) {
         return Response.ok(sealService.getList(organizationId));
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "印章管理-查看申请印章")
     @ApiOperation(value = "印章", notes = "申请印章列表分页")
     @RequestMapping(value = "/sealRequest/{sealId}/{currPage}/{pageSize}", method = RequestMethod.GET)
     public Response getListLimit(@PathVariable int sealId, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -41,12 +45,14 @@ public class SealController {
         return Response.ok(result);
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "印章管理-印章详情")
     @ApiOperation(value = "印章", notes = "印章详情")
     @RequestMapping(value = "/seal/detail/{id}", method = RequestMethod.GET)
     public Response get(@PathVariable int id) {
         return Response.ok(sealService.getById(id));
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "印章管理-新增印章")
     @ApiOperation(value = "印章", notes = "创建印章")
     @RequestMapping(value = "/seal", method = RequestMethod.POST)
     public Response createSeal(@RequestBody Seal seal) {
@@ -59,6 +65,7 @@ public class SealController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "印章管理-印章编辑")
     @ApiOperation(value = "印章", notes = "修改印章")
     @RequestMapping(value = "/seal", method = RequestMethod.PUT)
     public Response updateSeal(@RequestBody Seal seal) {

+ 5 - 0
virgo.manager/src/main/java/com/bosshand/virgo/controller/AgentController.java

@@ -1,5 +1,6 @@
 package com.bosshand.virgo.controller;
 
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.model.MgrAgent;
 import com.bosshand.virgo.core.response.Response;
 import com.bosshand.virgo.core.utils.ContextUtils;
@@ -19,6 +20,7 @@ public class AgentController {
     @Autowired
     AgentService agentService;
 
+    @OperationControllerLog(module = "CRM", operation = "经纪管理-列表查询")
     @ApiOperation("获取")
     @RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
     public Response list(@RequestBody MgrAgent mgrAgent, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -32,6 +34,7 @@ public class AgentController {
         return Response.ok(result);
     }
 
+    @OperationControllerLog(module = "CRM", operation = "经济管理-新增经纪人")
     @ApiOperation("保存")
     @RequestMapping(value = "", method = RequestMethod.POST)
     public Response insert(@RequestBody MgrAgent mgrAgent) {
@@ -41,6 +44,7 @@ public class AgentController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "CRM", operation = "经济管理-编辑经纪人")
     @ApiOperation("更新")
     @RequestMapping(value = "/update", method = RequestMethod.PUT)
     public Response update(@RequestBody MgrAgent mgrAgent) {
@@ -48,6 +52,7 @@ public class AgentController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "CRM", operation = "经济管理-删除经纪人")
     @ApiOperation("删除")
     @RequestMapping(value = "/delete/{id}", method = RequestMethod.DELETE)
     public Response delete(@PathVariable long id) {

+ 7 - 1
virgo.manager/src/main/java/com/bosshand/virgo/controller/ClientController.java

@@ -1,5 +1,6 @@
 package com.bosshand.virgo.controller;
 
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.model.MgrClient;
 import com.bosshand.virgo.core.response.Response;
 import com.bosshand.virgo.core.utils.ContextUtils;
@@ -29,6 +30,7 @@ public class ClientController {
     @Autowired
     ClientService clientService;
 
+    @OperationControllerLog(module = "CRM", operation = "客户管理-客户列表查询")
     @ApiOperation("获取")
     @RequestMapping(value = "/{currPage}/{pageSize}", method = RequestMethod.POST)
     public Response list(@RequestBody MgrClient mgrClient, @PathVariable int currPage, @PathVariable int pageSize) {
@@ -42,6 +44,7 @@ public class ClientController {
         return Response.ok(result);
     }
 
+    @OperationControllerLog(module = "CRM", operation = "客户管理-新增客户")
     @ApiOperation("保存")
     @RequestMapping(value = "", method = RequestMethod.POST)
     public Response insert(@RequestBody MgrClient mgrClient) {
@@ -51,9 +54,10 @@ public class ClientController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "CRM", operation = "客户管理-标准模板下载")
     @ApiOperation("标准模板下载")
     @RequestMapping(value = "/downloadModel", method = RequestMethod.GET)
-    public void getModel(final HttpServletResponse response) throws Exception {
+    public Response getModel(final HttpServletResponse response) throws Exception {
         byte[] data = null;
         OutputStream outputStream = null;
         try {
@@ -74,8 +78,10 @@ public class ClientController {
                 }
             }
         }
+        return Response.ok();
     }
 
+    @OperationControllerLog(module = "CRM", operation = "客户管理-批量导入")
     @ApiOperation("批量导入")
     @RequestMapping(value = "/import/{organizationId}", method = RequestMethod.POST)
     public Response insert(@ApiParam(name = "uploadFile", required = true) MultipartFile uploadFile, @PathVariable long organizationId) {

+ 2 - 0
virgo.manager/src/main/java/com/bosshand/virgo/controller/OrganizationController.java

@@ -1,6 +1,7 @@
 package com.bosshand.virgo.controller;
 
 import com.alibaba.fastjson.JSONObject;
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.model.MgrOrganization;
 import com.bosshand.virgo.core.response.Response;
 import com.bosshand.virgo.service.OrganizationService;
@@ -37,6 +38,7 @@ public class OrganizationController {
 		return Response.ok(mgrOrganization);
 	}
 
+	@OperationControllerLog(module = "公司管理", operation = "公司信息-修改")
 	@ApiOperation(value="组织信息更新", notes="组织信息更新")
 	@RequestMapping(value = "/organization/update", method = RequestMethod.POST)
 	public Response updateOrganization(@RequestBody MgrOrganization mgrOrganization) {

+ 5 - 0
virgo.manager/src/main/java/com/bosshand/virgo/controller/RoleController.java

@@ -1,6 +1,7 @@
 package com.bosshand.virgo.controller;
 
 
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.model.MgrRole;
 import com.bosshand.virgo.core.response.Response;
 import com.bosshand.virgo.service.RoleService;
@@ -15,12 +16,14 @@ public class RoleController {
     @Autowired
     RoleService roleService;
 
+    @OperationControllerLog(module = "公司管理", operation = "部门管理-部门列表")
     @ApiOperation(value = "角色树", notes = "角色树")
     @GetMapping("/{organizationId}/{projectId}")
     public Response getOrganizationId(@PathVariable long organizationId, @PathVariable long projectId) {
         return Response.ok(roleService.getList(projectId, organizationId));
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "部门管理-新增部门")
     @ApiOperation(value = "新增", notes = "新增")
     @PostMapping
     public Response save(@RequestBody MgrRole mgrRole) {
@@ -28,6 +31,7 @@ public class RoleController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "部门管理-编辑部门")
     @ApiOperation(value = "修改", notes = "修改")
     @PutMapping
     public Response update(@RequestBody MgrRole mgrRole) {
@@ -35,6 +39,7 @@ public class RoleController {
         return Response.ok();
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "部门管理-删除部门")
     @ApiOperation(value = "删除", notes = "删除")
     @DeleteMapping("/{id}")
     public Response delete(@PathVariable long id) {

+ 5 - 0
virgo.manager/src/main/java/com/bosshand/virgo/controller/UserController.java

@@ -1,5 +1,6 @@
 package com.bosshand.virgo.controller;
 
+import com.bosshand.virgo.core.config.OperationControllerLog;
 import com.bosshand.virgo.core.model.MgrUser;
 import com.bosshand.virgo.core.model.MgrUserRole;
 import com.bosshand.virgo.core.response.Response;
@@ -25,12 +26,14 @@ public class UserController {
         return Response.fail(20001, "用户不存在!");
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "人员管理-成员列表")
     @ApiOperation(value = "用户列表", notes = "用户列表")
     @RequestMapping(value = "/list/{organizationId}/{roleId}", method = RequestMethod.POST)
     public Response listUser(@PathVariable long organizationId, @PathVariable long roleId) {
         return Response.ok(userService.listUser(organizationId, roleId));
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "人员管理-新增成员")
     @ApiOperation(value = "用户新增", notes = "用户新增")
     @RequestMapping(value = "/add/{organizationId}/{roleIds}", method = RequestMethod.POST)
     public Response addUser(@RequestBody MgrUser user, @PathVariable long organizationId, @PathVariable String roleIds) {
@@ -38,6 +41,7 @@ public class UserController {
         return Response.ok(userService.getByPhone(user.getPhone()));
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "人员管理-删除成员")
     @ApiOperation(value = "删除用户", notes = "删除用户")
     @RequestMapping(value = "/delete/{organizationId}/{id}", method = RequestMethod.DELETE)
     public Response deleteUser(@PathVariable long organizationId, @PathVariable long id) {
@@ -45,6 +49,7 @@ public class UserController {
         return Response.ok("成功");
     }
 
+    @OperationControllerLog(module = "公司管理", operation = "人员管理-设置权限")
     @ApiOperation(value = "更新部门角色", notes = "更新部门角色")
     @RequestMapping(value = "/updateUserRole", method = RequestMethod.POST)
     public Response updateUserRole(@RequestBody MgrUserRole userRole) {