|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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 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); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|