zyy
2025-07-15 8c0ab1b0ecd90a4b03200485ff33f6194a4b1e07
src/main/java/com/nq/service/impl/UserStockSubscribeServiceImpl.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.nq.common.ResponseCode;
import com.nq.common.ServerResponse;
import com.nq.dao.StockSubscribeMapper;
import com.nq.dao.UserAssetsMapper;
@@ -17,11 +18,8 @@
import com.nq.utils.timeutil.DateTimeUtil;
import com.nq.utils.KeyUtils;
import com.nq.utils.PropertiesUtil;
import com.nq.utils.redis.JsonUtil;
import com.nq.utils.redis.RedisShardedPoolUtils;
import com.nq.utils.stock.BuyAndSellUtils;
import com.nq.vo.stock.UserStockSubscribeAddIn;
import com.sun.org.apache.bcel.internal.generic.RETURN;
import com.nq.vo.subscribe.UserStockSubscribeVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -457,28 +455,16 @@
        String header = request.getHeader(property);
        if (header != null) {
             User user = iUserService.getCurrentRefreshUser(request);
            List<UserStockSubscribe> userStockSubscribe = null;
            QueryWrapper<UserStockSubscribe> queryWrapper = new QueryWrapper();
            queryWrapper.eq("user_id", user.getId());
            if (type != null && !type.isEmpty()){
                queryWrapper.eq("type", type);
            }
            if (status != null){
                queryWrapper.eq("status", status);
            }
            queryWrapper.orderByDesc("add_time");
            userStockSubscribe = this.userStockSubscribeMapper.selectList(queryWrapper);
            List<UserStockSubscribeVo> userStockSubscribe = this.userStockSubscribeMapper.getListByParam(user.getId(), type, status);
            /*if (type==null||type.equals("")){
                userStockSubscribe = this.userStockSubscribeMapper.selectList(new QueryWrapper<>(new UserStockSubscribe()).eq("user_id", user.getId()).orderByDesc("add_time"));
            }else{
                userStockSubscribe = this.userStockSubscribeMapper.selectList(new QueryWrapper<>(new UserStockSubscribe()).eq("user_id", user.getId()).eq("type", type).orderByDesc("add_time"));
            }*/
            List<UserStockSubscribe> list = new ArrayList<>();
            for (UserStockSubscribe userStockSubscribe1 : userStockSubscribe) {
            List<UserStockSubscribeVo> list = new ArrayList<>();
            for (UserStockSubscribeVo userStockSubscribe1 : userStockSubscribe) {
                StockSubscribe stockSubscribe = stockSubscribeMapper.selectOne(new QueryWrapper<>(new StockSubscribe())
                        .eq("newlist_id", userStockSubscribe1.getNewStockId()));
                if (stockSubscribe != null) {
@@ -487,7 +473,7 @@
            }
            return ServerResponse.createBySuccess(list);
        }
        return ServerResponse.createByErrorCodeMsg(401,"请先登录");
        return ServerResponse.createByErrorCodeMsg(ResponseCode.NEED_LOGIN.getCode(),"请先登录");
    }
    /**
     * 新股申购-用户提交金额
@@ -531,7 +517,7 @@
                return ServerResponse.createByErrorMsg("新股认购订单不存在!",request);
            }
        }
        return ServerResponse.createByErrorCodeMsg(401,"请先登录");
        return ServerResponse.createByErrorCodeMsg(ResponseCode.NEED_LOGIN.getCode(),"请先登录");
    }
    /**
     * 新股申购-删除