package com.ai.da.mapper.primary;

import com.ai.da.common.config.mybatis.plus.CommonMapper;
import com.ai.da.mapper.primary.entity.Account;
import com.ai.da.model.dto.AccountCreditsUsageDTO;

import java.util.List;

/**
 * Mapper 接口
 *
 * @author easy-generator
 * @since 2022-06-13
 */
public interface AccountMapper extends CommonMapper<Account> {

    /**
     * 手机号批量查询
     *
     * @param phoneList
     * @return
     */
    List<Account> findByPhoneList(List<String> phoneList);

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
//    Account findById(String id);

    void toVisitor(Long id);

    List<AccountCreditsUsageDTO> selectCreditUsage(boolean groupByEvent, String changeEvent, String role,
                                                   String userEmail, Long id, String startTime, String endTime,
                                                   Integer size, Integer offset, String organizationName);

    int countCreditUsage(boolean groupByEvent, String changeEvent, String role, String userEmail, Long id, String startTime, String endTime, String organizationName);

}
