52 lines
1.1 KiB
Java
52 lines
1.1 KiB
Java
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<Customer> selectByNameLike(@Param("name") String name);
|
|
|
|
/**
|
|
* 分页查询客户
|
|
*/
|
|
List<Customer> 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);
|
|
}
|