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
| package com.xmzs.system.service;
|
| import com.xmzs.system.domain.bo.ChatMessageBo;
|
| public interface IChatCostService {
|
| /**
| * 根据消耗的tokens扣除余额
| *
| * @param chatMessageBo
| * @return 结果
| */
|
| void deductToken(ChatMessageBo chatMessageBo);
|
| /**
| * 扣除用户的余额
| *
| */
| void deductUserBalance(Long userId, Double numberCost);
|
|
| /**
| * 扣除任务费用并且保存记录
| *
| * @param type 任务类型
| * @param prompt 任务描述
| * @param cost 扣除费用
| */
| void taskDeduct(String type,String prompt, double cost);
|
|
| /**
| * 判断用户是否付费
| */
| void checkUserGrade();
| }
|
|