接口上加注解EpcLog 并加备注 可存储操作日志
This commit is contained in:
+3
-6
@@ -1,10 +1,9 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.controller;
|
||||
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.Log.BusinessType;
|
||||
import com.adc.da.Log.EpcLog;
|
||||
import com.adc.da.common.FileUnZip;
|
||||
import com.adc.da.common.ReadExcel;
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
@@ -22,7 +21,6 @@ import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.utils.util.*;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -44,11 +42,9 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -93,6 +89,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|自定义分页查询")
|
||||
@GetMapping("/getSarStandardsInfoPage")
|
||||
@EpcLog(description = "国内库或国外库查询",businessType = BusinessType.SEARCH)
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:getSarStandardsInfoPage")
|
||||
public ResponseMessage<PageInfo<SarStandardsInfo>> getSarStandardsInfoPage(SarStandardsInfoEOPage page,@RequestParam(defaultValue = "0") String mark) throws Exception {
|
||||
if (null != page.getNowOrderBy()) {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sysLog.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sysLog.entity.SysLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-02-15
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SysLog|")
|
||||
@RequestMapping("/sysLog/sys-log")
|
||||
public class SysLogController extends BaseController<SysLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sysLog.dao;
|
||||
|
||||
import com.adc.da.slrs.sysLog.entity.SysLog;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-02-15
|
||||
*/
|
||||
public interface SysLogDao extends BaseMapper<SysLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.adc.da.slrs.sysLog.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-02-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SysLog对象", description="")
|
||||
public class SysLog extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "操作时间")
|
||||
private String operTime;
|
||||
|
||||
@ApiModelProperty(value = "操作类型")
|
||||
private String oper;
|
||||
|
||||
@ApiModelProperty(value = "操作ip")
|
||||
private String operIp;
|
||||
|
||||
@ApiModelProperty(value = "操作系统类型")
|
||||
private String operSystem;
|
||||
|
||||
@ApiModelProperty(value = "使用的浏览器")
|
||||
private String operBrowser;
|
||||
|
||||
@ApiModelProperty(value = "日志等级")
|
||||
private String operLevel;
|
||||
|
||||
@ApiModelProperty(value = "操作模块")
|
||||
private String operLocation;
|
||||
|
||||
@ApiModelProperty(value = "传参")
|
||||
private String json;
|
||||
|
||||
@ApiModelProperty(value = "接口耗时")
|
||||
private int runTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sysLog.service;
|
||||
|
||||
import com.adc.da.slrs.sysLog.entity.SysLog;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-02-15
|
||||
*/
|
||||
public interface ISysLogService extends IService<SysLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sysLog.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sysLog.entity.SysLog;
|
||||
import com.adc.da.slrs.sysLog.dao.SysLogDao;
|
||||
import com.adc.da.slrs.sysLog.service.ISysLogService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-02-15
|
||||
*/
|
||||
@Service
|
||||
public class SysLogServiceImpl extends ServiceImpl<SysLogDao, SysLog> implements ISysLogService {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user