SysSwitchConfigService.java 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package com.ydtech.modules.admin.service;
  2. import com.baomidou.mybatisplus.extension.service.IService;
  3. import com.ydtech.modules.admin.model.po.SysSwitchConfig;
  4. import com.ydtech.modules.admin.model.vo.SysSwitchConfigQueryVo;
  5. import com.ydtech.modules.admin.model.vo.SysSwitchConfigVo;
  6. import com.ydtech.modules.order.entity.BasePageResult;
  7. import com.ydtech.modules.protocol.utils.AssertionUtils;
  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 IService<SysSwitchConfig> {
  15. /**
  16. * 判断开关是否开启的
  17. *
  18. * @param id id
  19. * @return 系统开关配置
  20. */
  21. default SysSwitchConfig getByIdExists(String id) {
  22. SysSwitchConfig sysSwitchConfig = getById(id);
  23. AssertionUtils.isEmpty(sysSwitchConfig, "未查询到你所配置的开关");
  24. return sysSwitchConfig;
  25. }
  26. /**
  27. * 获取 代理人、渠道 代客录单费用是否开启
  28. *
  29. * @param deptId 机构id
  30. * @return 功能是够开启
  31. */
  32. BigDecimal getEnterProportion(String deptId, Integer entryStatus);
  33. /**
  34. * 添加开关信息
  35. *
  36. * @param sysSwitchConfigVo
  37. */
  38. void add(SysSwitchConfigVo sysSwitchConfigVo);
  39. /**
  40. * 修改
  41. *
  42. * @param id 开关表 id
  43. * @param sysSwitchConfigVo 开关信息
  44. */
  45. void revise(String id, SysSwitchConfigVo sysSwitchConfigVo);
  46. /**
  47. * 分页查询开关配置
  48. *
  49. * @param sysSwitchConfigQueryVo 开关配置
  50. * @return
  51. */
  52. BasePageResult<SysSwitchConfig> queryPage(SysSwitchConfigQueryVo sysSwitchConfigQueryVo);
  53. }