This commit is contained in:
gong
2026-01-30 14:38:31 +08:00
parent 496c931678
commit c974f9e092

View File

@@ -72,10 +72,10 @@ public class ProductController {
public CzgResult<Map<String, Object>> getProductPage(ProductDTO param) {
Page<ProductDTO> data = productService.getProductPage(param);
Map<String, Object> map = JSONObject.parseObject(JSONObject.toJSONString(data), Map.class);
if(data.getRecords() != null){
if (data.getRecords() != null && !data.getRecords().isEmpty()) {
ProductDTO first = data.getRecords().getFirst();
map.put("warnLine", first.getWarnLine());
}else {
} else {
map.put("warnLine", 0);
}
return CzgResult.success(map);