zyy
2025-07-16 37c4b8d314a93ac866a7886b262346ff8810dc3e
src/main/java/com/nq/service/impl/StockAiServiceImpl.java
@@ -4,6 +4,7 @@
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.nq.Repository.ExchangeRateRepository;
import com.nq.common.ResponseCode;
import com.nq.common.ServerResponse;
import com.nq.dao.StockAiMapper;
import com.nq.dao.StockAiOrderMapper;
@@ -44,8 +45,6 @@
    IUserService iUserService;
    @Autowired
    IUserAssetsServices iUserAssetsServices;
    @Autowired
    ExchangeRateRepository exchangeRateRepository;
    /**
     * 获取上架ai产品
@@ -80,7 +79,7 @@
        try {
            User user = iUserService.getCurrentUser(request);
            if (user == null ){
                return ServerResponse.createByErrorCodeMsg(401,"请先登录");
                return ServerResponse.createByErrorCodeMsg(ResponseCode.NEED_LOGIN.getCode(),"请先登录");
            }
            Object lock = locks.computeIfAbsent(Long.valueOf(user.getId()), k -> new Object());
            synchronized (lock){
@@ -160,7 +159,7 @@
        try {
            User user = iUserService.getCurrentUser(request);
            if (user == null ){
                return ServerResponse.createByErrorCodeMsg(401,"请先登录");
                return ServerResponse.createByErrorCodeMsg(ResponseCode.NEED_LOGIN.getCode(),"请先登录");
            }
            PageHelper.startPage(pageNum, pageSize);
            List<StockAiOrderTypeVO> stockAIOrders = stockAiOrderMapper.getStockAiOrderList(user.getId(), status);
@@ -183,15 +182,13 @@
            if (!pageInfo.getList().isEmpty()) {
                List<StockAiVO> newStockAiList = pageInfo.getList();
                newStockAiList.forEach(stockAiVO -> {
                pageInfo.getList().forEach(stockAiVO -> {
                    EStockType eStockType = EStockType.getEStockTypeByCode(stockAiVO.getStockType());
                    stockAiVO.setStockTypeName(eStockType.getSymbol1());
                    stockAiVO.setSymbol(stockType);
                });
                pageInfo.setList(newStockAiList);
            }
            return ServerResponse.createBySuccess(pageInfo);
        } catch (Exception ex) {
            log.error("StockAiService getAdminStockAiList error", ex);