refactor(system): 重构动态表格演示接口并添加操作日志
- 调整导入包顺序,将 KitDynamicTableUtil 移至正确位置 - 添加 OperationLog 注解到三个查询方法上 - 增加关于查询性能的注释说明 - 优化代码结构以符合新的日志记录要求
This commit is contained in:
+9
-2
@@ -18,11 +18,12 @@ package cn.odboy.system.features;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.odboy.base.KitPageArgs;
|
||||
import cn.odboy.feature.KitDynamicTableResponse;
|
||||
import cn.odboy.system.features.model.SystemMenuDynamicTableModel;
|
||||
import cn.odboy.feature.KitDynamicTableUtil;
|
||||
import cn.odboy.system.dal.dataobject.SystemMenuTb;
|
||||
import cn.odboy.system.dal.model.request.SystemQueryMenuArgs;
|
||||
import cn.odboy.system.dal.mysql.SystemMenuMapper;
|
||||
import cn.odboy.feature.KitDynamicTableUtil;
|
||||
import cn.odboy.system.features.model.SystemMenuDynamicTableModel;
|
||||
import cn.odboy.system.framework.operalog.OperationLog;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -38,6 +39,9 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 经过测试,三种查询方式均无太大损耗
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "系统组件:CuteDynamicTable演示")
|
||||
@RequestMapping("/api/features/CuteDynamicTable")
|
||||
@@ -46,6 +50,7 @@ public class CuteDynamicTableDemoApi {
|
||||
@Autowired
|
||||
private SystemMenuMapper systemMenuMapper;
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("写法1:查询动态数据")
|
||||
@PostMapping(value = "/searchMenu")
|
||||
@PreAuthorize("@el.check()")
|
||||
@@ -70,6 +75,7 @@ public class CuteDynamicTableDemoApi {
|
||||
return ResponseEntity.ok(new KitDynamicTableResponse<>(SystemMenuDynamicTableModel.class, pageResult, "id"));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("写法2:查询动态数据")
|
||||
@PostMapping(value = "/searchMenu2")
|
||||
@PreAuthorize("@el.check()")
|
||||
@@ -86,6 +92,7 @@ public class CuteDynamicTableDemoApi {
|
||||
return ResponseEntity.ok(new KitDynamicTableResponse<>(SystemMenuDynamicTableModel.class, pageArgs, "id", systemMenuMapper, lambda));
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("写法3:查询动态数据")
|
||||
@PostMapping(value = "/searchMenu3")
|
||||
@PreAuthorize("@el.check()")
|
||||
|
||||
Reference in New Issue
Block a user