package com.xhpc.activity.mapper;


import com.xhpc.activity.domain.XhpcAppUserDomain;
import com.xhpc.activity.domain.XhpcCommunityPersonnelDomain;
import com.xhpc.activity.domain.XhpcCustomersPersonnelDomain;
import com.xhpc.activity.domain.XhpcUserAccountStatementDomain;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface XhpcUserMapper {

    // C端用户 ====================
    XhpcAppUserDomain selectAppUserById(@Param("userId") String userId);

    XhpcAppUserDomain selectAppUserByPhone(@Param("phone") String phone);

    List<XhpcAppUserDomain> selectAppUsersById(@Param("userIds") String userIds);

    List<XhpcAppUserDomain> selectAppUsersByPhone(@Param("phones") String phones);

    List<XhpcAppUserDomain> selectAppUsersAll();

    int updateBatchAppUser(@Param("domainList") List<XhpcAppUserDomain> domainList);

    int updateAppUser(@Param("domain") XhpcAppUserDomain domain);


    // 社区用户 ==================
    XhpcCommunityPersonnelDomain selectComUserById(@Param("userId") String userId);

    XhpcCommunityPersonnelDomain selectComUserByAccount(@Param("account") String account);

    List<XhpcCommunityPersonnelDomain> selectComUsersById(@Param("userIds") String userIds);

    List<XhpcCommunityPersonnelDomain> selectComUsersByAccount(@Param("accounts") String accounts);

    List<XhpcCommunityPersonnelDomain> selectComUsersAll();

   int updateBatchComUser(@Param("domainList")  List<XhpcCommunityPersonnelDomain> domainList);

    int updateComUser(@Param("domain") XhpcCommunityPersonnelDomain domain);


    // B端用户 =====================
    XhpcCustomersPersonnelDomain selectCusUserById(@Param("userId") String userId);

    XhpcCustomersPersonnelDomain selectCusUserByAccount(@Param("account") String account);

    List<XhpcCustomersPersonnelDomain> selectCusUsersById(@Param("userIds") String userIds);

    List<XhpcCustomersPersonnelDomain> selectCusUsersByAccount(@Param("accounts") String accounts);

    List<XhpcCustomersPersonnelDomain> selectCusUsersAll();

    int updateBatchCusUser(@Param("domainList")  List<XhpcCustomersPersonnelDomain> domainList);

    int updateCusUser(@Param("domain")XhpcCustomersPersonnelDomain domain);


    // 流水日志 ========================
    int insertStatementBatch(@Param("domainList")List<XhpcUserAccountStatementDomain> domainList);

    int insertStatement(@Param("domain") XhpcUserAccountStatementDomain domain);
}
