物料不选货主也可更新;
This commit is contained in:
+4
-1
@@ -53,7 +53,10 @@ public class MaterialCommandService {
|
||||
public void handle(UpdateMaterialCommand command) {
|
||||
Material material = materialRepository.findById(command.getId())
|
||||
.orElseThrow(() -> new MaterialDomainException("物料不存在"));
|
||||
String shipper = userServiceFeignService.findUserNameByUserId(command.getOwnerId(),"物料模块-调用RPC错误");
|
||||
String shipper = "";
|
||||
if (command.getOwnerId() != null) {
|
||||
shipper = userServiceFeignService.findUserNameByUserId(command.getOwnerId(),"物料模块-调用RPC错误");
|
||||
}
|
||||
material.update(command.getOwnerId(),shipper,
|
||||
command.getCategory(),
|
||||
command.getName(),
|
||||
|
||||
Reference in New Issue
Block a user