Helius
2020-08-19 69e40a4445dd4f73c9b04de52f6a6d04d66127b7
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
package com.xcong.excoin;
 
import com.xcong.excoin.modules.contract.dao.ContractHoldOrderDao;
import com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity;
import com.xcong.excoin.modules.contract.service.RabbitOrderService;
import com.xcong.excoin.modules.member.dao.MemberDao;
import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.utils.CalculateUtil;
import com.xcong.excoin.utils.ThreadPoolUtils;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
 
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
 
/**
 * @author wzy
 * @date 2020-08-14
 **/
@SpringBootTest
public class WholeTest {
 
    @Resource
    private MemberDao memberDao;
    @Autowired
    private ContractHoldOrderDao contractHoldOrderDao;
 
    @Autowired
    private RabbitOrderService rabbitOrderService;
 
    @Test
    public void forceClosePriceTest() {
        MemberEntity memberEntity = memberDao.selectById(5L);
        try {
            CalculateUtil.getForceSetPriceForWhole("BTC/USDT", memberEntity);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
 
    @Test
    public void closingOrderTest() {
        List<Long> ids = new ArrayList<>();
        ids.add(836L);
        rabbitOrderService.cancelHoldOrder(ids);
    }
 
 
}