package com.xhpc.card.mapper;

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

import java.util.List;

public interface XhpcAppUserMapper {

    int deleteByPrimaryKey(Long appUserId);

    int insert(XhpcAppUser record);

    int insertSelective(XhpcAppUser record);

    XhpcAppUser selectByPrimaryKey(Long appUserId);

    int updateByPrimaryKeySelective(XhpcAppUser record);

    int updateByPrimaryKey(XhpcAppUser record);

    /**
     * 查询记录总数
     *
     * @author WH
     * @date 2022/1/28 16:30
     * @since version-1.0
     */
    Long selectCount(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> userIdList);

    /**
     * 根据条件查询记录
     *
     * @author WH
     * @date 2022/1/28 16:29
     * @since version-1.0
     */
    List<XhpcAppUser> selectByCondition(@Param("queryCondition") SearchCardUserQueryCondition queryCondition, @Param("userIdList") List<Integer> userIdList);

    /**
     * 根据手机号查找C端用户充值记录
     *
     * @author WH
     * @date 2022/2/14 17:14
     * @since version-1.0
     */
    XhpcAppUser selectByPhone(String userAccount);


    /**
     * query user total count by according one or multiple tenant id
     *
     * @param tenantIdList 租户集合
     * @return 租户数量
     * @author WH
     * @date 2022/3/4 10:37
     * @since version-1.0
     */
    Long selectTotalCountByTenantIdAndCurrentTime(@Param("tenantIdsStr") String tenantIdsStr, @Param("currentTime") String currentTime);


}