| | |
| | | } |
| | | |
| | | @Override |
| | | public Result getDzCheckList(int pageNum, int pageSize, String state, String stockCode, String stockType) { |
| | | public Result getDzCheckList(int pageNum, int pageSize, String state, String stockCode, String stockType, List<String> checkedList) { |
| | | try { |
| | | Page page = new Page(pageNum, pageSize); |
| | | stockDzMapper.getDzCheckList(page ,state, stockCode, stockType); |
| | | |
| | | stockDzMapper.getDzCheckList(page ,state, stockCode, stockType, checkedList); |
| | | return Result.succeed(page); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | |
| | | |
| | | @Transactional |
| | | @Override |
| | | public Result dzCheck(String id, Integer checkType, Double orderNum) { |
| | | public Result dzCheck(String id, Integer checkType, Double orderNum, double price) { |
| | | try { |
| | | ExchangeApplyOrderDz order = exchangeApplyOrderDzMapper.selectById(id); |
| | | if (order == null) { |
| | |
| | | } |
| | | |
| | | BigDecimal nowPrice = stockDz.getNowPrice(); |
| | | if (price > 0) { |
| | | nowPrice = BigDecimal.valueOf(price); |
| | | order.setPrice(price); |
| | | } |
| | | if (nowPrice.compareTo(new BigDecimal("0")) == 0) { |
| | | throw new YamiShopBindException("股票价格0,请重试"); |
| | | } |
| | |
| | | order.setVolume(buyAmt.doubleValue()); |
| | | order.setFee(orderFree.doubleValue()); |
| | | order.setState(ExchangeApplyOrderDz.STATE_POSITION); |
| | | order.setCreateTime(new Date()); |
| | | exchangeApplyOrderDzMapper.updateById(order); |
| | | walletService.update(wallet.getUserId(), Arith.sub(0, orderAmt.doubleValue())); |
| | | |