物料查询返回错误提示
This commit is contained in:
@@ -7,6 +7,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import top.continew.starter.core.validation.CheckUtils;
|
||||
import top.continew.starter.core.validation.ValidationUtils;
|
||||
import top.continew.starter.extension.crud.enums.Api;
|
||||
|
||||
@@ -44,7 +45,9 @@ public class MaterialInfoController extends BaseController<MaterialInfoService,
|
||||
|
||||
@GetMapping("/code/{code}")
|
||||
public MaterialInfoDO getMaterialInfoByCode(@PathVariable String code) {
|
||||
return baseService.getMaterialInfoByCode(code);
|
||||
MaterialInfoDO materialInfoDO = baseService.getMaterialInfoByCode(code);
|
||||
CheckUtils.throwIfEmpty(materialInfoDO,"未查询到相关物料信息");
|
||||
return materialInfoDO;
|
||||
}
|
||||
|
||||
@Operation(summary = "下载导入模板", description = "下载导入模板")
|
||||
|
||||
Reference in New Issue
Block a user