package com.sa.ibiz.demo.demo.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Map;
import org.apache.ibatis.annotations.Select;
import com.sa.ibiz.demo.demo.domain.UserDict;
import com.sa.ibiz.demo.demo.service.dto.UserDictSearchFilter;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
public interface UserDictMapper extends BaseMapper<UserDict>{
    @CacheEvict( value="entity",key = "'UserDict:'+#p0.userdictid")
    void updateOne(@Param("userdict") UserDict userdict);
    List<UserDict> searchDefault(@Param("srf") UserDictSearchFilter searchfilter,@Param("ew") Wrapper<UserDict> wrapper) ;
    Page<UserDict> searchDefault(IPage page, @Param("srf") UserDictSearchFilter searchfilter, @Param("ew") Wrapper<UserDict> wrapper) ;
    @Select("${sql}")
    List<Map<String,Object>> selectRow( @Param("sql")String sql);
    @Override
    @Cacheable( value="entity",key = "'UserDict:'+#p0")
    UserDict selectById(Serializable id);
    @Override
    @CacheEvict( value="entity",key = "'UserDict:'+#p0.userdictid")
    int updateById(@Param(Constants.ENTITY) UserDict entity);
    @Override
    @CacheEvict( value="entity",key = "'UserDict:'+#p0.userdictid")
    int insert(UserDict entity);
    @Override
    @CacheEvict( value="entity",key = "'UserDict:'+#p0")
    int deleteById(Serializable id);
}