| | |
| | | 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; |
| | |
| | | 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) { |