fix[project]: 需求详情,兼容脏数据
This commit is contained in:
@@ -116,7 +116,7 @@ public class SimulationDemandController {
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@Operation(summary = "根据需求id,查询需求详情", description = "根据需求id,查询需求详情")
|
||||
public SdmResponse detail(@RequestParam @Validated String demandId) {
|
||||
public SdmResponse detail(@RequestParam(required = false) String demandId) {
|
||||
return demandService.detail(demandId);
|
||||
}
|
||||
|
||||
|
||||
@@ -1424,6 +1424,9 @@ public class DemandServiceImpl extends BaseService implements IDemandService {
|
||||
|
||||
@Override
|
||||
public SdmResponse detail(String demandId) {
|
||||
if (StringUtils.isBlank(demandId)){
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
}
|
||||
List<SpdmDemandVo> demandList = mapper.getDemandListById(Collections.singletonList(demandId));
|
||||
if (CollectionUtils.isEmpty(demandList)) {
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
|
||||
Reference in New Issue
Block a user