bug修复

This commit is contained in:
guo 2023-12-28 18:38:20 +08:00
parent e9a08b8288
commit 7632ed3cf2
2 changed files with 107 additions and 111 deletions

View File

@ -1,27 +1,22 @@
package com.zhgd.xmgl.modules.rt.controller; package com.zhgd.xmgl.modules.rt.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.xmgl.modules.rt.entity.RtNewTechnologiesAndNewProcess;
import com.zhgd.xmgl.modules.rt.service.IRtNewTechnologiesAndNewProcessService; import com.zhgd.xmgl.modules.rt.service.IRtNewTechnologiesAndNewProcessService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import java.util.HashMap;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import com.zhgd.jeecg.common.api.vo.Result;
import org.apache.commons.collections.MapUtils;
import com.zhgd.xmgl.modules.rt.entity.RtNewTechnologiesAndNewProcess;
import org.simpleframework.xml.core.Validate;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.simpleframework.xml.core.Validate;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.HashMap;
import java.util.List;
/** /**
@ -36,104 +31,105 @@ import org.springframework.web.bind.annotation.*;
@Slf4j @Slf4j
@Api(tags = "榕图-新技术新工艺汇编相关Api") @Api(tags = "榕图-新技术新工艺汇编相关Api")
public class RtNewTechnologiesAndNewProcessController { public class RtNewTechnologiesAndNewProcessController {
@Autowired @Autowired
private IRtNewTechnologiesAndNewProcessService rtNewTechnologiesAndNewProcessService; private IRtNewTechnologiesAndNewProcessService rtNewTechnologiesAndNewProcessService;
/** /**
* 分页列表查询 * 分页列表查询
* *
* @return * @return
*/ */
@ApiOperation(value = "分页列表查询榕图-新技术新工艺汇编信息", notes = "分页列表查询榕图-新技术新工艺汇编信息", httpMethod = "GET") @ApiOperation(value = "分页列表查询榕图-新技术新工艺汇编信息", notes = "分页列表查询榕图-新技术新工艺汇编信息", httpMethod = "GET")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
}) })
@GetMapping(value = "/page") @GetMapping(value = "/page")
public Result<IPage<RtNewTechnologiesAndNewProcess>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) { public Result<IPage<RtNewTechnologiesAndNewProcess>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(rtNewTechnologiesAndNewProcessService.queryPageList(paramMap)); return Result.success(rtNewTechnologiesAndNewProcessService.queryPageList(paramMap));
} }
/** /**
* 列表查询 * 列表查询
* *
* @return * @return
*/ */
@ApiOperation(value = "列表查询榕图-新技术新工艺汇编信息", notes = "列表查询榕图-新技术新工艺汇编信息", httpMethod = "GET") @ApiOperation(value = "列表查询榕图-新技术新工艺汇编信息", notes = "列表查询榕图-新技术新工艺汇编信息", httpMethod = "GET")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<List<RtNewTechnologiesAndNewProcess>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) { public Result<List<RtNewTechnologiesAndNewProcess>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(rtNewTechnologiesAndNewProcessService.queryList(paramMap)); return Result.success(rtNewTechnologiesAndNewProcessService.queryList(paramMap));
} }
/** /**
* 添加 * 添加
* *
* @param rtNewTechnologiesAndNewProcess * @param rtNewTechnologiesAndNewProcess
* @return * @return
*/ */
@ApiOperation(value = "添加榕图-新技术新工艺汇编信息", notes = "添加榕图-新技术新工艺汇编信息", httpMethod = "POST") @ApiOperation(value = "添加榕图-新技术新工艺汇编信息", notes = "添加榕图-新技术新工艺汇编信息", httpMethod = "POST")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<RtNewTechnologiesAndNewProcess> add(@RequestBody @Validate RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) { public Result<RtNewTechnologiesAndNewProcess> add(@RequestBody @Validate RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) {
rtNewTechnologiesAndNewProcessService.add(rtNewTechnologiesAndNewProcess); rtNewTechnologiesAndNewProcessService.add(rtNewTechnologiesAndNewProcess);
return Result.ok(); return Result.ok();
} }
/** /**
* 编辑 * 编辑
* *
* @param rtNewTechnologiesAndNewProcess * @param rtNewTechnologiesAndNewProcess
* @return * @return
*/ */
@ApiOperation(value = "编辑榕图-新技术新工艺汇编信息", notes = "编辑榕图-新技术新工艺汇编信息", httpMethod = "POST") @ApiOperation(value = "编辑榕图-新技术新工艺汇编信息", notes = "编辑榕图-新技术新工艺汇编信息", httpMethod = "POST")
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<RtNewTechnologiesAndNewProcess> edit(@RequestBody RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) { public Result<RtNewTechnologiesAndNewProcess> edit(@RequestBody RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess) {
rtNewTechnologiesAndNewProcessService.edit(rtNewTechnologiesAndNewProcess); rtNewTechnologiesAndNewProcessService.edit(rtNewTechnologiesAndNewProcess);
return Result.ok(); return Result.ok();
} }
/** /**
* 通过id删除 * 通过id删除
* *
* @return * @return
*/ */
@ApiOperation(value = "删除榕图-新技术新工艺汇编信息", notes = "删除榕图-新技术新工艺汇编信息", httpMethod = "POST") @ApiOperation(value = "删除榕图-新技术新工艺汇编信息", notes = "删除榕图-新技术新工艺汇编信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "榕图-新技术新工艺汇编ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") @ApiImplicitParam(name = "id", value = "榕图-新技术新工艺汇编ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
@PostMapping(value = "/delete") @PostMapping(value = "/delete")
public Result<RtNewTechnologiesAndNewProcess> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) { public Result<RtNewTechnologiesAndNewProcess> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id"); String id = MapUtils.getString(map, "id");
Result<RtNewTechnologiesAndNewProcess> result = new Result<RtNewTechnologiesAndNewProcess>(); Result<RtNewTechnologiesAndNewProcess> result = new Result<RtNewTechnologiesAndNewProcess>();
RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess = rtNewTechnologiesAndNewProcessService.getById(id); RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess = rtNewTechnologiesAndNewProcessService.getById(id);
if (rtNewTechnologiesAndNewProcess == null) { if (rtNewTechnologiesAndNewProcess == null) {
result.error500("未找到对应实体"); result.error500("未找到对应实体");
} else { } else {
boolean ok = rtNewTechnologiesAndNewProcessService.removeById(id); boolean ok = rtNewTechnologiesAndNewProcessService.removeById(id);
if (ok) { if (ok) {
result.success("删除成功!"); result.success("删除成功!");
} }
} }
return result; return result;
} }
/**
* 通过id查询
*
* @param id
* @return
*/
@ApiOperation(value = "通过id查询榕图-新技术新工艺汇编信息", notes = "通过id查询榕图-新技术新工艺汇编信息", httpMethod = "GET")
@ApiImplicitParam(name = "id", value = "榕图-新技术新工艺汇编ID", paramType = "query", required = true, dataType = "Integer")
@GetMapping(value = "/queryById")
public Result<RtNewTechnologiesAndNewProcess> queryById(@RequestParam(name = "id", required = true) String id) {
Result<RtNewTechnologiesAndNewProcess> result = new Result<RtNewTechnologiesAndNewProcess>();
RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess = rtNewTechnologiesAndNewProcessService.getById(id);
if (rtNewTechnologiesAndNewProcess == null) {
result.error500("未找到对应实体");
} else {
result.setResult(rtNewTechnologiesAndNewProcess);
result.setSuccess(true);
}
return result;
}
/**
* 通过id查询
*
* @param id
* @return
*/
@ApiOperation(value = "通过id查询榕图-新技术新工艺汇编信息", notes = "通过id查询榕图-新技术新工艺汇编信息", httpMethod = "GET")
@ApiImplicitParam(name = "id", value = "榕图-新技术新工艺汇编ID", paramType = "query", required = true, dataType = "Integer")
@GetMapping(value = "/queryById")
public Result<RtNewTechnologiesAndNewProcess> queryById(@RequestParam(name = "id", required = true) String id) {
Result<RtNewTechnologiesAndNewProcess> result = new Result<RtNewTechnologiesAndNewProcess>();
RtNewTechnologiesAndNewProcess rtNewTechnologiesAndNewProcess = rtNewTechnologiesAndNewProcessService.getById(id);
if (rtNewTechnologiesAndNewProcess == null) {
result.error500("未找到对应实体");
} else {
result.setResult(rtNewTechnologiesAndNewProcess);
result.setSuccess(true);
}
return result;
}
} }

View File

@ -32,11 +32,11 @@ public class RtNewTechnologiesAndNewProcess implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private java.lang.Long id; private java.lang.Long id;
/** /**
* 分类 * 分类1土建部分2电气部分
*/ */
@Excel(name = "分类", width = 15) @Excel(name = "分类1土建部分2电气部分", width = 15)
@ApiModelProperty(value = "分类") @ApiModelProperty(value = "分类1土建部分2电气部分")
private java.lang.String classify; private java.lang.Integer classify;
/** /**
* 新技术/新工艺 * 新技术/新工艺
*/ */