|  |  | 
 |  |  |     @ApiResponses({ | 
 |  |  |             @ApiResponse(code = 0, message = "success", response = HoldOrderListVo.class) | 
 |  |  |     }) | 
 |  |  | //    @GetMapping(value = "/findHoldOrderList") | 
 |  |  | //    public Result findHoldOrderList(@ApiParam(name = "symbol", value = "币种", example = "BTC/USDT") @RequestParam(value = "symbol", required = false) String symbol) { | 
 |  |  | //        return contractHoldOrderService.findHoldOrderList(symbol, 1); | 
 |  |  | //    } | 
 |  |  |     @GetMapping(value = "/findHoldOrderList") | 
 |  |  |     public Result findHoldOrderList(@ApiParam(name = "symbol", value = "币种", example = "BTC/USDT") @RequestParam(value = "symbol", required = false) String symbol) { | 
 |  |  |         return contractHoldOrderService.findHoldOrderList(symbol, 1); | 
 |  |  |     public Result findHoldOrderList(@ApiParam(name = "symbol", value = "币种", example = "BTC/USDT") @RequestParam(value = "symbol") String symbol) { | 
 |  |  |         return contractHoldOrderService.findHoldOrderList(symbol, 1); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "查询当前持仓跟单订单列表 -- 轮询") | 
 
 |  |  | 
 |  |  |     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 List<ContractHoldOrderEntity> selectHoldOrderListByMemberIdAndSymbolTest(@Param("memberId") Long memberId, @Param("type") Integer type); | 
 |  |  |  | 
 |  |  |     public ContractHoldOrderEntity selectHoldOrderByMemberIdAndId(@Param("memberId") Long memberId, @Param("id") Long id); | 
 |  |  |  | 
 
 |  |  | 
 |  |  |     public Result findHoldOrderList(String symbol, int type) { | 
 |  |  |         MemberEntity memberEntity = LoginUserUtils.getAppLoginUser(); | 
 |  |  |  | 
 |  |  |         List<ContractHoldOrderEntity> list = contractHoldOrderDao.selectHoldOrderListByMemberIdAndSymbol(memberEntity.getId(), symbol, type); | 
 |  |  | //        List<ContractHoldOrderEntity> list = contractHoldOrderDao.selectHoldOrderListByMemberIdAndSymbol(memberEntity.getId(), symbol, type); | 
 |  |  |         List<ContractHoldOrderEntity> list = contractHoldOrderDao.selectHoldOrderListByMemberIdAndSymbolTest(memberEntity.getId(),type); | 
 |  |  |         MemberWalletContractEntity walletContractEntity = memberWalletContractDao.findWalletContractByMemberIdAndSymbol(memberEntity.getId(), CoinTypeEnum.USDT.name()); | 
 |  |  |         if (CollUtil.isNotEmpty(list)) { | 
 |  |  |             BigDecimal totalProfitOrLoss = BigDecimal.ZERO; | 
 
 |  |  | 
 |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
 |  |  | <mapper namespace="com.xcong.excoin.modules.contract.dao.ContractHoldOrderDao"> | 
 |  |  |  | 
 |  |  |     <select id="selectHoldOrderListByMemberIdAndSymbolTest" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> | 
 |  |  |         select * from contract_hold_order where member_id=#{memberId} | 
 |  |  |         <if test="type!=null and type!=0"> | 
 |  |  |             and contract_type=#{type} | 
 |  |  |         </if> | 
 |  |  |         and is_can_closing=1 | 
 |  |  |         order by create_time desc | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <update id="updateContractHoldOrderCanNotClosingByIds" parameterType="map"> | 
 |  |  |         UPDATE contract_hold_order set is_can_closing = 0,batch_no=#{batchNo} | 
 |  |  |         where is_can_closing=1 |