zj
2026-01-14 3a1977e8cc0c5fffbc6490f220f30116af6cce86
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
72
73
74
package com.nq.service;
 
import com.nq.common.ServerResponse;
import com.nq.enums.EUserAssets;
import com.nq.pojo.Bank;
import com.nq.pojo.UserAssets;
 
import java.math.BigDecimal;
import java.util.List;
 
public interface IUserAssetsServices {
 
 
 
    /**
     * 根据id获取 和 类型 获取 资产
     * @param accetType  资产类型
     * @param userId  用户id
     * */
    UserAssets  assetsByTypeAndUserId(String accetType,Integer userId);
 
    /**
     * 根据id新增所有资产
     * @param userId
     * @return
     */
    void addUserAssetsListByUserId(Integer userId);
 
    ServerResponse updateUserAssets(Integer id, String amt,String type, String accectType);
 
 
    List<UserAssets>  assetsByUserId(Integer userId);
 
 
    /**
     * 根据id获取 和 类型 获取 资产
     * @param accetType  资产类型
     * @param userId  用户id
     * */
    BigDecimal getAvailableBalance(String accetType,Integer userId);
 
 
 
 
    /**
     * @param accetType  资产类型
     * @param userId  用户id
     * @param eUserAssets EUserAssets
     * @param  amount 金额
     * @param  desc   描述
     * @param   descType 购买类型  充值   持仓  平仓   提现
     * */
    Boolean availablebalanceChange(String accetType, Integer userId, EUserAssets eUserAssets, BigDecimal amount, String desc, String descType) throws Exception;
 
    /**
     * ai交易
     * @param accetType
     * @param userId
     * @param eUserAssets
     * @param amount
     * @return
     */
    Boolean aiAvailableBalanceChange(String accetType, Integer userId, EUserAssets eUserAssets, BigDecimal amount) throws Exception;
 
    /**
     * 根据汇率转换
     * @param fromType
     * @param toType
     * @param amount
     * @return
     * @throws Exception
     */
    BigDecimal exchangeAmountByRate(String fromType, String toType, BigDecimal amount) throws Exception;
}