package com.xhpc.card.mapper;

import com.xhpc.card.domain.SearchCardUserQueryCondition;
import com.xhpc.card.pojo.XhpcCommunityPersonnel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface XhpcCommunityPersonnelMapper {

    int deleteByPrimaryKey(Long communityPersonnelId);

    int insert(XhpcCommunityPersonnel record);

    int insertSelective(XhpcCommunityPersonnel record);

    XhpcCommunityPersonnel selectByPrimaryKey(Long communityPersonnelId);

    int updateByPrimaryKeySelective(XhpcCommunityPersonnel record);

    int updateByPrimaryKey(XhpcCommunityPersonnel record);

    /**
     * 查询所有记录
     *
     * @author WH
     * @date 2022/1/28 15:38
     * @since version-1.0
     */
    List<XhpcCommunityPersonnel> selectAll();

    /**
     * 根据分页条件，查询该表记录
     *
     * @author WH
     * @date 2022/2/8 10:44
     * @since version-1.0
     */
    List<XhpcCommunityPersonnel> selectByCondition(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> userIdList);

    /**
     * 根据分页条件，查询出符合条件记录的总条数
     *
     * @author WH
     * @date 2022/2/8 10:51
     * @since version-1.0
     */
    Long selectCount(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> usrIdList);

    /**
     * 根据运营商id、分页条件、查询符合的记录
     *
     * @param operatorId 运营商id
     * @return 符合条件的所有记录
     */
    List<XhpcCommunityPersonnel> selectByOperatorId(@Param("operatorId") Long operatorId, @Param("currentPage") Long currentPage, @Param("items") Long items, @Param("userIdList") List<Integer> userIdList);

    /**
     * 根据运营商id、分页条件、查询符合的记录的个数
     *
     * @param operatorId 运营商id
     * @return 符合条件个数
     */
    Long selectCountByOperatorId(@Param("operatorId") Long operatorId, @Param("userIdList") List<Integer> userIdList);

    /**
     * query record by userAccount
     *
     * @author WH
     * @date 2022/2/15 17:10
     * @since version-1.0
     */
    XhpcCommunityPersonnel selectByAccount(String userAccount);

}