package cn.edu.whu.boot.collection.mapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UpdateMapper {

    void updateStatus(@Param("tableName") String tableName , @Param("primaryKey") String primaryKey ,
                      @Param("polygonId") Long polygonId , @Param("status") int status,
                      @Param("reason") String reason);

    Integer updateDataReviewer(@Param("tableName") String tableName , @Param("primaryKey") String primaryKey ,
                               @Param("polygonId") Long polygonId , @Param("reviewer") Integer reviewer);

    void updateDataReviewerAndStatus(@Param("tableName") String tableName , @Param("primaryKey") String primaryKey ,
                                     @Param("polygonId") Long polygonId , @Param("reviewer") Integer reviewer,
                                     @Param("status") int status);

    Integer updateSql(@Param("updateSql") String updateSql);

    Integer delete(@Param("deleteSql") String deleteSql);

    Integer getMaxId(@Param("column") String column,@Param("tableName") String tableName);

    void updatePrimaryKey(@Param("seqName")String seqName, @Param("primaryKey") int primaryKey);
}
