【fix sonar】OnlCgreportParamController文件
This commit is contained in:
+6
-8
@@ -28,12 +28,12 @@ public class OnlCgreportParamController {
|
||||
|
||||
|
||||
@GetMapping({"/listByHeadId"})
|
||||
public Result a(@RequestParam("headId") String var1) {
|
||||
public Result<List<OnlCgreportParam>> a(@RequestParam("headId") String var1) {
|
||||
QueryWrapper<OnlCgreportParam> var2 = new QueryWrapper<>();
|
||||
var2.eq("cgrhead_id", var1);
|
||||
var2.orderByAsc("order_num");
|
||||
List<OnlCgreportParam> var3 = this.onlCgreportParamService.list(var2);
|
||||
Result var4 = new Result<>();
|
||||
Result<List<OnlCgreportParam>> var4 = new Result<>();
|
||||
var4.setSuccess(true);
|
||||
var4.setResult(var3);
|
||||
return var4;
|
||||
@@ -41,7 +41,7 @@ public class OnlCgreportParamController {
|
||||
|
||||
@GetMapping({"/list"})
|
||||
public Result<IPage<OnlCgreportParam>> a(OnlCgreportParam var1, @RequestParam(name = "pageNo", defaultValue = "1") Integer var2, @RequestParam(name = "pageSize", defaultValue = "10") Integer var3, HttpServletRequest var4) {
|
||||
Result var5 = new Result<>();
|
||||
Result<IPage<OnlCgreportParam>> var5 = new Result<>();
|
||||
QueryWrapper<OnlCgreportParam> var6 = QueryGenerator.initQueryWrapper(var1, var4.getParameterMap());
|
||||
Page<OnlCgreportParam> var7 = new Page<>(var2, var3);
|
||||
IPage<OnlCgreportParam> var8 = this.onlCgreportParamService.page(var7, var6);
|
||||
@@ -51,19 +51,18 @@ public class OnlCgreportParamController {
|
||||
}
|
||||
|
||||
@PostMapping({"/add"})
|
||||
public Result a(@RequestBody OnlCgreportParam var1) {
|
||||
public Result<String> a(@RequestBody OnlCgreportParam var1) {
|
||||
this.onlCgreportParamService.save(var1);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
@PostMapping({"/edit"})
|
||||
public Result b(@RequestBody OnlCgreportParam var1) {
|
||||
public Result<String> b(@RequestBody OnlCgreportParam var1) {
|
||||
this.onlCgreportParamService.updateById(var1);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
@PostMapping({"/delete"})
|
||||
// public Result b(@RequestParam(name = "id",required = true) String var1) {
|
||||
public Result<Object> b(@RequestBody Map<String, String> map) {
|
||||
String var1 = map.get("id");
|
||||
if(StringUtils.isBlank(var1)){
|
||||
@@ -74,7 +73,6 @@ public class OnlCgreportParamController {
|
||||
}
|
||||
|
||||
@PostMapping({"/deleteBatch"})
|
||||
// public Result c(@RequestParam(name = "ids", required = true) String var1) {
|
||||
public Result<Object> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
String var1 = map.get("ids");
|
||||
if(StringUtils.isBlank(var1)){
|
||||
@@ -86,7 +84,7 @@ public class OnlCgreportParamController {
|
||||
|
||||
@GetMapping({"/queryById"})
|
||||
public Result<OnlCgreportParam> d(@RequestParam(name = "id", required = true) String var1) {
|
||||
Result var2 = new Result();
|
||||
Result<OnlCgreportParam> var2 = new Result<>();
|
||||
OnlCgreportParam var3 = this.onlCgreportParamService.getById(var1);
|
||||
var2.setResult(var3);
|
||||
return var2;
|
||||
|
||||
Reference in New Issue
Block a user