cy
86173 2024-08-23 10:41:12 +08:00
parent faccb76a75
commit 5f438eb78c
4 changed files with 13 additions and 17 deletions

View File

@ -45,10 +45,10 @@ public class DefinedController {
/**
*
*
*/
@RequestMapping(path = "/list",method = RequestMethod.POST)
@Operation(summary = "查询",description = "根据接口的名称、编码,是否开启等可以进行筛选")
@Operation(summary = "查询",description = "根据接口的名称 有效期 等可以进行筛选")
public Result<PageParam<Defined>> selectList(PageParam<Defined> page,
@Validated @RequestBody DefinedReq definedReq) {

View File

@ -1,8 +1,12 @@
package com.muyu.master.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.muyu.common.core.domain.Result;
import com.muyu.market.domian.Defined;
import com.muyu.market.domian.Logs;
import com.muyu.market.domian.config.PageParam;
import com.muyu.master.service.LogsService;
import io.micrometer.common.util.StringUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.log4j.Log4j2;
@ -26,9 +30,13 @@ public class LogsController {
*/
@Operation(summary = "查询日志列表",description = "查询用户操作日志列表")
@GetMapping("/list")
public Result<List<Logs>> show(){
List<Logs> list=service.showList();
return Result.success(list);
public Result<PageParam<Logs>> show(PageParam<Logs>page,String getLogsId){
LambdaQueryWrapper<Logs> queryWrapper = new LambdaQueryWrapper<>();
if (StringUtils.isNotEmpty(getLogsId)){
queryWrapper.select(Logs::getLogsId);//根据用户id查询
}
PageParam<Logs> pageDTO=service.page(page,queryWrapper);
return Result.success(pageDTO);
}
/**

View File

@ -8,6 +8,5 @@ import java.util.List;
public interface LogsService extends IService<Logs> {
List<Logs> showList();
}

View File

@ -19,16 +19,5 @@ public class LogsServiceImpl
@Autowired
private LogsMapper mapper;
@Override
public List<Logs> showList() {
LambdaQueryWrapper<Logs> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.select(Logs::getLogsId);//根据用户id查询
List<Logs> list = this.list();
list.stream().map(Logs::getLogsId).collect(Collectors.toSet());
return this.list(queryWrapper)
.stream()
.toList();
}
}