package cn.com.ty.lift.ud.operation.mapper;


import cn.com.ty.lift.ud.operation.mapper.entity.TaxSettingEntity;
import  com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 税率设置 -Repository
 * 
 * @author Xson
 * @date 2020-05-04
 */
public interface TaxSettingMapper extends BaseMapper<TaxSettingEntity> {

    /**
     * 审批通过
     * @param id
     */
    @Update("update tax_setting set examine_flag = 1 , not_examine_reason = '' where id = #{id} ")
    void examineById(Long id);

    /**
     * 审批驳回
     * @param id
     * @param notExamineReason
     */
    @Update("update tax_setting set examine_flag = 2 ,not_examine_reason = #{notExamineReason} where id = #{id} ")
    void updateInfoById(@Param("id") Long id , @Param("notExamineReason")String notExamineReason);

    /**
     * 提交
     * @param id
     * @return
     */
    @Update("update tax_setting set examine_flag = 0  where id = #{id} ")
    int submit(Long id);
}
