|  |  | 
 |  |  |     Integer selectFollowOrderCntForWinRate(@Param("memberId") Long memberId, @Param("type") Integer type); | 
 |  |  |  | 
 |  |  |     List<ContractOrderEntity> selectWholeOpenOrderByOrderNo(@Param("orderNo") String orderNo); | 
 |  |  |  | 
 |  |  |     BigDecimal selectWholeFeeAmountByOrderNo(@Param("orderNo") String orderNo); | 
 |  |  | } | 
 
 |  |  | 
 |  |  |             BigDecimal fee = BigDecimal.ZERO; | 
 |  |  |  | 
 |  |  |             if (holdOrderEntity.getSymbolCntSale() != 0) { | 
 |  |  |                 fee = holdOrderEntity.getOpeningFeeAmount().divide(BigDecimal.valueOf(holdOrderEntity.getSymbolCnt()), 8, BigDecimal.ROUND_DOWN).multiply(BigDecimal.valueOf(closeCnt)); | 
 |  |  |                 BigDecimal totalFeeAmount = contractOrderDao.selectWholeFeeAmountByOrderNo(holdOrderEntity.getOrderNo()); | 
 |  |  |                 fee = totalFeeAmount.divide(BigDecimal.valueOf(holdOrderEntity.getSymbolCnt()), 8, BigDecimal.ROUND_DOWN).multiply(BigDecimal.valueOf(closeCnt)); | 
 |  |  |             } else { | 
 |  |  |                 fee = holdOrderEntity.getOpeningFeeAmount(); | 
 |  |  |             } | 
 
 |  |  | 
 |  |  |         where order_no=#{orderNo} | 
 |  |  |         and order_type in (1,2) and order_status=1 | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectWholeFeeAmountByOrderNo" resultType="java.math.BigDecimal"> | 
 |  |  |         select sum(opening_fee_amount) | 
 |  |  |         from contract_order | 
 |  |  |         where order_no=#{orderNo} | 
 |  |  |         and order_type in (1,2) and order_status=1 | 
 |  |  |     </select> | 
 |  |  | </mapper> |