package com.unis.base.server.dao;

import com.unis.base.common.vo.DCfxxsjyUpdateLogVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author by PIG
 * 2023/7/20 15
 */
@Transactional(rollbackFor = Exception.class)
@org.apache.ibatis.annotations.Mapper
@Repository
public interface DCfxxsjyUpdateLogDao extends Mapper<DCfxxsjyUpdateLogVO> {

    int updateStatusByVer(@Param("gfcfdm") String gfcfdm,
                          @Param("dataVer") Integer dataVer,
                          @Param("updateCol") String colName,
                          @Param("newVal") String newVal);

    List<DCfxxsjyUpdateLogVO> listCurrentVerData(@Param("gfcfdm") String gfcfdm, @Param("dataVer") Integer dataVer);

    /** 提交 更新修改人*/
    int updateRefresher(@Param("gfcfdm") String gfcfdm,
                        @Param("dataVer") Integer dataVer,
                        @Param("refresher") String refresher,
                        @Param("changeReason") String changeReason);


    List<DCfxxsjyUpdateLogVO> listUpdateLog(DCfxxsjyUpdateLogVO params);

    String getChangeReason(@Param("gfcfdm") String gfcfdm, @Param("dataVer") Integer dataVer);
}
