字典树新增接口
This commit is contained in:
@@ -13,6 +13,7 @@ import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.system.pojo.param.DictDataParam;
|
||||
import com.njcn.system.pojo.param.DictTreeParam;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.system.pojo.po.SysDicTreePO;
|
||||
import com.njcn.system.pojo.vo.DictDataVO;
|
||||
import com.njcn.system.pojo.vo.DictTreeVO;
|
||||
import com.njcn.system.service.IDictDataService;
|
||||
@@ -110,7 +111,15 @@ public class DictTreeController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.QUERY)
|
||||
@PostMapping("/queryById")
|
||||
@ApiOperation("根据id查询数据")
|
||||
public HttpResult<SysDicTreePO> queryById(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("queryById");
|
||||
LogUtil.njcnDebug(log, "{},字典数据为:{}", methodDescribe, id);
|
||||
SysDicTreePO result = sysDicTreePOService.queryById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,4 +25,11 @@ public interface SysDicTreePOService extends IService<SysDicTreePO>{
|
||||
DictTreeVO queryByCode(String code);
|
||||
|
||||
List<DictTreeVO> queryByid(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询字典数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
SysDicTreePO queryById(String id);
|
||||
}
|
||||
|
||||
@@ -95,4 +95,9 @@ public class SysDicTreePOServiceImpl extends ServiceImpl<SysDicTreePOMapper, Sys
|
||||
return dictTreeVOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysDicTreePO queryById(String id) {
|
||||
return this.lambdaQuery().eq(SysDicTreePO::getId,id).eq(SysDicTreePO::getStatus,0).one();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user