| | |
| | | */
|
| | | @ApiOperation(value = "获取币币交易历史订单信息", notes = "获取币币交易历史订单信息")
|
| | | @ApiResponses({@ApiResponse( code = 200, message = "success", response = OrderWalletCoinDealListVo.class)})
|
| | | @ApiImplicitParams({
|
| | | @ApiImplicitParam(name = "symbol", value = "币种", required = true, dataType = "String", paramType="query")
|
| | | })
|
| | | @GetMapping(value = "/findAllWalletCoinOrder")
|
| | | public Result findAllWalletCoinOrder() {
|
| | | return orderCoinService.findAllWalletCoinOrder();
|
| | | public Result findAllWalletCoinOrder(String symbol) {
|
| | | return orderCoinService.findAllWalletCoinOrder(symbol);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | List<OrderCoinsDealEntity> selectAllWalletCoinOrder(@Param("memberId")Long memberId);
|
| | |
|
| | | List<OrderCoinsDealEntity> selectAllWalletCoinOrderBySymbol(@Param("memberId")Long memberId,@Param("symbol")String symbol);
|
| | | |
| | | OrderCoinsDealEntity selectWalletCoinOrder(@Param("memberId")Long memberId,@Param("orderId")Long orderId);
|
| | |
|
| | | }
|
| | |
| | | @ApiModelProperty(value = "成交金额")
|
| | | private BigDecimal dealAmount;
|
| | | /**
|
| | | * 状态 2:撤单3:已成交
|
| | | */
|
| | | @ApiModelProperty(value = "状态 2:撤单3:已成交")
|
| | | private Integer orderStatus;
|
| | | |
| | | /**
|
| | | * 手续费
|
| | | */
|
| | | @ApiModelProperty(value = "手续费")
|
| | |
| | |
|
| | | public Result cancelEntrustWalletCoinOrder(String orderId);
|
| | |
|
| | | public Result findAllWalletCoinOrder();
|
| | | public Result findAllWalletCoinOrder(String symbol);
|
| | |
|
| | | public Result findWalletCoinOrder(Long orderId);
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public Result findAllWalletCoinOrder() {
|
| | | public Result findAllWalletCoinOrder(String symbol) {
|
| | | //获取用户ID
|
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId();
|
| | |
|
| | | OrderWalletCoinDealListVo orderWalletCoinDealListVo = new OrderWalletCoinDealListVo();
|
| | | List<OrderWalletCoinDealVo> arrayList = new ArrayList<OrderWalletCoinDealVo>();
|
| | |
|
| | | List<OrderCoinsDealEntity> selectAllWalletCoinOrder = orderCoinDealDao.selectAllWalletCoinOrder(memberId);
|
| | | List<OrderCoinsDealEntity> selectAllWalletCoinOrder = orderCoinDealDao.selectAllWalletCoinOrderBySymbol(memberId,symbol);
|
| | | if(CollUtil.isNotEmpty(selectAllWalletCoinOrder)) {
|
| | | for(OrderCoinsDealEntity orderCoinsDealEntity: selectAllWalletCoinOrder) {
|
| | | OrderWalletCoinDealVo entityToVo = OrderWalletCoinDealMapper.INSTANCE.entityToVoOrder(orderCoinsDealEntity);
|
| | |
| | | </where>
|
| | | order by create_time desc
|
| | | </select>
|
| | | <select id="selectAllWalletCoinOrderBySymbol" resultType="com.xcong.excoin.modules.coin.entity.OrderCoinsDealEntity">
|
| | | select * from coins_order_deal |
| | | <where>
|
| | | <if test="memberId != null and memberId != ''">
|
| | | and member_id = #{memberId}
|
| | | </if>
|
| | | <if test="symbol != null and symbol != ''">
|
| | | and symbol = #{symbol}
|
| | | </if>
|
| | | </where>
|
| | | order by create_time desc
|
| | | </select>
|
| | |
|
| | | <select id="selectWalletCoinOrder" resultType="com.xcong.excoin.modules.coin.entity.OrderCoinsDealEntity">
|
| | | select * from coins_order_deal where order_id= #{orderId} and member_id = #{memberId}
|