package com.cool.store.dao;

import com.cool.store.entity.EnumInfoDO;
import com.cool.store.mapper.EnumInfoDOMapper;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: WangShuo
 * @Date: 2025/04/08/15:22
 * @Version 1.0
 * @注释:
 */
@Repository
public class EnumInfoDAO {
    @Resource
    private EnumInfoDOMapper enumInfoDOMapper;

    public List<EnumInfoDO> getByTypeCode(String typeCode) {
        Example example = new Example(EnumInfoDO.class);
        example.createCriteria().andEqualTo("typeCode", typeCode).andEqualTo("deleted", 0);
        return enumInfoDOMapper.selectByExample(example);
    }
}
