Helius
2020-08-29 5677479567a47c14ee091770170e4c7e01bbf31c
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
package com.xcong.excoin.modules.contract.dao;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity;
import com.xcong.excoin.rabbit.pricequeue.OrderModel;
import org.apache.ibatis.annotations.Param;
import org.web3j.abi.datatypes.Int;
 
import java.util.HashMap;
import java.util.List;
 
/**
 * @author helius
 */
public interface ContractHoldOrderDao extends BaseMapper<ContractHoldOrderEntity> {
    /**
     * 根据ids更新所有订单的平仓状态
     *
     * @param list
     * @return
     */
    int updateContractHoldOrderCanNotClosingByIds(@Param("list") List<OrderModel> list, @Param("batchNo") String batchNo);
 
    /**
     * 根据批次号查询次仓订单
     *
     * @param batchNo
     * @return
     */
    List<ContractHoldOrderEntity> selectContractHoldOrderByBatchNo(@Param("batchNo") String batchNo);
 
    /**
     * 更新该订单为可平仓状态
     *
     * @param id
     */
    public void updateOrderIsCanClosingAndBatchNoById(@Param("id") Long id);
 
    public List<ContractHoldOrderEntity> selectHoldOrderListByMemberId(@Param("memberId") Long memberId);
 
    public List<ContractHoldOrderEntity> selectHoldOrderListByMemberIdAndSymbol(@Param("memberId") Long memberId, @Param("symbol") String symbol, @Param("type") Integer type);
 
    public ContractHoldOrderEntity selectHoldOrderByMemberIdAndId(@Param("memberId") Long memberId, @Param("id") Long id);
 
    public int updateHoldOrderIsCanClosingById(@Param("isCanClosing") int isCanClosing, @Param("id") Long id);
 
    public List<ContractHoldOrderEntity> selectAllHoldOrder();
 
    public List<ContractHoldOrderEntity> selectMemberHoldOrderByPositionType(@Param("positionType") Integer positionType, @Param("memberId") Long memberId);
 
    public ContractHoldOrderEntity selectWholeHoldOrderByOrderType(@Param("memberId") Long memberId, @Param("orderType") Integer orderType, @Param("symbol") String symbol);
 
    public List<ContractHoldOrderEntity> selectHoldOrderListForWholeByMemberIdAndSymbol(@Param("memberId") Long memberId, @Param("symbol") String symbol);
 
    public List<HashMap<String, Object>> selectAllWholeOrderMemberIdAndSymbol();
 
}