package com.market.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.market.entity.ContractCoin;
import com.market.mapper.ContractCoinMapper;
import com.market.service.ContractCoinService;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContractCoinServiceImpl extends ServiceImpl<ContractCoinMapper, ContractCoin>
        implements ContractCoinService {

    @Override
    public List<ContractCoin> listEnabled() {
        return list(new LambdaQueryWrapper<ContractCoin>()
                .eq(ContractCoin::getEnable, 1)
                .eq(ContractCoin::getExchangeable, 1));
    }
}
