App用户密码调整

This commit is contained in:
2023-08-23 15:54:00 +08:00
parent 487a5f79c7
commit 39c910a33d
12 changed files with 209 additions and 9 deletions

View File

@@ -7,6 +7,7 @@ import com.njcn.system.pojo.dto.EpdDTO;
import com.njcn.system.pojo.param.EleEpdPqdParam;
import com.njcn.system.pojo.po.EleEpdPqd;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
@@ -48,4 +49,7 @@ public interface EpdFeignClient {
@PostMapping("/findAll")
HttpResult<List<EpdDTO>> findAll();
@PostMapping("/findByName")
HttpResult<EleEpdPqd> findByName(@RequestParam("name") String name);
}

View File

@@ -88,6 +88,12 @@ public class EpdFeignClientFallbackFactory implements FallbackFactory<EpdFeignCl
log.error("{}异常,降级处理,异常为:{}","查询所有字典数据",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<EleEpdPqd> findByName(String name) {
log.error("{}异常,降级处理,异常为:{}","根据名称查询字典信息",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -196,12 +196,23 @@ public class EleEpdPqdController extends BaseController {
@PostMapping("/findAll")
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("查询所有字典数据")
// @ApiIgnore
@ApiIgnore
public HttpResult<List<EpdDTO>> findAll(){
String methodDescribe = getMethodDescribe("findAll");
List<EpdDTO> list = eleEpdPqdService.findAll();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
@PostMapping("/findByName")
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("根据名称查询字典信息")
@ApiImplicitParam(name = "name", value = "指标名称", required = true)
@ApiIgnore
public HttpResult<EleEpdPqd> findByName(@RequestParam("name") @Validated String name){
String methodDescribe = getMethodDescribe("findByName");
EleEpdPqd po = eleEpdPqdService.lambdaQuery().eq(EleEpdPqd::getName,name).one();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
}
}