新版仿ok交易所-后端
1
zyy
2025-09-24 a14a6272d61c12164d17eee52c2f01dd82963f4a
trading-order-service/src/main/java/com/yami/trading/service/item/ItemService.java
@@ -41,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;
@@ -158,7 +158,7 @@
        return baseMapper.findList(page, queryWrapper);
    }
    @Cached(name = ITEM_CACHE, key = "'all'", expire = 3600)
    @Cached(name = ITEM_CACHE, key = "'syAll'", expire = 3600)
    @Override
    public List<Item> list() {
        List<Item> list = super.list(new LambdaQueryWrapper<>(Item.class).eq(Item::getType,Item.cryptos));
@@ -252,7 +252,7 @@
     * @return
     */
    public boolean isContractTrading(Item item) {
        item = getById(item.getUuid());
        item = findBySymbol(item.getSymbol());
        //虚拟币新币才判断
        if (item.getType().equals(Item.cryptos) && (item.getCurrencyType() != null && item.getCurrencyType() == 1)) {
            if (item.getTradeType() != null && item.getTradeType().equals("0")) {
@@ -264,15 +264,18 @@
    /**
     * 是否停牌状态
     * @param item
     * @return
     */
    public boolean isSuspended(Item item) {
        item = getById(item.getUuid());
        //虚拟币新币才判断
        if (item.getType().equals(Item.cryptos) && (item.getCurrencyType() != null && item.getCurrencyType() == 1)) {
            if (item.getStatus() != null && item.getStatus() == 0) {
                return true;
    public boolean isSuspended(String symbol) {
        //Item item = findBySymbol(symbol);
        Item item = getOne(new LambdaQueryWrapper<Item>().eq(Item::getSymbol, symbol));
        if (item != null) {
            //虚拟币新币才判断
            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;
                }
            }
        }
        return false;