zyy
2025-09-12 2326c31e5457433b323fd6d648dfe561a9a510f8
src/main/java/com/nq/service/impl/UserIndexPositionServiceImpl.java
@@ -10,7 +10,6 @@
import com.nq.common.ServerResponse;
import com.nq.utils.CurrencyUtils;
import com.nq.utils.timeutil.DateTimeUtil;
import com.nq.utils.KeyUtils;
import com.nq.utils.redis.JsonUtil;
import com.nq.utils.stock.BuyAndSellUtils;
import com.nq.vo.agent.AgentIncomeVO;
@@ -53,8 +52,6 @@
    @Resource
    UserMapper userMapper;
    @Resource
    UserCashDetailMapper userCashDetailMapper;
    @Autowired
    IAgentUserService iAgentUserService;
    @Resource
@@ -68,7 +65,7 @@
    @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 {
@@ -85,7 +82,7 @@
     * @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("参数不能为空");
@@ -244,7 +241,7 @@
        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!");