订单过期返回状态码

This commit is contained in:
2025-03-25 16:55:19 +08:00
parent ae6b5fcbd1
commit 9a55dcd038
3 changed files with 5 additions and 2 deletions

View File

@@ -281,6 +281,9 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
}
Product old = super.getById(dto.getId());
Product entity = BeanUtil.copyProperties(dto, Product.class);
if ("weight".equals(entity.getType()) && (entity.getWeight() == null || entity.getWeight().compareTo(BigDecimal.ZERO) <= 0)) {
throw new CzgException("称重商品重量必须大于0");
}
entity.setImages(JSON.toJSONString(dto.getImages(), JSONWriter.Feature.WriteMapNullValue));
entity.setGroupSnap("[]");
//套餐