给操作添加日志处理

master
chendengyao 3 years ago
parent 0f393d3caa
commit c67d9ee139
  1. 5
      src/main/java/com/yipin/liuwanr/config/LogAspect.java
  2. 6
      src/main/java/com/yipin/liuwanr/controller/AliyunOssController.java
  3. 6
      src/main/java/com/yipin/liuwanr/controller/AssesmentController.java
  4. 4
      src/main/java/com/yipin/liuwanr/controller/CityController.java
  5. 5
      src/main/java/com/yipin/liuwanr/controller/CourseController.java
  6. 4
      src/main/java/com/yipin/liuwanr/controller/CustomerController.java
  7. 6
      src/main/java/com/yipin/liuwanr/controller/ExperimentalClassController.java
  8. 2
      src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java
  9. 3
      src/main/java/com/yipin/liuwanr/controller/OrderController.java
  10. 2
      src/main/java/com/yipin/liuwanr/controller/PracticeController.java
  11. 4
      src/main/java/com/yipin/liuwanr/controller/ProjectAndCourseController.java
  12. 4
      src/main/java/com/yipin/liuwanr/controller/ProvinceController.java
  13. 4
      src/main/java/com/yipin/liuwanr/controller/SchoolController.java
  14. 4
      src/main/java/com/yipin/liuwanr/controller/ServiceConfigController.java
  15. 3
      src/main/java/com/yipin/liuwanr/controller/StaffController.java
  16. 4
      src/main/java/com/yipin/liuwanr/controller/StaffGradeController.java
  17. 4
      src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java
  18. 10
      src/main/java/com/yipin/liuwanr/controller/StuProfessionalArchitectureController.java
  19. 3
      src/main/java/com/yipin/liuwanr/controller/StudentController.java
  20. 7
      src/main/java/com/yipin/liuwanr/controller/UserController.java
  21. 9
      src/main/java/com/yipin/liuwanr/controller/UserInfoController.java
  22. 8
      src/main/java/com/yipin/liuwanr/entity/SysLog.java

@ -6,19 +6,14 @@ import com.yipin.liuwanr.entity.annotation.Log;
import com.yipin.liuwanr.util.IPUtils; import com.yipin.liuwanr.util.IPUtils;
import com.yipin.liuwanr.util.UserIdUtils; import com.yipin.liuwanr.util.UserIdUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature; import org.aspectj.lang.reflect.MethodSignature;
import org.jboss.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
import org.springframework.stereotype.Component; 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 javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method; import java.lang.reflect.Method;

@ -4,6 +4,7 @@ import java.util.HashMap;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -27,6 +28,7 @@ public class AliyunOssController {
* @param file * @param file
* @return * @return
*/ */
@Log("上传文件")
@PostMapping("/uploadFiles") @PostMapping("/uploadFiles")
Response uploadFiles(MultipartFile file) { Response uploadFiles(MultipartFile file) {
Response resp = new Response(); Response resp = new Response();
@ -40,7 +42,6 @@ public class AliyunOssController {
resp.setErrmessage(ret.get("retvalue").toString()); resp.setErrmessage(ret.get("retvalue").toString());
} }
return resp; return resp;
} }
/** /**
@ -48,6 +49,7 @@ public class AliyunOssController {
* @param objectName在阿里云的文件路径 * @param objectName在阿里云的文件路径
* @return * @return
*/ */
@Log("下载文件")
@GetMapping("/downloadFiles") @GetMapping("/downloadFiles")
Response downloadFiles(HttpServletResponse response,@RequestParam String objectName) { Response downloadFiles(HttpServletResponse response,@RequestParam String objectName) {
Response resp = new Response(); Response resp = new Response();
@ -60,8 +62,6 @@ public class AliyunOssController {
resp.setErrmessage("下载失败"); resp.setErrmessage("下载失败");
} }
return null; return null;
} }
} }

@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -82,6 +83,7 @@ public class AssesmentController {
* @param vo * @param vo
* @return * @return
*/ */
@Log("创建考核")
@PostMapping("/addAssesment") @PostMapping("/addAssesment")
Response addAssesment(@RequestBody AssesmentStudentVo vo) { Response addAssesment(@RequestBody AssesmentStudentVo vo) {
Response resp = new Response(); Response resp = new Response();
@ -163,6 +165,7 @@ public class AssesmentController {
* @param vo * @param vo
* @return * @return
*/ */
@Log("修改考核")
@PostMapping("/updateAssesment") @PostMapping("/updateAssesment")
Response updateAssesment(@RequestBody AssesmentStudentVo vo) { Response updateAssesment(@RequestBody AssesmentStudentVo vo) {
Response resp = new Response(); Response resp = new Response();
@ -217,6 +220,7 @@ public class AssesmentController {
* 修改考核状态 * 修改考核状态
* @return * @return
*/ */
@Log("修改考核状态")
@PostMapping("/updateState") @PostMapping("/updateState")
Response updateState(@RequestBody Assesment assesment) { Response updateState(@RequestBody Assesment assesment) {
Response resp = new Response(); Response resp = new Response();
@ -466,6 +470,7 @@ public class AssesmentController {
* @param courseId * @param courseId
* @return * @return
*/ */
@Log("发布考核")
@GetMapping("/releaseAssesment") @GetMapping("/releaseAssesment")
Response releaseAssesment(@RequestParam Integer courseId){ Response releaseAssesment(@RequestParam Integer courseId){
Response resp = new Response(); Response resp = new Response();
@ -483,6 +488,7 @@ public class AssesmentController {
return resp; return resp;
} }
@Log("删除考核")
@PostMapping("/deleteAssesment") @PostMapping("/deleteAssesment")
Response deleteAssesment(@RequestBody Assesment assesment){ Response deleteAssesment(@RequestBody Assesment assesment){
Response resp = new Response(); Response resp = new Response();

@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import com.yipin.liuwanr.entity.StudentCity; import com.yipin.liuwanr.entity.StudentCity;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -31,6 +32,7 @@ public class CityController {
/** /**
* 添加城市 * 添加城市
*/ */
@Log("添加城市")
@PostMapping("/addCity") @PostMapping("/addCity")
Response addCustomer(@RequestBody StudentCity studentCity) { Response addCustomer(@RequestBody StudentCity studentCity) {
Response resp = new Response(); Response resp = new Response();
@ -67,6 +69,7 @@ public class CityController {
/** /**
* 删除城市 * 删除城市
*/ */
@Log("删除城市")
@PostMapping("/deleteCity") @PostMapping("/deleteCity")
Response deleteCity(@RequestParam Integer cityId) { Response deleteCity(@RequestParam Integer cityId) {
Response resp = new Response(); Response resp = new Response();
@ -90,6 +93,7 @@ public class CityController {
/** /**
* 更新城市 * 更新城市
*/ */
@Log("更新城市")
@RequestMapping(value="/updateCity",method = RequestMethod.POST) @RequestMapping(value="/updateCity",method = RequestMethod.POST)
Response updateCity(@RequestBody StudentCity studentCity) { Response updateCity(@RequestBody StudentCity studentCity) {
Response resp = new Response(); Response resp = new Response();

@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -36,6 +37,7 @@ public class CourseController {
* 添加课程 * 添加课程
* *
*/ */
@Log("添加课程")
@PostMapping("/addCourse") @PostMapping("/addCourse")
Response addCustomer(@RequestBody CourseVO vo) { Response addCustomer(@RequestBody CourseVO vo) {
Response resp = new Response(); Response resp = new Response();
@ -224,6 +226,7 @@ public class CourseController {
/** /**
* 删除课程 * 删除课程
*/ */
@Log("删除课程")
@PostMapping("/deleteCourse") @PostMapping("/deleteCourse")
Response deleteCourse(@RequestBody List<Integer> courseId) { Response deleteCourse(@RequestBody List<Integer> courseId) {
Response resp = new Response(); Response resp = new Response();
@ -247,6 +250,7 @@ public class CourseController {
/** /**
* 更新课程 * 更新课程
*/ */
@Log("更新课程")
@RequestMapping(value="/updateCourse",method = RequestMethod.POST) @RequestMapping(value="/updateCourse",method = RequestMethod.POST)
Response updateCourse(@RequestBody CourseVO vo) { Response updateCourse(@RequestBody CourseVO vo) {
Response resp = new Response(); Response resp = new Response();
@ -499,6 +503,7 @@ public class CourseController {
/** /**
* 更新环节 * 更新环节
*/ */
@Log("更新环节")
@PostMapping("/updateLink") @PostMapping("/updateLink")
Response updateLink(@RequestBody CourseLink courseLink) { Response updateLink(@RequestBody CourseLink courseLink) {
Response resp = new Response(); Response resp = new Response();

@ -4,6 +4,7 @@ import com.yipin.liuwanr.entity.Customer;
import com.yipin.liuwanr.entity.Response; import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.School; import com.yipin.liuwanr.entity.School;
import com.yipin.liuwanr.entity.UserM; import com.yipin.liuwanr.entity.UserM;
import com.yipin.liuwanr.entity.annotation.Log;
import com.yipin.liuwanr.helper.RedisHelper; import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.CustomerService; import com.yipin.liuwanr.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -25,6 +26,7 @@ public class CustomerController {
/** /**
* 添加客户 * 添加客户
*/ */
@Log("添加客户")
@PostMapping("/addCustomer") @PostMapping("/addCustomer")
Response addCustomer(@RequestBody Customer customer) { Response addCustomer(@RequestBody Customer customer) {
Response resp = new Response(); Response resp = new Response();
@ -135,6 +137,7 @@ public class CustomerController {
/** /**
* 删除客户 * 删除客户
*/ */
@Log("删除客户")
@PostMapping("/deleteCustomer") @PostMapping("/deleteCustomer")
Response deleteCustomer(@RequestBody Customer customer) { Response deleteCustomer(@RequestBody Customer customer) {
Response resp = new Response(); Response resp = new Response();
@ -158,6 +161,7 @@ public class CustomerController {
/** /**
* 更新客户 * 更新客户
*/ */
@Log("更新客户")
@PostMapping("/updateCustomer") @PostMapping("/updateCustomer")
Response updateCustomer(@RequestBody Customer customer) { Response updateCustomer(@RequestBody Customer customer) {
Response resp = new Response(); Response resp = new Response();

@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
@ -121,6 +122,7 @@ public class ExperimentalClassController {
/** /**
* 实验班级添加学生 * 实验班级添加学生
*/ */
@Log("实验班级添加学生")
@PostMapping("/experimentClassAddStudent") @PostMapping("/experimentClassAddStudent")
Response experimentClassAddStudent(@RequestBody List<Student> studentList) { Response experimentClassAddStudent(@RequestBody List<Student> studentList) {
Response resp = new Response(); Response resp = new Response();
@ -144,6 +146,7 @@ public class ExperimentalClassController {
/** /**
* 实验班级删除学生 * 实验班级删除学生
*/ */
@Log("实验班级删除学生")
@PostMapping("/experimentClassDeleteStudent") @PostMapping("/experimentClassDeleteStudent")
Response experimentClassDeleteStudent(@RequestBody List<Student> studentList) { Response experimentClassDeleteStudent(@RequestBody List<Student> studentList) {
Response resp = new Response(); Response resp = new Response();
@ -190,6 +193,7 @@ public class ExperimentalClassController {
/** /**
* 修改实验班级名称 * 修改实验班级名称
*/ */
@Log("修改实验班级名称")
@PostMapping("/updateExperimentClassName") @PostMapping("/updateExperimentClassName")
Response updateExperimentClassName(@RequestBody ExperimentalClass experimentalClass) { Response updateExperimentClassName(@RequestBody ExperimentalClass experimentalClass) {
Response resp = new Response(); Response resp = new Response();
@ -301,6 +305,7 @@ public class ExperimentalClassController {
* 添加实验班级 * 添加实验班级
* @throws Exception * @throws Exception
*/ */
@Log("添加实验班级")
@Transactional @Transactional
@PostMapping("/addExperimentalClass") @PostMapping("/addExperimentalClass")
public Response addExperimentalClass(@RequestBody ExperimentalClassVo vo) throws Exception { public Response addExperimentalClass(@RequestBody ExperimentalClassVo vo) throws Exception {
@ -343,6 +348,7 @@ public class ExperimentalClassController {
//删除实验班级 //删除实验班级
@Log("删除实验班级")
@PostMapping("/deleteExperimentalClass") @PostMapping("/deleteExperimentalClass")
Response deleteExperimentalClass(@RequestBody ExperimentalClass experimentalClass) { Response deleteExperimentalClass(@RequestBody ExperimentalClass experimentalClass) {
Response resp = new Response(); Response resp = new Response();

@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -47,6 +48,7 @@ public class ExperimentallearningController {
/** /**
* 添加签到记录 * 添加签到记录
*/ */
@Log("添加签到记录")
@PostMapping("/insertAttendance") @PostMapping("/insertAttendance")
Response insertAttendance(@RequestBody Attendance attendance) { Response insertAttendance(@RequestBody Attendance attendance) {
Response resp = new Response(); Response resp = new Response();

@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
@ -36,6 +37,7 @@ public class OrderController {
* 添加订单 * 添加订单
* @throws Exception * @throws Exception
*/ */
@Log("添加订单")
@Transactional @Transactional
@PostMapping("/addOrder") @PostMapping("/addOrder")
public Response addOrder(@RequestBody OrderVo vo) throws Exception { public Response addOrder(@RequestBody OrderVo vo) throws Exception {
@ -176,6 +178,7 @@ public class OrderController {
* 更新订单 * 更新订单
* @throws Exception * @throws Exception
*/ */
@Log("更新订单")
@Transactional @Transactional
@PostMapping("/updateOrder") @PostMapping("/updateOrder")
public Response updateOrder(@RequestBody OrderVo vo) throws Exception { public Response updateOrder(@RequestBody OrderVo vo) throws Exception {

@ -4,6 +4,7 @@ import java.util.HashMap;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -63,6 +64,7 @@ public class PracticeController {
* @param titles(标题) * @param titles(标题)
* @return * @return
*/ */
@Log("练习记录和考核记录导出")
@GetMapping("/exportPractice") @GetMapping("/exportPractice")
Response exportPractice(HttpServletResponse response,@RequestParam Integer studentId,@RequestParam Integer projectPermissions,@RequestParam Integer courseId,@RequestParam String[] titles) { Response exportPractice(HttpServletResponse response,@RequestParam Integer studentId,@RequestParam Integer projectPermissions,@RequestParam Integer courseId,@RequestParam String[] titles) {
try { try {

@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import com.yipin.liuwanr.entity.CourseSchedule; import com.yipin.liuwanr.entity.CourseSchedule;
import com.yipin.liuwanr.entity.annotation.Log;
import com.yipin.liuwanr.vo.CourseAndProjectVo; import com.yipin.liuwanr.vo.CourseAndProjectVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
@ -50,6 +51,7 @@ public class ProjectAndCourseController {
* 修改项目状态 * 修改项目状态
* @return * @return
*/ */
@Log("修改项目状态")
@PostMapping("/updateIsExperiment") @PostMapping("/updateIsExperiment")
Response updateIsExperiment(@RequestBody CourseAndProjectVo vo) { Response updateIsExperiment(@RequestBody CourseAndProjectVo vo) {
Response resp = new Response(); Response resp = new Response();
@ -75,6 +77,7 @@ public class ProjectAndCourseController {
* 修改考勤状态 * 修改考勤状态
* @return * @return
*/ */
@Log("修改考勤状态")
@PostMapping("/updateIsAttendance") @PostMapping("/updateIsAttendance")
Response updateIsAttendance(@RequestBody CourseAndProjectVo vo) { Response updateIsAttendance(@RequestBody CourseAndProjectVo vo) {
Response resp = new Response(); Response resp = new Response();
@ -114,6 +117,7 @@ public class ProjectAndCourseController {
} }
//添加课程进度 //添加课程进度
@Log("添加课程进度")
@PostMapping("/addCourseSchedule") @PostMapping("/addCourseSchedule")
Response addCourseSchedule(@RequestBody CourseSchedule courseSchedule) { Response addCourseSchedule(@RequestBody CourseSchedule courseSchedule) {
Response resp = new Response(); Response resp = new Response();

@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -31,6 +32,7 @@ public class ProvinceController {
/** /**
* 添加省份 * 添加省份
*/ */
@Log("添加省份")
@PostMapping("/addProvince") @PostMapping("/addProvince")
Response addProvince(@RequestBody Province province) { Response addProvince(@RequestBody Province province) {
Response resp = new Response(); Response resp = new Response();
@ -68,6 +70,7 @@ public class ProvinceController {
/** /**
* 删除省份 * 删除省份
*/ */
@Log("删除省份")
@PostMapping("/deleteProvince") @PostMapping("/deleteProvince")
Response deleteProvince(@RequestParam Integer provinceId) { Response deleteProvince(@RequestParam Integer provinceId) {
Response resp = new Response(); Response resp = new Response();
@ -91,6 +94,7 @@ public class ProvinceController {
/** /**
* 更新省份 * 更新省份
*/ */
@Log("更新省份")
@RequestMapping(value="/updateProvince",method = RequestMethod.POST) @RequestMapping(value="/updateProvince",method = RequestMethod.POST)
Response updateProvince(@RequestBody Province province) { Response updateProvince(@RequestBody Province province) {
Response resp = new Response(); Response resp = new Response();

@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -30,6 +31,7 @@ public class SchoolController {
/** /**
* 添加学校 * 添加学校
*/ */
@Log("添加学校")
@PostMapping("/addSchool") @PostMapping("/addSchool")
Response addSchool(@RequestBody School school) { Response addSchool(@RequestBody School school) {
Response resp = new Response(); Response resp = new Response();
@ -109,6 +111,7 @@ public class SchoolController {
/** /**
* 删除学校 * 删除学校
*/ */
@Log("删除学校")
@PostMapping("/deleteSchool") @PostMapping("/deleteSchool")
Response deleteSchool(@RequestBody School school) { Response deleteSchool(@RequestBody School school) {
Response resp = new Response(); Response resp = new Response();
@ -132,6 +135,7 @@ public class SchoolController {
/** /**
* 更新学校 * 更新学校
*/ */
@Log("更新学校")
@PostMapping("/updateSchool") @PostMapping("/updateSchool")
Response updateSchool(@RequestBody School school) { Response updateSchool(@RequestBody School school) {
Response resp = new Response(); Response resp = new Response();

@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import com.yipin.liuwanr.entity.annotation.Log;
import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Delete;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
@ -31,6 +32,7 @@ public class ServiceConfigController {
/** /**
* 添加服务配置 * 添加服务配置
*/ */
@Log("添加服务配置")
@PostMapping("/addServiceConfig") @PostMapping("/addServiceConfig")
Response addServiceConfig(@RequestBody ServiceConfig serviceConfig) { Response addServiceConfig(@RequestBody ServiceConfig serviceConfig) {
Response resp = new Response(); Response resp = new Response();
@ -102,6 +104,7 @@ public class ServiceConfigController {
/** /**
* 删除服务配置 * 删除服务配置
*/ */
@Log("删除服务配置")
@Delete("/deleteServiceConfig") @Delete("/deleteServiceConfig")
Response deleteServiceConfig(@RequestBody ServiceConfig serviceConfig) { Response deleteServiceConfig(@RequestBody ServiceConfig serviceConfig) {
Response resp = new Response(); Response resp = new Response();
@ -125,6 +128,7 @@ public class ServiceConfigController {
/** /**
* 更新服务配置 * 更新服务配置
*/ */
@Log("更新服务配置")
@PostMapping("/updateServiceConfig") @PostMapping("/updateServiceConfig")
Response updateServiceConfig(@RequestBody ServiceConfig serviceConfig) { Response updateServiceConfig(@RequestBody ServiceConfig serviceConfig) {
Response resp = new Response(); Response resp = new Response();

@ -5,6 +5,7 @@ import java.util.List;
import com.yipin.liuwanr.entity.*; import com.yipin.liuwanr.entity.*;
import com.yipin.liuwanr.entity.Response; import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.annotation.Log;
import com.yipin.liuwanr.service.OrganizationRelationshipService; import com.yipin.liuwanr.service.OrganizationRelationshipService;
import com.yipin.liuwanr.service.UserInfoService; import com.yipin.liuwanr.service.UserInfoService;
import com.yipin.liuwanr.vo.UserInfoVO; import com.yipin.liuwanr.vo.UserInfoVO;
@ -344,6 +345,7 @@ public class StaffController {
/** /**
* 更新员工 * 更新员工
*/ */
@Log("更新员工")
@PostMapping("/updateStaff") @PostMapping("/updateStaff")
Response updateStaff(@RequestBody UserInfoVO vo) { Response updateStaff(@RequestBody UserInfoVO vo) {
Response resp = new Response(); Response resp = new Response();
@ -372,6 +374,7 @@ public class StaffController {
/** /**
* 删除员工 * 删除员工
*/ */
@Log("删除员工")
@PostMapping("/deleteStaff") @PostMapping("/deleteStaff")
Response deleteStaff(@RequestBody List<OrganizationRelationship> OrganizationRelationshipList) { Response deleteStaff(@RequestBody List<OrganizationRelationship> OrganizationRelationshipList) {
Response resp = new Response(); Response resp = new Response();

@ -3,6 +3,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -31,6 +32,7 @@ public class StaffGradeController {
/** /**
* 添加员工年级 * 添加员工年级
*/ */
@Log("添加员工年级")
@PostMapping("/addStaffGrade") @PostMapping("/addStaffGrade")
Response addCustomer(@RequestBody StaffGrade staffGrade) { Response addCustomer(@RequestBody StaffGrade staffGrade) {
Response resp = new Response(); Response resp = new Response();
@ -100,6 +102,7 @@ public class StaffGradeController {
/** /**
* 删除员工年级 * 删除员工年级
*/ */
@Log("删除员工年级")
@PostMapping("/deleteStaffGrade") @PostMapping("/deleteStaffGrade")
Response deleteStaffGrade(@RequestBody StaffGrade staffGrade) { Response deleteStaffGrade(@RequestBody StaffGrade staffGrade) {
Response resp = new Response(); Response resp = new Response();
@ -133,6 +136,7 @@ public class StaffGradeController {
/** /**
* 更新员工年级 * 更新员工年级
*/ */
@Log("更新员工年级")
@PostMapping("/updateStaffGrade") @PostMapping("/updateStaffGrade")
Response updateStaffGrade(@RequestBody StaffGrade staffGrade) { Response updateStaffGrade(@RequestBody StaffGrade staffGrade) {
Response resp = new Response(); Response resp = new Response();

@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -30,6 +31,7 @@ public class StaffProfessionalArchitectureController {
/** /**
* 添加员工专业组织 * 添加员工专业组织
*/ */
@Log("添加员工专业组织")
@PostMapping("/addStaffProfessionalArchitecture") @PostMapping("/addStaffProfessionalArchitecture")
Response addCustomer(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) { Response addCustomer(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) {
Response resp = new Response(); Response resp = new Response();
@ -102,6 +104,7 @@ public class StaffProfessionalArchitectureController {
/** /**
* 删除员工专业架构 * 删除员工专业架构
*/ */
@Log("删除员工专业架构")
@PostMapping("/deleteStaffProfessionalArchitecture") @PostMapping("/deleteStaffProfessionalArchitecture")
Response deleteStaffProfessionalArchitecture(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) { Response deleteStaffProfessionalArchitecture(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) {
Response resp = new Response(); Response resp = new Response();
@ -126,6 +129,7 @@ public class StaffProfessionalArchitectureController {
/** /**
* 更新员工专业架构 * 更新员工专业架构
*/ */
@Log("更新员工专业架构")
@PostMapping("/updateStaffProfessionalArchitecture") @PostMapping("/updateStaffProfessionalArchitecture")
Response updateStaffProfessionalArchitecture(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) { Response updateStaffProfessionalArchitecture(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) {
Response resp = new Response(); Response resp = new Response();

@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller;
import java.util.HashMap; import java.util.HashMap;
import com.yipin.liuwanr.entity.annotation.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -30,6 +31,7 @@ public class StuProfessionalArchitectureController {
/** /**
* 添加学生专业组织 * 添加学生专业组织
*/ */
@Log("添加学生专业组织")
@PostMapping("/addStuProfessionalArchitecture") @PostMapping("/addStuProfessionalArchitecture")
Response addStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response addStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response(); Response resp = new Response();
@ -101,6 +103,7 @@ public class StuProfessionalArchitectureController {
/** /**
* 删除学生专业架构 * 删除学生专业架构
*/ */
@Log("删除学生专业架构")
@PostMapping("/deleteStuProfessionalArchitecture") @PostMapping("/deleteStuProfessionalArchitecture")
Response deleteStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture professionalArchitecture) { Response deleteStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture professionalArchitecture) {
Response resp = new Response(); Response resp = new Response();
@ -125,6 +128,7 @@ public class StuProfessionalArchitectureController {
/** /**
* 删除学生年级 * 删除学生年级
*/ */
@Log("删除学生年级")
@PostMapping("/deleteStuGrade") @PostMapping("/deleteStuGrade")
Response deleteStuGrade(@RequestBody StuProfessionalArchitecture stu) { Response deleteStuGrade(@RequestBody StuProfessionalArchitecture stu) {
Response resp = new Response(); Response resp = new Response();
@ -149,6 +153,7 @@ public class StuProfessionalArchitectureController {
/** /**
* 删除学生班级 * 删除学生班级
*/ */
@Log("删除学生班级")
@PostMapping("/deleteStuClass") @PostMapping("/deleteStuClass")
Response deleteStuClass(@RequestBody StuProfessionalArchitecture stu) { Response deleteStuClass(@RequestBody StuProfessionalArchitecture stu) {
Response resp = new Response(); Response resp = new Response();
@ -173,6 +178,7 @@ public class StuProfessionalArchitectureController {
/** /**
* 更新学生专业架构 * 更新学生专业架构
*/ */
@Log("更新学生专业架构")
@PostMapping("/updateStuProfessionalArchitecture") @PostMapping("/updateStuProfessionalArchitecture")
Response updateStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response updateStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response(); Response resp = new Response();
@ -312,6 +318,7 @@ public class StuProfessionalArchitectureController {
/** /**
* 添加班级 * 添加班级
*/ */
@Log("添加班级")
@PostMapping("/addStuClass") @PostMapping("/addStuClass")
Response addStuClass(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response addStuClass(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response(); Response resp = new Response();
@ -338,6 +345,7 @@ public class StuProfessionalArchitectureController {
/** /**
* 修改班级 * 修改班级
*/ */
@Log("修改班级")
@PostMapping("/updateStuClass") @PostMapping("/updateStuClass")
Response updateStuClass(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response updateStuClass(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response(); Response resp = new Response();
@ -363,6 +371,7 @@ public class StuProfessionalArchitectureController {
/** /**
* 添加年级 * 添加年级
*/ */
@Log("添加年级")
@PostMapping("/addStuGrade") @PostMapping("/addStuGrade")
Response addStuGrade(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response addStuGrade(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response(); Response resp = new Response();
@ -388,6 +397,7 @@ public class StuProfessionalArchitectureController {
/** /**
* 修改年级 * 修改年级
*/ */
@Log("修改年级")
@PostMapping("/updateStuGrade") @PostMapping("/updateStuGrade")
Response updateStuGrade(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) { Response updateStuGrade(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response(); Response resp = new Response();

@ -1,6 +1,7 @@
package com.yipin.liuwanr.controller; package com.yipin.liuwanr.controller;
import com.yipin.liuwanr.entity.*; import com.yipin.liuwanr.entity.*;
import com.yipin.liuwanr.entity.annotation.Log;
import com.yipin.liuwanr.helper.QueryStudentUtils; import com.yipin.liuwanr.helper.QueryStudentUtils;
import com.yipin.liuwanr.helper.RedisHelper; import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.StudentService; import com.yipin.liuwanr.service.StudentService;
@ -40,6 +41,7 @@ public class StudentController {
* @param file * @param file
* @return * @return
*/ */
@Log("批量导入学生")
@PostMapping("/readStudent") @PostMapping("/readStudent")
Response readStudent(MultipartFile file, @RequestParam Integer schoolId) { Response readStudent(MultipartFile file, @RequestParam Integer schoolId) {
Response resp = new Response(); Response resp = new Response();
@ -221,6 +223,7 @@ public class StudentController {
/** /**
* 更新学生 * 更新学生
*/ */
@Log("更新学生信息")
@PostMapping("/updateStudent") @PostMapping("/updateStudent")
Response updateStudent(@RequestBody UserVO vo) { Response updateStudent(@RequestBody UserVO vo) {
Response resp = new Response(); Response resp = new Response();

@ -2,6 +2,7 @@ package com.yipin.liuwanr.controller;
import com.yipin.liuwanr.entity.*; import com.yipin.liuwanr.entity.*;
import com.yipin.liuwanr.entity.Response; import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.annotation.Log;
import com.yipin.liuwanr.helper.PushHelper; import com.yipin.liuwanr.helper.PushHelper;
import com.yipin.liuwanr.helper.RandomUtil; import com.yipin.liuwanr.helper.RandomUtil;
import com.yipin.liuwanr.helper.RedisHelper; import com.yipin.liuwanr.helper.RedisHelper;
@ -35,7 +36,7 @@ public class UserController {
@Autowired @Autowired
RedisHelper redisHelper; RedisHelper redisHelper;
@Log("用户登录")
@GetMapping("/login") @GetMapping("/login")
Response loginUser(@RequestParam("id") String id, @RequestParam("password") String password, Response loginUser(@RequestParam("id") String id, @RequestParam("password") String password,
HttpServletResponse response) { HttpServletResponse response) {
@ -124,6 +125,7 @@ public class UserController {
/** /**
* 添加用户 * 添加用户
*/ */
@Log("添加用户")
@Transactional @Transactional
@PostMapping("/addUser") @PostMapping("/addUser")
Response addUser(@RequestBody UserVO vo) { Response addUser(@RequestBody UserVO vo) {
@ -261,6 +263,7 @@ public class UserController {
/** /**
* 删除用户(根据ID修改isdel状态,0可见 1不可见) * 删除用户(根据ID修改isdel状态,0可见 1不可见)
*/ */
@Log("删除用户")
@Transactional @Transactional
@PostMapping("/deleteUser") @PostMapping("/deleteUser")
Response deleteUser(@RequestBody List<UserM> userList) { Response deleteUser(@RequestBody List<UserM> userList) {
@ -323,6 +326,7 @@ public class UserController {
/** /**
* 更新用户 * 更新用户
*/ */
@Log("更新用户")
@Transactional @Transactional
@PostMapping("/updateUser") @PostMapping("/updateUser")
Response updateUser(@RequestBody UserVO vo) { Response updateUser(@RequestBody UserVO vo) {
@ -382,6 +386,7 @@ public class UserController {
/** /**
* 登陆(前台传来的key必须是phonepassword) * 登陆(前台传来的key必须是phonepassword)
*/ */
@Log("登录")
@GetMapping("/logins") @GetMapping("/logins")
Response logins(@RequestParam("phone") String phone, @RequestParam("password") String password, Response logins(@RequestParam("phone") String phone, @RequestParam("password") String password,
HttpServletRequest req, HttpServletResponse res) { HttpServletRequest req, HttpServletResponse res) {

@ -1,6 +1,7 @@
package com.yipin.liuwanr.controller; package com.yipin.liuwanr.controller;
import com.yipin.liuwanr.entity.*; 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.AccountLoginVO;
import com.yipin.liuwanr.entity.vo.AdminLoginVO; import com.yipin.liuwanr.entity.vo.AdminLoginVO;
import com.yipin.liuwanr.helper.RedisHelper; import com.yipin.liuwanr.helper.RedisHelper;
@ -47,6 +48,7 @@ public class UserInfoController {
/** /**
* 添加用户 * 添加用户
*/ */
@Log("添加用户")
@Transactional @Transactional
@PostMapping("/addUser") @PostMapping("/addUser")
public Response addUser(@RequestBody UserInfoVO vo) { public Response addUser(@RequestBody UserInfoVO vo) {
@ -147,6 +149,7 @@ public class UserInfoController {
/** /**
* 删除用户(根据ID修改isdel状态,0可见 1不可见) * 删除用户(根据ID修改isdel状态,0可见 1不可见)
*/ */
@Log("删除用户")
@Transactional @Transactional
@PostMapping("/deleteUserInfo") @PostMapping("/deleteUserInfo")
public Response deleteUserInfo(@RequestBody List<Integer> userIdList) { public Response deleteUserInfo(@RequestBody List<Integer> userIdList) {
@ -172,6 +175,7 @@ public class UserInfoController {
/** /**
* 更新用户 * 更新用户
*/ */
@Log("更新用户")
@Transactional @Transactional
@PostMapping("/updateUserInfo") @PostMapping("/updateUserInfo")
public Response updateUserInfo(@RequestBody UserInfo userInfo) { public Response updateUserInfo(@RequestBody UserInfo userInfo) {
@ -228,6 +232,7 @@ public class UserInfoController {
/** /**
* 更新用户个人档案 * 更新用户个人档案
*/ */
@Log("更新用户个人档案")
@Transactional @Transactional
@PostMapping("/updateUserProfiles") @PostMapping("/updateUserProfiles")
public Response updateUserProfiles(@RequestBody List<UserProfiles> userProfilesList) { public Response updateUserProfiles(@RequestBody List<UserProfiles> userProfilesList) {
@ -254,6 +259,7 @@ public class UserInfoController {
/** /**
* 更新用户组织关系 * 更新用户组织关系
*/ */
@Log("更新用户组织关系")
@Transactional @Transactional
@PostMapping("/updateOR") @PostMapping("/updateOR")
public Response updateOrganizationRelationship(@RequestBody UserInfoVO vo) { public Response updateOrganizationRelationship(@RequestBody UserInfoVO vo) {
@ -346,6 +352,7 @@ public class UserInfoController {
/** /**
* 科大教师端登陆 * 科大教师端登陆
*/ */
@Log("科大教师端登录")
@PostMapping("/adminLogins") @PostMapping("/adminLogins")
public Response adminLogins(@RequestBody AdminLoginVO adminLogin) { public Response adminLogins(@RequestBody AdminLoginVO adminLogin) {
Response resp = new Response(); Response resp = new Response();
@ -395,6 +402,7 @@ public class UserInfoController {
/** /**
* 客户端登陆 * 客户端登陆
*/ */
@Log("客户端登录")
@GetMapping("/logins") @GetMapping("/logins")
Response logins(@RequestParam("userId") Integer userId, @RequestParam("schoolId") Integer schoolId,@RequestParam("roleId") String roleId, HttpServletRequest req, HttpServletResponse res) { Response logins(@RequestParam("userId") Integer userId, @RequestParam("schoolId") Integer schoolId,@RequestParam("roleId") String roleId, HttpServletRequest req, HttpServletResponse res) {
Response resp = new Response(); Response resp = new Response();
@ -699,6 +707,7 @@ public class UserInfoController {
/** /**
* 删除平台 * 删除平台
*/ */
@Log("删除平台")
@PostMapping("/deletePlatform") @PostMapping("/deletePlatform")
Response deletePlatform(@RequestBody OrganizationRelationship OR) { Response deletePlatform(@RequestBody OrganizationRelationship OR) {
Response resp = new Response(); Response resp = new Response();

@ -1,12 +1,12 @@
package com.yipin.liuwanr.entity; package com.yipin.liuwanr.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
*
* @author cdy
*/
@Data @Data
@ToString @ToString
public class SysLog { public class SysLog {

Loading…
Cancel
Save