package com.cyksj.service.mange;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cyksj.model.entity.Account;
import com.cyksj.model.entity.OrderDon;
import com.cyksj.model.excel.ExcelAccountData;
import com.cyksj.model.manage.views.AccountView;
import com.cyksj.model.request.DelAccountTripsReq;
import com.cyksj.model.views.CmsUserVO;
import com.cyksj.model.views.ExpiredAccountDataView;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;

/**
 * @author chan
 * @date 2022/9/27 6:23 PM
 */
public interface CmsAccountService extends IService<Account> {
	IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startTime, String endTime, String now, Long offset, Long limit);

	List<OrderDon> getNoAppleOneOrderDon(List<Long> skuIds, Date yesZeroDate, Date thisZeroDate, List<String> noOrderStatus);

	List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startDate, String endDate, String toString);

	/**
	 * 获取所有车票已过期的账号
	 */
	List<AccountView> getExpiredAllAccount();

	/**
	 * 保存修改密码记录
	 */
	void saveRecord(Long operateUserId,Long accountId, String oldPassword, String newPassword, String type);

	void recordAutoUpdatePwd(Long accountId, String account, String oldPwd, String newPwd, String operateIp);

	void assignDeleteCustomerAccount(Long customerServiceId);

	void assignCustomerAccount(List<CmsUserVO> customers, List<AccountView> accountViews);

	/**
	 * 解析ChatGPT独立账号
	 */
	void analysisChatGPTAccount(Long goodsId, Long skuId, List<Object> accountList);

	/**
	 * 解析ChatGpt美区APPID账号
	 */
	void analysisAmericaAppidAccount(Long goodsId, Long skuId, List<Object> accountList);

	void readFileAndImportEmail(MultipartFile file) throws Exception;

	void batchImportBlockedAccount(Long goodsId, List<Object> accountBlockedList);

	String nfUpgradeDevice(Long accountId) throws Exception;

	String getAccountEmailCode(Long accountId) throws Exception;

	void batchDeleteAccountTrips(DelAccountTripsReq delAccountTripsReq, long adminId) throws Exception;
}
