package com.fs.doctor.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;

@Mapper
public interface DynamicSurveyDataMapper {
    // 插入，并回填自增主键到 data.id
    void insertData(@Param("tableName") String tableName,
                    @Param("data") Map<String, Object> data);

    // 根据主键查询
    Map<String, Object> selectById(@Param("tableName") String tableName,
                                   @Param("id") Long id);

    // 根据主键更新
    void updateById(@Param("tableName") String tableName,
                    @Param("id") Long id,
                    @Param("data") Map<String, Object> data);


}