Gitea 11 months ago
parent 622d13e32f
commit 7b5f800347
  1. 11
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/basicsskill/controller/BasicsskillController.java
  2. 6
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/basicsskill/entity/Basicsskill.java

@ -82,8 +82,8 @@ public class BasicsskillController extends JeecgController<Basicsskill, IBasicss
} }
basicsskill.setPid(null); basicsskill.setPid(null);
QueryWrapper<Basicsskill> queryWrapper = QueryGenerator.initQueryWrapper(basicsskill, req.getParameterMap()); QueryWrapper<Basicsskill> queryWrapper = QueryGenerator.initQueryWrapper(basicsskill, req.getParameterMap());
// 使用 eq 防止模糊查询 // 使用 in 防止模糊查询
//queryWrapper.eq("pid", parentId); queryWrapper.in("pid", "0","1");
Page<Basicsskill> page = new Page<Basicsskill>(pageNo, pageSize); Page<Basicsskill> page = new Page<Basicsskill>(pageNo, pageSize);
IPage<Basicsskill> pageList = basicsskillService.page(page, queryWrapper); IPage<Basicsskill> pageList = basicsskillService.page(page, queryWrapper);
for(Basicsskill basicsskill1:pageList.getRecords()){ for(Basicsskill basicsskill1:pageList.getRecords()){
@ -233,6 +233,13 @@ public class BasicsskillController extends JeecgController<Basicsskill, IBasicss
// @RequiresPermissions("basicsskill:basicsskill:edit") // @RequiresPermissions("basicsskill:basicsskill:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody Basicsskill basicsskill) { public Result<String> edit(@RequestBody Basicsskill basicsskill) {
if(basicsskill.getPid().equals("专业认证能力评价体系")){
basicsskill.setPid("0");
}else if(basicsskill.getPid().equals("创新能力评价体系")){
basicsskill.setPid("1");
}else {
basicsskill.setPid(basicsskillService.getById(basicsskill.getId()).getPid());
}
basicsskillService.updateBasicsskill(basicsskill); basicsskillService.updateBasicsskill(basicsskill);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }

@ -68,4 +68,10 @@ public class Basicsskill implements Serializable {
@Dict(dicCode = "yn") @Dict(dicCode = "yn")
@ApiModelProperty(value = "是否有子节点") @ApiModelProperty(value = "是否有子节点")
private String hasChild; private String hasChild;
/**
* 启停
*/
@Excel(name = "启停", width = 15)
@ApiModelProperty(value = "启停")
private String startstop;
} }

Loading…
Cancel
Save