| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | if (applyNewSharesOrderService.subscribe(order)) { |
| | | order.setSubscribedCount(1); |
| | | order.setUserPromiseCount(1); |
| | | order.setSubscribedAmount(order.getRequiredNumber()); |
| | | //order.setSubscribedAmount(order.getRequiredNumber()); |
| | | } |
| | | } |
| | | order.setStatus(model.getStatus()); |
| | |
| | | applyNewSharesOrderService.updateBatchById(list); |
| | | return Result.succeed(); |
| | | } |
| | | |
| | | @ApiOperation(value = "解锁") |
| | | @PostMapping("unLock") |
| | | public Result unLock(String orderNo){ |
| | | if (StringUtils.isEmpty(orderNo)){ |
| | | throw new BusinessException("请选择申购订单记录"); |
| | | } |
| | | System.out.println(orderNo); |
| | | ApplyNewSharesOrder order= applyNewSharesOrderService.findByOrderNo(orderNo); |
| | | if (order == null){ |
| | | throw new BusinessException("未查到订单"); |
| | | } |
| | | order.setUnLock(1); |
| | | applyNewSharesOrderService.updateById(order); |
| | | return Result.succeed(); |
| | | } |
| | | } |