1.字典树调整
This commit is contained in:
@@ -79,6 +79,28 @@ public class DictTreeController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param dicParam
|
||||
* @return
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.UPDATE)
|
||||
@PutMapping("/update")
|
||||
@ApiOperation("修改")
|
||||
@ApiImplicitParam(name = "dicParam", value = "数据", required = true)
|
||||
public HttpResult<Boolean> update(@RequestBody @Validated DictTreeParam.DictTreeUpdateParam dicParam) {
|
||||
String methodDescribe = getMethodDescribe("update");
|
||||
LogUtil.njcnDebug(log, "{},更新的信息为:{}", methodDescribe,dicParam);
|
||||
boolean result = sysDicTreePOService.updateDictTree(dicParam);
|
||||
if (result){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.QUERY)
|
||||
@PostMapping("/query")
|
||||
@ApiOperation("根据pid查询字典树")
|
||||
|
||||
@@ -19,6 +19,8 @@ public interface SysDicTreePOService extends IService<SysDicTreePO> {
|
||||
|
||||
boolean addDictTree(DictTreeParam dictTreeParam);
|
||||
|
||||
boolean updateDictTree(DictTreeParam dictTreeParam);
|
||||
|
||||
List<DictTreeVO> queryByPid(String pid);
|
||||
|
||||
DictTreeVO queryByCode(String code);
|
||||
|
||||
@@ -54,6 +54,13 @@ public class SysDicTreePOServiceImpl extends ServiceImpl<SysDicTreePOMapper, Sys
|
||||
return save;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateDictTree(DictTreeParam dictTreeParam) {
|
||||
SysDicTreePO sysDicTreePO = new SysDicTreePO();
|
||||
BeanUtils.copyProperties(dictTreeParam, sysDicTreePO);
|
||||
return this.updateById(sysDicTreePO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictTreeVO> queryByPid(String pid) {
|
||||
List<DictTreeVO> collect = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user