新版仿ok交易所-后端
1
zj
2025-07-04 a2dc849bc20bffaa4ad45d68e401d3892ace24b3
trading-order-service/src/main/java/com/yami/trading/service/item/ItemService.java
@@ -21,6 +21,7 @@
import com.yami.trading.common.util.StringUtils;
import com.yami.trading.dao.item.ItemMapper;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -48,7 +49,6 @@
    private ItemLeverageService itemLeverageService;
    private Map<String, Integer> symbolDecimal = Maps.newHashMap();
    @Autowired
    private CacheManager cacheManager;
@@ -162,7 +162,7 @@
    @Cached(name = ITEM_CACHE, key = "'all'", expire = 3600)
    @Override
    public List<Item> list() {
        List<Item> list = super.list();
        List<Item> list = super.list(new LambdaQueryWrapper<>(Item.class).eq(Item::getType,Item.cryptos));
        symbolDecimal = list.stream()
                .collect(Collectors.toMap(Item::getSymbol, Item::getDecimals, (s1, s2) -> s2));
        return list;
@@ -203,7 +203,7 @@
    }
    public List<Item> cacheGetAll() {
        return ApplicationContextUtils.getApplicationContext().getBean(ItemService.class).list();
        return ApplicationContextUtils.getApplicationContext().getBean(ItemService.class).list(new LambdaQueryWrapper<>(Item.class).eq(Item::getType,Item.cryptos));
    }