|
@@ -1,6 +1,19 @@
|
|
|
package com.fdkankan.sale.controller;
|
|
|
|
|
|
|
|
|
+import ch.qos.logback.classic.net.SyslogAppender;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.dtflys.forest.annotation.Post;
|
|
|
+import com.fdkankan.sale.common.PageInfo;
|
|
|
+import com.fdkankan.sale.common.ResultData;
|
|
|
+import com.fdkankan.sale.entity.SysLog;
|
|
|
+import com.fdkankan.sale.service.ISysLogService;
|
|
|
+import com.fdkankan.sale.vo.request.OperLogPageParamVO;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -14,8 +27,34 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
* @since 2023-03-08
|
|
|
*/
|
|
|
@RestController
|
|
|
-@RequestMapping("/sale/sysLog")
|
|
|
+@RequestMapping("/sale/operLog")
|
|
|
public class SysLogController {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ ISysLogService sysLogService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 操作日志列表
|
|
|
+ * @param param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("/pageOperLog")
|
|
|
+ public ResultData pageOperLog(@RequestBody OperLogPageParamVO param){
|
|
|
+
|
|
|
+ LambdaQueryWrapper<SysLog> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ if(StringUtils.isNotBlank(param.getNickName())){
|
|
|
+ wrapper.like(SysLog::getNickName,param.getNickName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(param.getUserName())){
|
|
|
+ wrapper.like(SysLog::getUserName,param.getUserName());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(param.getStartTime())){
|
|
|
+ wrapper.between(SysLog::getCreateTime,param.getStartTime(),param.getEndTime());
|
|
|
+ }
|
|
|
+ Page<SysLog> page = sysLogService.page(new Page<>(param.getPageNum(), param.getPageSize()), wrapper);
|
|
|
+
|
|
|
+ return ResultData.ok(PageInfo.PageInfo(page));
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|