prescript

This commit is contained in:
wangjinlei
2023-12-14 14:52:49 +08:00
parent 6a42c41ec2
commit af081f6e81
3 changed files with 25 additions and 2 deletions

View File

@@ -10,4 +10,6 @@ public interface PrescriptCategoryService extends IService<PrescriptCategoryEnti
List<PrescriptCategoryEntity> getPrescriptCategoryList();
boolean delPrescriptCategory(Integer prescriptCategoryId);
List<PrescriptCategoryEntity> getCategoryByPid(Integer pid);
}

View File

@@ -47,4 +47,13 @@ public class PrescriptCategoryServiceImpl extends ServiceImpl<PrescriptCategoryD
removeById(prescriptCategoryId);
return true;
}
@Override
public List<PrescriptCategoryEntity> getCategoryByPid(Integer pid) {
LambdaQueryWrapper<PrescriptCategoryEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PrescriptCategoryEntity::getPid,pid);
wrapper.orderByDesc(PrescriptCategoryEntity::getSort);
List<PrescriptCategoryEntity> list = list(wrapper);
return list;
}
}