| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package com.ydtech.modules.admin.service;
- import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
- import com.baomidou.mybatisplus.extension.service.IService;
- import com.ydtech.exception.SystemException;
- import com.ydtech.modules.admin.model.po.SysWechatCustomer;
- import com.ydtech.modules.admin.model.po.SysWechatCustomerDuty;
- import com.ydtech.modules.admin.model.vo.wechat.SysWechatCustomerDutyRulesVo;
- import java.util.List;
- /**
- * @author Administrator
- * @description 针对表【sys_wechat_customer_duty(微信客服值班时间)】的数据库操作Service
- * @createDate 2025-04-17 10:14:27
- */
- public interface SysWechatCustomerDutyService extends IService<SysWechatCustomerDuty> {
- /**
- * 清除值班配置
- *
- * @param customerId 客服id
- */
- default void clearCustomerDuty(String customerId) {
- LambdaUpdateWrapper<SysWechatCustomerDuty> wr = new LambdaUpdateWrapper<SysWechatCustomerDuty>()
- .eq(SysWechatCustomerDuty::getCustomerId, customerId);
- remove(wr);
- }
- default List<SysWechatCustomerDuty> getByCustomerId(String customerId){
- LambdaUpdateWrapper<SysWechatCustomerDuty> wr = new LambdaUpdateWrapper<SysWechatCustomerDuty>()
- .eq(SysWechatCustomerDuty::getCustomerId, customerId);
- return list(wr);
- }
- default void isDutyCustomerId(Long customerId) {
- List<SysWechatCustomerDuty> list = lambdaQuery().eq(SysWechatCustomerDuty::getDutyCustomerId, customerId).list();
- if (!list.isEmpty()) {
- throw new SystemException("此客服还在值班客服中配置,请删除后重试");
- }
- }
- }
|