1.完善模板字典解析功能

This commit is contained in:
2023-08-01 20:46:44 +08:00
parent 5ead1e1f85
commit e6c64531e1
5 changed files with 48 additions and 0 deletions

View File

@@ -177,5 +177,20 @@ public class EleEpdPqdController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
@PostMapping("/findByParam")
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("根据条件查询字典数据")
@ApiImplicitParams({
@ApiImplicitParam(name = "name", value = "指标名称", required = true),
@ApiImplicitParam(name = "dataType", value = "数据模型", required = true),
@ApiImplicitParam(name = "phase", value = "相别", required = true)
})
public HttpResult<EleEpdPqd> findByParam(@RequestParam("name") @Validated String name, @RequestParam("dataType") @Validated String dataType, @RequestParam("phase") @Validated String phase){
String methodDescribe = getMethodDescribe("judgeExist");
LogUtil.njcnDebug(log, "{},根据条件查询字典数据:", methodDescribe);
EleEpdPqd eleEpdPqd = eleEpdPqdService.findByParam(name,dataType,phase);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eleEpdPqd, methodDescribe);
}
}

View File

@@ -94,4 +94,13 @@ public interface IEleEpdPqdService extends IService<EleEpdPqd> {
*/
List<EleEpdPqd> judgeExist(String name, String dataType);
/**
* 根据条件查询字典数据
* @param name
* @param dataType
* @param phase
* @return
*/
EleEpdPqd findByParam(String name, String dataType, String phase);
}

View File

@@ -199,6 +199,13 @@ public class EleEpdPqdServiceImpl extends ServiceImpl<EleEpdPqdMapper, EleEpdPqd
return this.baseMapper.selectList(lambdaQueryWrapper);
}
@Override
public EleEpdPqd findByParam(String name, String dataType, String phase) {
LambdaQueryWrapper<EleEpdPqd> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(EleEpdPqd::getDataType,dataType).eq(EleEpdPqd::getName,name).eq(EleEpdPqd::getPhase,phase).eq(EleEpdPqd::getStatus,1);
return this.baseMapper.selectOne(lambdaQueryWrapper);
}
/**
* 校验参数,
* 1.检查是否存在相同名称的菜单