All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tk.mybatis.mapper.additional.update.differ.UpdateByDifferMapper Maven / Gradle / Ivy

The newest version!
package tk.mybatis.mapper.additional.update.differ;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;

/**
 * 差异更新
 *
 * @param  不能为空
 * @author liuzh
 * @since 4.0.4
 */
@RegisterMapper
public interface UpdateByDifferMapper {

    /**
     * 根据 old 和 newer 进行差异更新,当对应某个字段值不同时才会更新
     *
     * @param old
     * @param newer
     * @return
     */
    @UpdateProvider(type = UpdateByDifferProvider.class, method = "dynamicSQL")
    int updateByDiffer(@Param("old") T old, @Param("newer") T newer);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy