Commit c995d549 authored by chenzhao's avatar chenzhao

修改代码

parent 555dab8d
......@@ -295,7 +295,13 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
@Override
public List<Equipment> listByCategoryId(Long categoryId) {
List<Equipment> list = this.list(new QueryWrapper<Equipment>().eq("category_id", categoryId));
List<Equipment> list = new ArrayList<>();
//传入的为-1时 则查询出全部设备分类定义
if(categoryId == -1 ){
list = this.list(new QueryWrapper<Equipment>());
}else {
list = this.list(new QueryWrapper<Equipment>().eq("category_id", categoryId));
}
for (Equipment equipment : list) {
List<EquipmentIndex> quotaList = iEquipmentIndexService
.list(new QueryWrapper<EquipmentIndex>().eq("equipment_id", equipment.getId()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment