package com.xxfc.platform.vehicle.mapper;

import com.xxfc.platform.vehicle.entity.Constant;
import org.springframework.data.repository.query.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface ConstantMapper extends Mapper<Constant> {

   public List<Integer> getAllConstantTypes();

    public int updateByTypeAndCode(Constant constant);


    public int delByTypeAndCode(Constant constant);

    /**
     * 插入重复时则忽略
     * @param constant
     * @return
     */
    public int insertIgnoreOnDuplicate(Constant constant);

    //获取code
    public Integer getTypebyname(@Param("name") String name, @Param("type") Integer type);
}
