新版仿ok交易所-后端
1
zyy
2025-09-16 5569a2ded777ba9d6177ab909e69e211456ffb9f
trading-order-service/src/main/java/com/yami/trading/service/item/ItemService.java
@@ -16,15 +16,12 @@
import com.yami.trading.bean.item.domain.Item;
import com.yami.trading.bean.item.dto.ItemDTO;
import com.yami.trading.bean.item.dto.ItemLeverageDTO;
import com.yami.trading.common.exception.YamiShopBindException;
import com.yami.trading.common.util.ApplicationContextUtils;
import com.yami.trading.common.util.MarketOpenChecker;
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.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -44,8 +41,8 @@
@Transactional
@Slf4j
public class ItemService extends ServiceImpl<ItemMapper, Item> {
    public static final String ITEM_CACHE = "itemCache";
    public static final String ALL = "all";
    public static final String ITEM_CACHE = "syItemCache";
    public static final String ALL = "syAll";
    @Autowired
    private ItemLeverageService itemLeverageService;
@@ -255,6 +252,7 @@
     * @return
     */
    public boolean isContractTrading(Item item) {
        item = findBySymbol(item.getUuid());
        //虚拟币新币才判断
        if (item.getType().equals(Item.cryptos) && (item.getCurrencyType() != null && item.getCurrencyType() == 1)) {
            if (item.getTradeType() != null && item.getTradeType().equals("0")) {
@@ -266,12 +264,13 @@
    /**
     * 是否停牌状态
     * @param item
     * @return
     */
    public boolean isSuspended(Item item) {
    public boolean isSuspended(String symbol) {
        Item item = findBySymbol(symbol);
        //虚拟币新币才判断
        if (item.getType().equals(Item.cryptos) && (item.getCurrencyType() != null && item.getCurrencyType() == 1)) {
        if (item.getType().equals(Item.cryptos) /*&& (item.getCurrencyType() != null && item.getCurrencyType() == 1)*/) {
            //item = getById(item.getUuid());
            if (item.getStatus() != null && item.getStatus() == 0) {
                return true;
            }