package com.bycrm.mapper; import com.bycrm.entity.Customer; import com.bycrm.dto.PageQuery; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * 客户 Mapper */ @Mapper public interface CustomerMapper { /** * 根据ID查询客户 */ Customer selectById(@Param("id") Long id); /** * 根据名称模糊查询客户(用于客户唯一性校验) */ List selectByNameLike(@Param("name") String name); /** * 分页查询客户 */ List selectPage(@Param("query") PageQuery query, @Param("name") String name, @Param("industry") String industry, @Param("status") Integer status); /** * 查询客户总数 */ Long countPage(@Param("name") String name, @Param("industry") String industry, @Param("status") Integer status); /** * 插入客户 */ int insert(Customer customer); /** * 更新客户 */ int update(Customer customer); /** * 删除客户 */ int deleteById(@Param("id") Long id); }