| | |
| | | @Autowired |
| | | CurrencyUtils currencyUtils; |
| | | |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServerResponse buyIndex(Integer indexId, Integer buyNum, Integer buyType, Integer lever,BigDecimal profitTarget,BigDecimal stopTarget, HttpServletRequest request) throws Exception { |
| | | |
| | | |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServerResponse buyIndexOrder(Integer indexId, Integer buyNum, Integer buyType, Integer lever,BigDecimal profitTarget,BigDecimal stopTarget,Integer userId) throws Exception { |
| | | if (indexId == null || buyNum == null || buyType == null) { |
| | | return ServerResponse.createByErrorMsg("参数不能为空"); |
| | |
| | | return ServerResponse.createByErrorMsg("删除失败"); |
| | | } |
| | | |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServerResponse sellIndex(String positionSn, int doType) throws Exception { |
| | | log.info("【用户交易平仓指数】 positionSn = {} , dotype = {}", positionSn, Integer.valueOf(doType)); |
| | | return ServerResponse.createBySuccessMsg("Closed position successfully!"); |