mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
bugfix
This commit is contained in:
@@ -16,6 +16,7 @@ import cn.lihongjie.coal.common.FreeMakerUtils;
|
||||
import cn.lihongjie.coal.common.JpaUtils;
|
||||
import cn.lihongjie.coal.exception.BizException;
|
||||
|
||||
import cn.lihongjie.coal.product.service.ProductService;
|
||||
import com.google.common.base.CaseFormat;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
@@ -63,7 +64,7 @@ public class CoalWashingDailyAnalysisService
|
||||
validate(entity);
|
||||
|
||||
if (entity.getProduct()!=null){
|
||||
entity.setName(entity.getProduct().getName());
|
||||
entity.setName(productService.get(entity.getProduct().getId()).getName());
|
||||
}
|
||||
|
||||
this.repository.save(entity);
|
||||
@@ -93,6 +94,9 @@ public class CoalWashingDailyAnalysisService
|
||||
return mapper.toDto(roundMapper.round(entity));
|
||||
}
|
||||
|
||||
@Autowired
|
||||
ProductService productService;
|
||||
|
||||
public CoalWashingDailyAnalysisDto update(UpdateCoalWashingDailyAnalysisDto request) {
|
||||
|
||||
|
||||
@@ -108,7 +112,8 @@ public class CoalWashingDailyAnalysisService
|
||||
|
||||
validate(entity);
|
||||
if (entity.getProduct()!=null){
|
||||
entity.setName(entity.getProduct().getName());
|
||||
|
||||
entity.setName(productService.get(entity.getProduct().getId()).getName());
|
||||
}
|
||||
this.repository.save(entity);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user