|
|
@@ -78,8 +78,8 @@ public class OrderItemsServiceImpl extends ServiceImpl<OrderItemsMapper, OrderIt
|
|
|
*/
|
|
|
public List<OrderItems> saveOrderItemsMessage(List<OrderItems> list, Date date,Long Pid){
|
|
|
list.stream().forEach(item ->{
|
|
|
- if (item.getAmount() == BigDecimal.ZERO){
|
|
|
- throw new RuntimeException("金额不能为0");
|
|
|
+ if (item.getAmount() == null || item.getAmount() == BigDecimal.ZERO){
|
|
|
+ throw new RuntimeException("金额不能为空或0");
|
|
|
}
|
|
|
if (item.getId() == null){
|
|
|
item.setTenantId(SecureUtil.getTenantId());
|