|
@@ -4,7 +4,7 @@ import cn.dev33.satoken.util.SaResult;
|
4
|
4
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
5
|
5
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
6
|
6
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
7
|
|
-import com.lyg.application.entity.TaSearchAttach;
|
|
7
|
+import com.lyg.application.entity.TaSourceAttach;
|
8
|
8
|
import com.lyg.application.service.TaSourceAttachService;
|
9
|
9
|
import com.lyg.common.util.StringUtil;
|
10
|
10
|
import com.lyg.framework.accesslimit.AccessLimit;
|
|
@@ -61,11 +61,11 @@ public class TaSourceAttachController extends BaseController {
|
61
|
61
|
@ApiParam("正序排列") @RequestParam(value = "sortAsc", required = false) String sortAsc,
|
62
|
62
|
@ApiParam("倒序排列") @RequestParam(value = "sortDesc", defaultValue = "create_date") String sortDesc) throws Exception {
|
63
|
63
|
|
64
|
|
- IPage<TaSearchAttach> pg = new Page<>(pageNum, pageSize);
|
65
|
|
- QueryWrapper<TaSearchAttach> queryWrapper = new QueryWrapper<>();
|
|
64
|
+ IPage<TaSourceAttach> pg = new Page<>(pageNum, pageSize);
|
|
65
|
+ QueryWrapper<TaSourceAttach> queryWrapper = new QueryWrapper<>();
|
66
|
66
|
queryWrapper.orderByAsc(StringUtil.isNotEmpty(sortAsc), StringUtil.humpToLine(sortAsc));
|
67
|
67
|
queryWrapper.orderByDesc(StringUtil.isNotEmpty(sortDesc), StringUtil.humpToLine(sortDesc));
|
68
|
|
- IPage<TaSearchAttach> result = taSourceAttachService.page(pg, queryWrapper);
|
|
68
|
+ IPage<TaSourceAttach> result = taSourceAttachService.page(pg, queryWrapper);
|
69
|
69
|
|
70
|
70
|
return SaResult.data(result);
|
71
|
71
|
}
|
|
@@ -73,16 +73,16 @@ public class TaSourceAttachController extends BaseController {
|
73
|
73
|
/**
|
74
|
74
|
* 新增数据
|
75
|
75
|
*
|
76
|
|
- * @param taSearchAttach 实例对象
|
|
76
|
+ * @param TaSourceAttach 实例对象
|
77
|
77
|
* @return 实例对象
|
78
|
78
|
*/
|
79
|
79
|
@OpLog(module = "搜索附件表", action = "新增数据")
|
80
|
80
|
@AccessLimit()
|
81
|
81
|
@ApiOperation("新增数据")
|
82
|
82
|
@PostMapping("/taSearchAttach")
|
83
|
|
- public SaResult add(@ApiParam("对象实体") @Validated @RequestBody TaSearchAttach taSearchAttach) throws Exception {
|
84
|
|
- taSourceAttachService.save(taSearchAttach);
|
85
|
|
- return SaResult.data(taSearchAttach);
|
|
83
|
+ public SaResult add(@ApiParam("对象实体") @Validated @RequestBody TaSourceAttach TaSourceAttach) throws Exception {
|
|
84
|
+ taSourceAttachService.save(TaSourceAttach);
|
|
85
|
+ return SaResult.data(TaSourceAttach);
|
86
|
86
|
}
|
87
|
87
|
|
88
|
88
|
/**
|
|
@@ -95,11 +95,11 @@ public class TaSourceAttachController extends BaseController {
|
95
|
95
|
@AccessLimit()
|
96
|
96
|
@ApiOperation("更新数据")
|
97
|
97
|
@PutMapping("/taSearchAttach/{id}")
|
98
|
|
- public SaResult edit(@ApiParam("对象实体") @Validated @RequestBody TaSearchAttach taSearchAttach,
|
|
98
|
+ public SaResult edit(@ApiParam("对象实体") @Validated @RequestBody TaSourceAttach TaSourceAttach,
|
99
|
99
|
@ApiParam("对象ID") @PathVariable String id) throws Exception {
|
100
|
|
- taSearchAttach.setSourceAttachId(id);
|
101
|
|
- taSourceAttachService.updateById(taSearchAttach);
|
102
|
|
- return SaResult.data(taSearchAttach);
|
|
100
|
+ TaSourceAttach.setSourceAttachId(id);
|
|
101
|
+ taSourceAttachService.updateById(TaSourceAttach);
|
|
102
|
+ return SaResult.data(TaSourceAttach);
|
103
|
103
|
}
|
104
|
104
|
|
105
|
105
|
/**
|