SysSwitchConfigService.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. package com.ydtech.modules.admin.service;
  2. import com.ydtech.extension.BaseIService;
  3. import com.ydtech.modules.admin.model.dto.FeeLookSwitchesDTO;
  4. import com.ydtech.modules.admin.model.po.SysSwitchConfig;
  5. import com.ydtech.modules.admin.model.vo.SysSwitchConfigQueryVo;
  6. import com.ydtech.modules.admin.model.vo.SysSwitchConfigVo;
  7. import com.ydtech.modules.order.entity.BasePageResult;
  8. import java.math.BigDecimal;
  9. /**
  10. * @author Administrator
  11. * @description 针对表【sys_switch_config(系统开关配置表)】的数据库操作Service
  12. * @createDate 2024-08-07 18:04:47
  13. */
  14. public interface SysSwitchConfigService extends BaseIService<SysSwitchConfig> {
  15. /**
  16. * 获取 代理人、渠道 代客录单费用是否开启
  17. *
  18. * @param deptId 机构id
  19. * @return 功能是够开启
  20. */
  21. BigDecimal getEnterProportion(String deptId, Integer entryStatus);
  22. /**
  23. * 添加开关信息
  24. *
  25. * @param sysSwitchConfigVo
  26. */
  27. void add(SysSwitchConfigVo sysSwitchConfigVo);
  28. /**
  29. * 修改
  30. *
  31. * @param id 开关表 id
  32. * @param sysSwitchConfigVo 开关信息
  33. */
  34. void revise(String id, SysSwitchConfigVo sysSwitchConfigVo);
  35. /**
  36. * 分页查询开关配置
  37. *
  38. * @param sysSwitchConfigQueryVo 开关配置
  39. * @return
  40. */
  41. BasePageResult<SysSwitchConfig> queryPage(SysSwitchConfigQueryVo sysSwitchConfigQueryVo);
  42. /**
  43. * 是否开启
  44. *
  45. * @param keyWord 键值
  46. * @return true 开启 false 关闭
  47. */
  48. default boolean isEnabled(String keyWord) {
  49. SysSwitchConfig one = lambdaQuery().eq(SysSwitchConfig::getKeyword, keyWord).one();
  50. if (one == null) return false;
  51. return 1 == one.getEnabled();
  52. }
  53. /**
  54. * 费用查看开关
  55. *
  56. * @return 是否开启
  57. */
  58. FeeLookSwitchesDTO feeLookSwitches();
  59. /**
  60. * 二维码是否显示
  61. *
  62. * @return 是否开启
  63. */
  64. boolean weComQRCodeDisplay();
  65. /**
  66. * 机构 掌柜币查看
  67. *
  68. * @return
  69. */
  70. boolean feeDisplaySwitches();
  71. /**
  72. * @version
  73. * @author: hxl
  74. * @Date: 2024/9/26 15:09
  75. * @Description: 电销组员开关
  76. */
  77. boolean dxtxDisplaySwitches();
  78. /**
  79. * @version
  80. * @author: hxl
  81. * @Date: 2024/10/25 11:43
  82. * @Description: 协议授权开关
  83. */
  84. boolean xysqDisplaySwitches();
  85. /**
  86. * @version
  87. * @author: hxl
  88. * @Date: 2024/10/25 11:43
  89. * @Description: 余额提现走线上或者线下
  90. */
  91. boolean getBalanceExtractStatus();
  92. }