package com.xmomen.module.advice.entity.mapper;

import com.xmomen.framework.mybatis.mapper.MybatisMapper;
import com.xmomen.module.advice.entity.Advice;
import com.xmomen.module.advice.entity.AdviceExample;
import org.apache.ibatis.annotations.Param;

// AdviceMapper接口，继承MybatisMapper
public interface AdviceMapper extends MybatisMapper {
    // 根据条件统计Advice数量
    int countByExample(AdviceExample example);

    // 根据条件删除Advice
    int deleteByExample(AdviceExample example);

    // 插入Selective，即只插入不为空的字段
    int insertSelective(Advice record);

    // 根据条件更新Selective，即只更新不为空的字段
    int updateByExampleSelective(@Param("record") Advice record, @Param("example") AdviceExample example);
}