AccountService.java
1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package cn.fw.freya.service.data;
import cn.fw.freya.enums.AccountTypeEnum;
import cn.fw.freya.model.data.Account;
import java.util.List;
/**
* @author kurisu
* @date 2021-11-24 09:16
* @description 账号service
*/
public interface AccountService {
/**
* 根据类型删除账号
*
* @param type
*/
void removeByType(AccountTypeEnum type);
/**
* 删除所有账号
*/
void removeAll();
/**
* 批量保存
*
* @param list
*/
void saveAll(List<Account> list);
/**
* 查询任意未使用的账号
*
* @return
*/
List<Account> findAnyAccount();
/**
* 根据id查找账号
*
* @param id
* @return
*/
Account findById(Long id);
/**
* 保存修改
*
* @param account
*/
void saveOrUpdate(Account account);
/**
* 更新账户cookies状态
*
* @param accountNo
* @param type
* @param cookiesStatus
*/
void updateAccountCookiesStatus(String accountNo, Integer type, boolean cookiesStatus);
/**
* 设置账户为未完成状态
*
* @param accountNo
*/
void setAccountUndone(String accountNo);
}