26a170b06348ff309501ddd9c918a42cd34399b5.svn-base 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package org.jeecg.modules.system.service;
  2. import com.baomidou.mybatisplus.extension.service.IService;
  3. import org.jeecg.common.exception.JeecgBootException;
  4. import org.jeecg.modules.system.entity.SysCategory;
  5. import org.jeecg.modules.system.model.TreeSelectModel;
  6. import java.util.List;
  7. import java.util.Map;
  8. /**
  9. * @Description: 分类字典
  10. * @Author: jeecg-boot
  11. * @Date: 2019-05-29
  12. * @Version: V1.0
  13. */
  14. public interface ISysCategoryService extends IService<SysCategory> {
  15. /**根节点父ID的值*/
  16. public static final String ROOT_PID_VALUE = "0";
  17. void addSysCategory(SysCategory sysCategory);
  18. void updateSysCategory(SysCategory sysCategory);
  19. /**
  20. * 根据父级编码加载分类字典的数据
  21. * @param pcode
  22. * @return
  23. */
  24. public List<TreeSelectModel> queryListByCode(String pcode) throws JeecgBootException;
  25. /**
  26. * 根据pid查询子节点集合
  27. * @param pid
  28. * @return
  29. */
  30. public List<TreeSelectModel> queryListByPid(String pid);
  31. /**
  32. * 根据pid查询子节点集合,支持查询条件
  33. * @param pid
  34. * @param condition
  35. * @return
  36. */
  37. public List<TreeSelectModel> queryListByPid(String pid, Map<String,String> condition);
  38. /**
  39. * 根据code查询id
  40. * @param code
  41. * @return
  42. */
  43. public String queryIdByCode(String code);
  44. /**
  45. * 删除节点时同时删除子节点及修改父级节点
  46. * @param ids
  47. */
  48. void deleteSysCategory(String ids);
  49. /**
  50. * 分类字典控件数据回显[表单页面]
  51. *
  52. * @param ids
  53. * @return
  54. */
  55. List<String> loadDictItem(String ids);
  56. /**
  57. * 分类字典控件数据回显[表单页面]
  58. *
  59. * @param ids
  60. * @param delNotExist 是否移除不存在的项,设为false如果某个key不存在数据库中,则直接返回key本身
  61. * @return
  62. */
  63. List<String> loadDictItem(String ids, boolean delNotExist);
  64. }