SysSwitchConfigService.java 2.3 KB

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