cy
parent
faccb76a75
commit
5f438eb78c
|
@ -45,10 +45,10 @@ public class DefinedController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口列表
|
* 接口列表 分页
|
||||||
*/
|
*/
|
||||||
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
||||||
@Operation(summary = "查询",description = "根据接口的名称、编码,是否开启等可以进行筛选")
|
@Operation(summary = "查询",description = "根据接口的名称 有效期 等可以进行筛选")
|
||||||
public Result<PageParam<Defined>> selectList(PageParam<Defined> page,
|
public Result<PageParam<Defined>> selectList(PageParam<Defined> page,
|
||||||
@Validated @RequestBody DefinedReq definedReq) {
|
@Validated @RequestBody DefinedReq definedReq) {
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
package com.muyu.master.controller;
|
package com.muyu.master.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.market.domian.Defined;
|
||||||
import com.muyu.market.domian.Logs;
|
import com.muyu.market.domian.Logs;
|
||||||
|
import com.muyu.market.domian.config.PageParam;
|
||||||
import com.muyu.master.service.LogsService;
|
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.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
@ -26,9 +30,13 @@ public class LogsController {
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "查询日志列表",description = "查询用户操作日志列表")
|
@Operation(summary = "查询日志列表",description = "查询用户操作日志列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public Result<List<Logs>> show(){
|
public Result<PageParam<Logs>> show(PageParam<Logs>page,String getLogsId){
|
||||||
List<Logs> list=service.showList();
|
LambdaQueryWrapper<Logs> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
return Result.success(list);
|
if (StringUtils.isNotEmpty(getLogsId)){
|
||||||
|
queryWrapper.select(Logs::getLogsId);//根据用户id查询
|
||||||
|
}
|
||||||
|
PageParam<Logs> pageDTO=service.page(page,queryWrapper);
|
||||||
|
return Result.success(pageDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,6 +8,5 @@ import java.util.List;
|
||||||
|
|
||||||
public interface LogsService extends IService<Logs> {
|
public interface LogsService extends IService<Logs> {
|
||||||
|
|
||||||
List<Logs> showList();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,16 +19,5 @@ public class LogsServiceImpl
|
||||||
@Autowired
|
@Autowired
|
||||||
private LogsMapper mapper;
|
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue