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 { /** * 清除值班配置 * * @param customerId 客服id */ default void clearCustomerDuty(String customerId) { LambdaUpdateWrapper wr = new LambdaUpdateWrapper() .eq(SysWechatCustomerDuty::getCustomerId, customerId); remove(wr); } default List getByCustomerId(String customerId){ LambdaUpdateWrapper wr = new LambdaUpdateWrapper() .eq(SysWechatCustomerDuty::getCustomerId, customerId); return list(wr); } default void isDutyCustomerId(Long customerId) { List list = lambdaQuery().eq(SysWechatCustomerDuty::getDutyCustomerId, customerId).list(); if (!list.isEmpty()) { throw new SystemException("此客服还在值班客服中配置,请删除后重试"); } } }