From c67d9ee1392e4b40fb2210d0392176acd8fd231e Mon Sep 17 00:00:00 2001 From: chendengyao <1171077218@qq.com> Date: Thu, 17 Jun 2021 10:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E6=93=8D=E4=BD=9C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yipin/liuwanr/config/LogAspect.java | 5 ----- .../yipin/liuwanr/controller/AliyunOssController.java | 6 +++--- .../yipin/liuwanr/controller/AssesmentController.java | 6 ++++++ .../com/yipin/liuwanr/controller/CityController.java | 4 ++++ .../com/yipin/liuwanr/controller/CourseController.java | 5 +++++ .../yipin/liuwanr/controller/CustomerController.java | 4 ++++ .../controller/ExperimentalClassController.java | 6 ++++++ .../controller/ExperimentallearningController.java | 2 ++ .../com/yipin/liuwanr/controller/OrderController.java | 3 +++ .../yipin/liuwanr/controller/PracticeController.java | 2 ++ .../liuwanr/controller/ProjectAndCourseController.java | 4 ++++ .../yipin/liuwanr/controller/ProvinceController.java | 4 ++++ .../com/yipin/liuwanr/controller/SchoolController.java | 4 ++++ .../liuwanr/controller/ServiceConfigController.java | 4 ++++ .../com/yipin/liuwanr/controller/StaffController.java | 3 +++ .../yipin/liuwanr/controller/StaffGradeController.java | 4 ++++ .../StaffProfessionalArchitectureController.java | 4 ++++ .../StuProfessionalArchitectureController.java | 10 ++++++++++ .../yipin/liuwanr/controller/StudentController.java | 3 +++ .../com/yipin/liuwanr/controller/UserController.java | 7 ++++++- .../yipin/liuwanr/controller/UserInfoController.java | 9 +++++++++ src/main/java/com/yipin/liuwanr/entity/SysLog.java | 8 ++++---- 22 files changed, 94 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/config/LogAspect.java b/src/main/java/com/yipin/liuwanr/config/LogAspect.java index bdd188e..ba77626 100644 --- a/src/main/java/com/yipin/liuwanr/config/LogAspect.java +++ b/src/main/java/com/yipin/liuwanr/config/LogAspect.java @@ -6,19 +6,14 @@ import com.yipin.liuwanr.entity.annotation.Log; import com.yipin.liuwanr.util.IPUtils; import com.yipin.liuwanr.util.UserIdUtils; import lombok.extern.slf4j.Slf4j; -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.aspectj.lang.reflect.MethodSignature; -import org.jboss.logging.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.stereotype.Component; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.http.HttpServletRequest; import java.lang.reflect.Method; diff --git a/src/main/java/com/yipin/liuwanr/controller/AliyunOssController.java b/src/main/java/com/yipin/liuwanr/controller/AliyunOssController.java index a71fadc..05065b2 100644 --- a/src/main/java/com/yipin/liuwanr/controller/AliyunOssController.java +++ b/src/main/java/com/yipin/liuwanr/controller/AliyunOssController.java @@ -4,6 +4,7 @@ import java.util.HashMap; import javax.servlet.http.HttpServletResponse; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -27,6 +28,7 @@ public class AliyunOssController { * @param file * @return */ + @Log("上传文件") @PostMapping("/uploadFiles") Response uploadFiles(MultipartFile file) { Response resp = new Response(); @@ -40,7 +42,6 @@ public class AliyunOssController { resp.setErrmessage(ret.get("retvalue").toString()); } return resp; - } /** @@ -48,6 +49,7 @@ public class AliyunOssController { * @param objectName:在阿里云的文件路径 * @return */ + @Log("下载文件") @GetMapping("/downloadFiles") Response downloadFiles(HttpServletResponse response,@RequestParam String objectName) { Response resp = new Response(); @@ -60,8 +62,6 @@ public class AliyunOssController { resp.setErrmessage("下载失败"); } return null; - - } } diff --git a/src/main/java/com/yipin/liuwanr/controller/AssesmentController.java b/src/main/java/com/yipin/liuwanr/controller/AssesmentController.java index 37a9f3c..cf04532 100644 --- a/src/main/java/com/yipin/liuwanr/controller/AssesmentController.java +++ b/src/main/java/com/yipin/liuwanr/controller/AssesmentController.java @@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; import java.util.List; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; @@ -82,6 +83,7 @@ public class AssesmentController { * @param vo * @return */ + @Log("创建考核") @PostMapping("/addAssesment") Response addAssesment(@RequestBody AssesmentStudentVo vo) { Response resp = new Response(); @@ -163,6 +165,7 @@ public class AssesmentController { * @param vo * @return */ + @Log("修改考核") @PostMapping("/updateAssesment") Response updateAssesment(@RequestBody AssesmentStudentVo vo) { Response resp = new Response(); @@ -217,6 +220,7 @@ public class AssesmentController { * 修改考核状态 * @return */ + @Log("修改考核状态") @PostMapping("/updateState") Response updateState(@RequestBody Assesment assesment) { Response resp = new Response(); @@ -466,6 +470,7 @@ public class AssesmentController { * @param courseId * @return */ + @Log("发布考核") @GetMapping("/releaseAssesment") Response releaseAssesment(@RequestParam Integer courseId){ Response resp = new Response(); @@ -483,6 +488,7 @@ public class AssesmentController { return resp; } + @Log("删除考核") @PostMapping("/deleteAssesment") Response deleteAssesment(@RequestBody Assesment assesment){ Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/CityController.java b/src/main/java/com/yipin/liuwanr/controller/CityController.java index 07bb533..889bb24 100644 --- a/src/main/java/com/yipin/liuwanr/controller/CityController.java +++ b/src/main/java/com/yipin/liuwanr/controller/CityController.java @@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; import com.yipin.liuwanr.entity.StudentCity; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; @@ -31,6 +32,7 @@ public class CityController { /** * 添加城市 */ + @Log("添加城市") @PostMapping("/addCity") Response addCustomer(@RequestBody StudentCity studentCity) { Response resp = new Response(); @@ -67,6 +69,7 @@ public class CityController { /** * 删除城市 */ + @Log("删除城市") @PostMapping("/deleteCity") Response deleteCity(@RequestParam Integer cityId) { Response resp = new Response(); @@ -90,6 +93,7 @@ public class CityController { /** * 更新城市 */ + @Log("更新城市") @RequestMapping(value="/updateCity",method = RequestMethod.POST) Response updateCity(@RequestBody StudentCity studentCity) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/CourseController.java b/src/main/java/com/yipin/liuwanr/controller/CourseController.java index baae4d5..bc1ae2e 100644 --- a/src/main/java/com/yipin/liuwanr/controller/CourseController.java +++ b/src/main/java/com/yipin/liuwanr/controller/CourseController.java @@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; import java.util.List; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; @@ -36,6 +37,7 @@ public class CourseController { * 添加课程 * */ + @Log("添加课程") @PostMapping("/addCourse") Response addCustomer(@RequestBody CourseVO vo) { Response resp = new Response(); @@ -224,6 +226,7 @@ public class CourseController { /** * 删除课程 */ + @Log("删除课程") @PostMapping("/deleteCourse") Response deleteCourse(@RequestBody List courseId) { Response resp = new Response(); @@ -247,6 +250,7 @@ public class CourseController { /** * 更新课程 */ + @Log("更新课程") @RequestMapping(value="/updateCourse",method = RequestMethod.POST) Response updateCourse(@RequestBody CourseVO vo) { Response resp = new Response(); @@ -499,6 +503,7 @@ public class CourseController { /** * 更新环节 */ + @Log("更新环节") @PostMapping("/updateLink") Response updateLink(@RequestBody CourseLink courseLink) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/CustomerController.java b/src/main/java/com/yipin/liuwanr/controller/CustomerController.java index 3479beb..7bc58f8 100644 --- a/src/main/java/com/yipin/liuwanr/controller/CustomerController.java +++ b/src/main/java/com/yipin/liuwanr/controller/CustomerController.java @@ -4,6 +4,7 @@ import com.yipin.liuwanr.entity.Customer; import com.yipin.liuwanr.entity.Response; import com.yipin.liuwanr.entity.School; import com.yipin.liuwanr.entity.UserM; +import com.yipin.liuwanr.entity.annotation.Log; import com.yipin.liuwanr.helper.RedisHelper; import com.yipin.liuwanr.service.CustomerService; import org.springframework.beans.factory.annotation.Autowired; @@ -25,6 +26,7 @@ public class CustomerController { /** * 添加客户 */ + @Log("添加客户") @PostMapping("/addCustomer") Response addCustomer(@RequestBody Customer customer) { Response resp = new Response(); @@ -135,6 +137,7 @@ public class CustomerController { /** * 删除客户 */ + @Log("删除客户") @PostMapping("/deleteCustomer") Response deleteCustomer(@RequestBody Customer customer) { Response resp = new Response(); @@ -158,6 +161,7 @@ public class CustomerController { /** * 更新客户 */ + @Log("更新客户") @PostMapping("/updateCustomer") Response updateCustomer(@RequestBody Customer customer) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/ExperimentalClassController.java b/src/main/java/com/yipin/liuwanr/controller/ExperimentalClassController.java index ea1811d..820133e 100644 --- a/src/main/java/com/yipin/liuwanr/controller/ExperimentalClassController.java +++ b/src/main/java/com/yipin/liuwanr/controller/ExperimentalClassController.java @@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; import java.util.List; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; @@ -121,6 +122,7 @@ public class ExperimentalClassController { /** * 实验班级添加学生 */ + @Log("实验班级添加学生") @PostMapping("/experimentClassAddStudent") Response experimentClassAddStudent(@RequestBody List studentList) { Response resp = new Response(); @@ -144,6 +146,7 @@ public class ExperimentalClassController { /** * 实验班级删除学生 */ + @Log("实验班级删除学生") @PostMapping("/experimentClassDeleteStudent") Response experimentClassDeleteStudent(@RequestBody List studentList) { Response resp = new Response(); @@ -190,6 +193,7 @@ public class ExperimentalClassController { /** * 修改实验班级名称 */ + @Log("修改实验班级名称") @PostMapping("/updateExperimentClassName") Response updateExperimentClassName(@RequestBody ExperimentalClass experimentalClass) { Response resp = new Response(); @@ -301,6 +305,7 @@ public class ExperimentalClassController { * 添加实验班级 * @throws Exception */ + @Log("添加实验班级") @Transactional @PostMapping("/addExperimentalClass") public Response addExperimentalClass(@RequestBody ExperimentalClassVo vo) throws Exception { @@ -343,6 +348,7 @@ public class ExperimentalClassController { //删除实验班级 + @Log("删除实验班级") @PostMapping("/deleteExperimentalClass") Response deleteExperimentalClass(@RequestBody ExperimentalClass experimentalClass) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java b/src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java index abdde49..faa6280 100644 --- a/src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java +++ b/src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java @@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; @@ -47,6 +48,7 @@ public class ExperimentallearningController { /** * 添加签到记录 */ + @Log("添加签到记录") @PostMapping("/insertAttendance") Response insertAttendance(@RequestBody Attendance attendance) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/OrderController.java b/src/main/java/com/yipin/liuwanr/controller/OrderController.java index a7ec12b..10cbb48 100644 --- a/src/main/java/com/yipin/liuwanr/controller/OrderController.java +++ b/src/main/java/com/yipin/liuwanr/controller/OrderController.java @@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; import java.util.List; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.CrossOrigin; @@ -36,6 +37,7 @@ public class OrderController { * 添加订单 * @throws Exception */ + @Log("添加订单") @Transactional @PostMapping("/addOrder") public Response addOrder(@RequestBody OrderVo vo) throws Exception { @@ -176,6 +178,7 @@ public class OrderController { * 更新订单 * @throws Exception */ + @Log("更新订单") @Transactional @PostMapping("/updateOrder") public Response updateOrder(@RequestBody OrderVo vo) throws Exception { diff --git a/src/main/java/com/yipin/liuwanr/controller/PracticeController.java b/src/main/java/com/yipin/liuwanr/controller/PracticeController.java index 062947d..0a11bd1 100644 --- a/src/main/java/com/yipin/liuwanr/controller/PracticeController.java +++ b/src/main/java/com/yipin/liuwanr/controller/PracticeController.java @@ -4,6 +4,7 @@ import java.util.HashMap; import javax.servlet.http.HttpServletResponse; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.GetMapping; @@ -63,6 +64,7 @@ public class PracticeController { * @param titles(标题) * @return */ + @Log("练习记录和考核记录导出") @GetMapping("/exportPractice") Response exportPractice(HttpServletResponse response,@RequestParam Integer studentId,@RequestParam Integer projectPermissions,@RequestParam Integer courseId,@RequestParam String[] titles) { try { diff --git a/src/main/java/com/yipin/liuwanr/controller/ProjectAndCourseController.java b/src/main/java/com/yipin/liuwanr/controller/ProjectAndCourseController.java index 58a9c41..38c0527 100644 --- a/src/main/java/com/yipin/liuwanr/controller/ProjectAndCourseController.java +++ b/src/main/java/com/yipin/liuwanr/controller/ProjectAndCourseController.java @@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; import com.yipin.liuwanr.entity.CourseSchedule; +import com.yipin.liuwanr.entity.annotation.Log; import com.yipin.liuwanr.vo.CourseAndProjectVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; @@ -50,6 +51,7 @@ public class ProjectAndCourseController { * 修改项目状态 * @return */ + @Log("修改项目状态") @PostMapping("/updateIsExperiment") Response updateIsExperiment(@RequestBody CourseAndProjectVo vo) { Response resp = new Response(); @@ -75,6 +77,7 @@ public class ProjectAndCourseController { * 修改考勤状态 * @return */ + @Log("修改考勤状态") @PostMapping("/updateIsAttendance") Response updateIsAttendance(@RequestBody CourseAndProjectVo vo) { Response resp = new Response(); @@ -114,6 +117,7 @@ public class ProjectAndCourseController { } //添加课程进度 + @Log("添加课程进度") @PostMapping("/addCourseSchedule") Response addCourseSchedule(@RequestBody CourseSchedule courseSchedule) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/ProvinceController.java b/src/main/java/com/yipin/liuwanr/controller/ProvinceController.java index 32756b2..f966245 100644 --- a/src/main/java/com/yipin/liuwanr/controller/ProvinceController.java +++ b/src/main/java/com/yipin/liuwanr/controller/ProvinceController.java @@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; @@ -31,6 +32,7 @@ public class ProvinceController { /** * 添加省份 */ + @Log("添加省份") @PostMapping("/addProvince") Response addProvince(@RequestBody Province province) { Response resp = new Response(); @@ -68,6 +70,7 @@ public class ProvinceController { /** * 删除省份 */ + @Log("删除省份") @PostMapping("/deleteProvince") Response deleteProvince(@RequestParam Integer provinceId) { Response resp = new Response(); @@ -91,6 +94,7 @@ public class ProvinceController { /** * 更新省份 */ + @Log("更新省份") @RequestMapping(value="/updateProvince",method = RequestMethod.POST) Response updateProvince(@RequestBody Province province) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/SchoolController.java b/src/main/java/com/yipin/liuwanr/controller/SchoolController.java index d244370..90f17b7 100644 --- a/src/main/java/com/yipin/liuwanr/controller/SchoolController.java +++ b/src/main/java/com/yipin/liuwanr/controller/SchoolController.java @@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; @@ -30,6 +31,7 @@ public class SchoolController { /** * 添加学校 */ + @Log("添加学校") @PostMapping("/addSchool") Response addSchool(@RequestBody School school) { Response resp = new Response(); @@ -109,6 +111,7 @@ public class SchoolController { /** * 删除学校 */ + @Log("删除学校") @PostMapping("/deleteSchool") Response deleteSchool(@RequestBody School school) { Response resp = new Response(); @@ -132,6 +135,7 @@ public class SchoolController { /** * 更新学校 */ + @Log("更新学校") @PostMapping("/updateSchool") Response updateSchool(@RequestBody School school) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/ServiceConfigController.java b/src/main/java/com/yipin/liuwanr/controller/ServiceConfigController.java index 19b69ee..b43ca52 100644 --- a/src/main/java/com/yipin/liuwanr/controller/ServiceConfigController.java +++ b/src/main/java/com/yipin/liuwanr/controller/ServiceConfigController.java @@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; +import com.yipin.liuwanr.entity.annotation.Log; import org.apache.ibatis.annotations.Delete; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; @@ -31,6 +32,7 @@ public class ServiceConfigController { /** * 添加服务配置 */ + @Log("添加服务配置") @PostMapping("/addServiceConfig") Response addServiceConfig(@RequestBody ServiceConfig serviceConfig) { Response resp = new Response(); @@ -102,6 +104,7 @@ public class ServiceConfigController { /** * 删除服务配置 */ + @Log("删除服务配置") @Delete("/deleteServiceConfig") Response deleteServiceConfig(@RequestBody ServiceConfig serviceConfig) { Response resp = new Response(); @@ -125,6 +128,7 @@ public class ServiceConfigController { /** * 更新服务配置 */ + @Log("更新服务配置") @PostMapping("/updateServiceConfig") Response updateServiceConfig(@RequestBody ServiceConfig serviceConfig) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/StaffController.java b/src/main/java/com/yipin/liuwanr/controller/StaffController.java index 1d2de8b..d32889b 100644 --- a/src/main/java/com/yipin/liuwanr/controller/StaffController.java +++ b/src/main/java/com/yipin/liuwanr/controller/StaffController.java @@ -5,6 +5,7 @@ import java.util.List; import com.yipin.liuwanr.entity.*; import com.yipin.liuwanr.entity.Response; +import com.yipin.liuwanr.entity.annotation.Log; import com.yipin.liuwanr.service.OrganizationRelationshipService; import com.yipin.liuwanr.service.UserInfoService; import com.yipin.liuwanr.vo.UserInfoVO; @@ -344,6 +345,7 @@ public class StaffController { /** * 更新员工 */ + @Log("更新员工") @PostMapping("/updateStaff") Response updateStaff(@RequestBody UserInfoVO vo) { Response resp = new Response(); @@ -372,6 +374,7 @@ public class StaffController { /** * 删除员工 */ + @Log("删除员工") @PostMapping("/deleteStaff") Response deleteStaff(@RequestBody List OrganizationRelationshipList) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/StaffGradeController.java b/src/main/java/com/yipin/liuwanr/controller/StaffGradeController.java index 9f685ff..1d31d60 100644 --- a/src/main/java/com/yipin/liuwanr/controller/StaffGradeController.java +++ b/src/main/java/com/yipin/liuwanr/controller/StaffGradeController.java @@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; import java.util.List; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; @@ -31,6 +32,7 @@ public class StaffGradeController { /** * 添加员工年级 */ + @Log("添加员工年级") @PostMapping("/addStaffGrade") Response addCustomer(@RequestBody StaffGrade staffGrade) { Response resp = new Response(); @@ -100,6 +102,7 @@ public class StaffGradeController { /** * 删除员工年级 */ + @Log("删除员工年级") @PostMapping("/deleteStaffGrade") Response deleteStaffGrade(@RequestBody StaffGrade staffGrade) { Response resp = new Response(); @@ -133,6 +136,7 @@ public class StaffGradeController { /** * 更新员工年级 */ + @Log("更新员工年级") @PostMapping("/updateStaffGrade") Response updateStaffGrade(@RequestBody StaffGrade staffGrade) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java b/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java index 1e3b0b3..0d0edc7 100644 --- a/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java +++ b/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java @@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; @@ -30,6 +31,7 @@ public class StaffProfessionalArchitectureController { /** * 添加员工专业组织 */ + @Log("添加员工专业组织") @PostMapping("/addStaffProfessionalArchitecture") Response addCustomer(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) { Response resp = new Response(); @@ -102,6 +104,7 @@ public class StaffProfessionalArchitectureController { /** * 删除员工专业架构 */ + @Log("删除员工专业架构") @PostMapping("/deleteStaffProfessionalArchitecture") Response deleteStaffProfessionalArchitecture(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) { Response resp = new Response(); @@ -126,6 +129,7 @@ public class StaffProfessionalArchitectureController { /** * 更新员工专业架构 */ + @Log("更新员工专业架构") @PostMapping("/updateStaffProfessionalArchitecture") Response updateStaffProfessionalArchitecture(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/StuProfessionalArchitectureController.java b/src/main/java/com/yipin/liuwanr/controller/StuProfessionalArchitectureController.java index d9e916e..9c1c7ea 100644 --- a/src/main/java/com/yipin/liuwanr/controller/StuProfessionalArchitectureController.java +++ b/src/main/java/com/yipin/liuwanr/controller/StuProfessionalArchitectureController.java @@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller; import java.util.HashMap; +import com.yipin.liuwanr.entity.annotation.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; @@ -30,6 +31,7 @@ public class StuProfessionalArchitectureController { /** * 添加学生专业组织 */ + @Log("添加学生专业组织") @PostMapping("/addStuProfessionalArchitecture") Response addStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response resp = new Response(); @@ -101,6 +103,7 @@ public class StuProfessionalArchitectureController { /** * 删除学生专业架构 */ + @Log("删除学生专业架构") @PostMapping("/deleteStuProfessionalArchitecture") Response deleteStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture professionalArchitecture) { Response resp = new Response(); @@ -125,6 +128,7 @@ public class StuProfessionalArchitectureController { /** * 删除学生年级 */ + @Log("删除学生年级") @PostMapping("/deleteStuGrade") Response deleteStuGrade(@RequestBody StuProfessionalArchitecture stu) { Response resp = new Response(); @@ -149,6 +153,7 @@ public class StuProfessionalArchitectureController { /** * 删除学生班级 */ + @Log("删除学生班级") @PostMapping("/deleteStuClass") Response deleteStuClass(@RequestBody StuProfessionalArchitecture stu) { Response resp = new Response(); @@ -173,6 +178,7 @@ public class StuProfessionalArchitectureController { /** * 更新学生专业架构 */ + @Log("更新学生专业架构") @PostMapping("/updateStuProfessionalArchitecture") Response updateStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response resp = new Response(); @@ -312,6 +318,7 @@ public class StuProfessionalArchitectureController { /** * 添加班级 */ + @Log("添加班级") @PostMapping("/addStuClass") Response addStuClass(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response resp = new Response(); @@ -338,6 +345,7 @@ public class StuProfessionalArchitectureController { /** * 修改班级 */ + @Log("修改班级") @PostMapping("/updateStuClass") Response updateStuClass(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response resp = new Response(); @@ -363,6 +371,7 @@ public class StuProfessionalArchitectureController { /** * 添加年级 */ + @Log("添加年级") @PostMapping("/addStuGrade") Response addStuGrade(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response resp = new Response(); @@ -388,6 +397,7 @@ public class StuProfessionalArchitectureController { /** * 修改年级 */ + @Log("修改年级") @PostMapping("/updateStuGrade") Response updateStuGrade(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/StudentController.java b/src/main/java/com/yipin/liuwanr/controller/StudentController.java index 864b4b3..f789515 100644 --- a/src/main/java/com/yipin/liuwanr/controller/StudentController.java +++ b/src/main/java/com/yipin/liuwanr/controller/StudentController.java @@ -1,6 +1,7 @@ package com.yipin.liuwanr.controller; import com.yipin.liuwanr.entity.*; +import com.yipin.liuwanr.entity.annotation.Log; import com.yipin.liuwanr.helper.QueryStudentUtils; import com.yipin.liuwanr.helper.RedisHelper; import com.yipin.liuwanr.service.StudentService; @@ -40,6 +41,7 @@ public class StudentController { * @param file * @return */ + @Log("批量导入学生") @PostMapping("/readStudent") Response readStudent(MultipartFile file, @RequestParam Integer schoolId) { Response resp = new Response(); @@ -221,6 +223,7 @@ public class StudentController { /** * 更新学生 */ + @Log("更新学生信息") @PostMapping("/updateStudent") Response updateStudent(@RequestBody UserVO vo) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/controller/UserController.java b/src/main/java/com/yipin/liuwanr/controller/UserController.java index e8bfdcc..5deb352 100644 --- a/src/main/java/com/yipin/liuwanr/controller/UserController.java +++ b/src/main/java/com/yipin/liuwanr/controller/UserController.java @@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller; import com.yipin.liuwanr.entity.*; import com.yipin.liuwanr.entity.Response; +import com.yipin.liuwanr.entity.annotation.Log; import com.yipin.liuwanr.helper.PushHelper; import com.yipin.liuwanr.helper.RandomUtil; import com.yipin.liuwanr.helper.RedisHelper; @@ -35,7 +36,7 @@ public class UserController { @Autowired RedisHelper redisHelper; - + @Log("用户登录") @GetMapping("/login") Response loginUser(@RequestParam("id") String id, @RequestParam("password") String password, HttpServletResponse response) { @@ -124,6 +125,7 @@ public class UserController { /** * 添加用户 */ + @Log("添加用户") @Transactional @PostMapping("/addUser") Response addUser(@RequestBody UserVO vo) { @@ -261,6 +263,7 @@ public class UserController { /** * 删除用户(根据ID修改isdel状态,0可见 1不可见) */ + @Log("删除用户") @Transactional @PostMapping("/deleteUser") Response deleteUser(@RequestBody List userList) { @@ -323,6 +326,7 @@ public class UserController { /** * 更新用户 */ + @Log("更新用户") @Transactional @PostMapping("/updateUser") Response updateUser(@RequestBody UserVO vo) { @@ -382,6 +386,7 @@ public class UserController { /** * 登陆(前台传来的key必须是phone、password) */ + @Log("登录") @GetMapping("/logins") Response logins(@RequestParam("phone") String phone, @RequestParam("password") String password, HttpServletRequest req, HttpServletResponse res) { diff --git a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java index e71f43f..2d07e3f 100644 --- a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java +++ b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java @@ -1,6 +1,7 @@ package com.yipin.liuwanr.controller; import com.yipin.liuwanr.entity.*; +import com.yipin.liuwanr.entity.annotation.Log; import com.yipin.liuwanr.entity.vo.AccountLoginVO; import com.yipin.liuwanr.entity.vo.AdminLoginVO; import com.yipin.liuwanr.helper.RedisHelper; @@ -47,6 +48,7 @@ public class UserInfoController { /** * 添加用户 */ + @Log("添加用户") @Transactional @PostMapping("/addUser") public Response addUser(@RequestBody UserInfoVO vo) { @@ -147,6 +149,7 @@ public class UserInfoController { /** * 删除用户(根据ID修改isdel状态,0可见 1不可见) */ + @Log("删除用户") @Transactional @PostMapping("/deleteUserInfo") public Response deleteUserInfo(@RequestBody List userIdList) { @@ -172,6 +175,7 @@ public class UserInfoController { /** * 更新用户 */ + @Log("更新用户") @Transactional @PostMapping("/updateUserInfo") public Response updateUserInfo(@RequestBody UserInfo userInfo) { @@ -228,6 +232,7 @@ public class UserInfoController { /** * 更新用户个人档案 */ + @Log("更新用户个人档案") @Transactional @PostMapping("/updateUserProfiles") public Response updateUserProfiles(@RequestBody List userProfilesList) { @@ -254,6 +259,7 @@ public class UserInfoController { /** * 更新用户组织关系 */ + @Log("更新用户组织关系") @Transactional @PostMapping("/updateOR") public Response updateOrganizationRelationship(@RequestBody UserInfoVO vo) { @@ -346,6 +352,7 @@ public class UserInfoController { /** * 科大教师端登陆 */ + @Log("科大教师端登录") @PostMapping("/adminLogins") public Response adminLogins(@RequestBody AdminLoginVO adminLogin) { Response resp = new Response(); @@ -395,6 +402,7 @@ public class UserInfoController { /** * 客户端登陆 */ + @Log("客户端登录") @GetMapping("/logins") Response logins(@RequestParam("userId") Integer userId, @RequestParam("schoolId") Integer schoolId,@RequestParam("roleId") String roleId, HttpServletRequest req, HttpServletResponse res) { Response resp = new Response(); @@ -699,6 +707,7 @@ public class UserInfoController { /** * 删除平台 */ + @Log("删除平台") @PostMapping("/deletePlatform") Response deletePlatform(@RequestBody OrganizationRelationship OR) { Response resp = new Response(); diff --git a/src/main/java/com/yipin/liuwanr/entity/SysLog.java b/src/main/java/com/yipin/liuwanr/entity/SysLog.java index ab84887..ae78126 100644 --- a/src/main/java/com/yipin/liuwanr/entity/SysLog.java +++ b/src/main/java/com/yipin/liuwanr/entity/SysLog.java @@ -1,12 +1,12 @@ package com.yipin.liuwanr.entity; -import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import lombok.ToString; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; +/** + * + * @author cdy + */ @Data @ToString public class SysLog {