PublicAffairs/gather-app/src/main/java/com/ruoyi/business/controller/gwglLogController.java

48 lines
1.5 KiB
Java
Raw Normal View History

2025-06-06 14:44:42 +08:00
package com.ruoyi.business.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.database.domain.gwglLog;
import com.ruoyi.database.service.gwglLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
2025-06-09 10:42:10 +08:00
import org.springframework.web.bind.annotation.*;
2025-06-06 14:44:42 +08:00
import java.util.List;
/**
* @Description gwglLogController
* @Author lijingtong
* @Date 2025-06-06
*/
@Api(tags = "审批日志")
@RestController
@RequestMapping("/gwglLog")
@RequiredArgsConstructor
public class gwglLogController extends BaseController {
private final gwglLogService gwglLogService;
@ApiOperation("查询审批日志")
2025-06-09 10:42:10 +08:00
@PostMapping("/list")
2025-06-06 14:44:42 +08:00
public TableDataInfo query(@RequestBody gwglLog gwglLog){
startPage();
QueryWrapper<gwglLog> queryWrapper = new QueryWrapper<>(gwglLog);
2025-06-09 23:41:38 +08:00
// queryWrapper.orderByDesc("create_time");
2025-06-06 14:44:42 +08:00
return getDataTable(gwglLogService.list(queryWrapper));
}
@ApiOperation("根据编号查询日志")
2025-06-09 10:42:10 +08:00
@GetMapping("/detail/{applyNo}")
2025-06-06 14:44:42 +08:00
public TableDataInfo detail(@PathVariable String applyNo){
QueryWrapper<gwglLog> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("apply_no", applyNo);
List<gwglLog> list = gwglLogService.list(queryWrapper);
long size = list.size();
return getDataTableEnhance(list, size);
}
}