IDictBizService.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /**
  2. * BladeX Commercial License Agreement
  3. * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
  4. * <p>
  5. * Use of this software is governed by the Commercial License Agreement
  6. * obtained after purchasing a license from BladeX.
  7. * <p>
  8. * 1. This software is for development use only under a valid license
  9. * from BladeX.
  10. * <p>
  11. * 2. Redistribution of this software's source code to any third party
  12. * without a commercial license is strictly prohibited.
  13. * <p>
  14. * 3. Licensees may copyright their own code but cannot use segments
  15. * from this software for such purposes. Copyright of this software
  16. * remains with BladeX.
  17. * <p>
  18. * Using this software signifies agreement to this License, and the software
  19. * must not be used for illegal purposes.
  20. * <p>
  21. * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
  22. * not liable for any claims arising from secondary or illegal development.
  23. * <p>
  24. * Author: Chill Zhuang (bladejava@qq.com)
  25. */
  26. package org.springblade.modules.system.service;
  27. import com.baomidou.mybatisplus.core.metadata.IPage;
  28. import com.baomidou.mybatisplus.extension.service.IService;
  29. import org.springblade.core.mp.support.Query;
  30. import org.springblade.modules.system.pojo.dto.DictBizDTO;
  31. import org.springblade.modules.system.pojo.entity.DictBiz;
  32. import org.springblade.modules.system.pojo.vo.DictBizVO;
  33. import java.util.List;
  34. import java.util.Map;
  35. /**
  36. * 服务类
  37. *
  38. * @author Chill
  39. */
  40. public interface IDictBizService extends IService<DictBiz> {
  41. /**
  42. * 树形结构
  43. *
  44. * @return
  45. */
  46. List<DictBizVO> tree();
  47. /**
  48. * 树形结构
  49. *
  50. * @return
  51. */
  52. List<DictBizVO> parentTree();
  53. /**
  54. * 获取字典表对应中文
  55. *
  56. * @param code 字典编号
  57. * @param dictKey 字典序号
  58. * @return
  59. */
  60. String getValue(String code, String dictKey);
  61. /**
  62. * 获取字典表
  63. *
  64. * @param code 字典编号
  65. * @return
  66. */
  67. List<DictBiz> getList(String code);
  68. /**
  69. * 获取字典表
  70. *
  71. * @param code 字典编号
  72. * @return
  73. */
  74. List<DictBiz> getList(String code,Integer type);
  75. /**
  76. * 新增或修改
  77. *
  78. * @param dict
  79. * @return
  80. */
  81. boolean submit(DictBiz dict);
  82. /**
  83. * 新增或修改
  84. *
  85. * @param dict
  86. * @return
  87. */
  88. boolean submit(List<DictBiz> dict);
  89. /**
  90. * 删除字典
  91. *
  92. * @param ids
  93. * @return
  94. */
  95. boolean removeDict(String ids);
  96. /**
  97. * 顶级列表
  98. *
  99. * @param dict
  100. * @param query
  101. * @return
  102. */
  103. IPage<DictBizVO> parentList(Map<String, Object> dict, Query query);
  104. /**
  105. * 子列表
  106. *
  107. * @param dict
  108. * @param parentId
  109. * @return
  110. */
  111. List<DictBizVO> childList(Map<String, Object> dict, Long parentId);
  112. void saveDict(DictBizDTO dto);
  113. }