| | |
| | | import com.nq.pojo.*; |
| | | import com.nq.service.*; |
| | | import com.nq.utils.timeutil.DateTimeUtil; |
| | | import com.nq.utils.KeyUtils; |
| | | import com.nq.utils.stock.BuyAndSellUtils; |
| | | import com.nq.utils.stock.GeneratePosition; |
| | | import com.nq.utils.stock.sina.StockApi; |
| | | import com.nq.vo.position.PositionProfitVO; |
| | | import com.nq.vo.position.UserPositionVO; |
| | | import com.nq.vo.stock.StockListVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | IUserService iUserService; |
| | | @Autowired |
| | | ISiteSettingService iSiteSettingService; |
| | | @Autowired |
| | | IStockService iStockService; |
| | | @Autowired |
| | | ISiteSpreadService iSiteSpreadService; |
| | | @Autowired |
| | | IAgentAgencyFeeService iAgentAgencyFeeService; |
| | | |
| | | |
| | | @Override |
| | | public ServerResponse insert(UserFundsPosition model, HttpServletRequest request) { |
| | |
| | | /** |
| | | * 分仓交易-入仓 |
| | | */ |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServerResponse buyFunds(Integer stockId, Integer buyNum, Integer buyType, Integer lever, Integer subaccountNumber, HttpServletRequest request) throws Exception { |
| | | return ServerResponse.createBySuccess("Order successful"); |
| | | } |
| | |
| | | /* |
| | | * 分仓交易-用户平仓操作 |
| | | * */ |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServerResponse sellFunds(String positionSn, int doType) throws Exception { |
| | | log.info("【用户交易平仓】 positionSn = {} , dotype = {}", positionSn, Integer.valueOf(doType)); |
| | | |