package com.tduck.cloud.form.mapper;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tduck.cloud.form.entity.UserFormEntity;
import com.tduck.cloud.form.vo.FormReportVO;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.mapping.StatementType;

import java.util.List;
import java.util.Set;

/**
 * 表单表(Form)表数据库访问层
 *
 * @author smalljop
 * @since 2020-11-18 18:16:17
 */
public interface UserFormMapper extends BaseMapper<UserFormEntity> {

    /**
     * 执行SQL
     * @param sql
     * @return
     */
    @Update("${value}")
    @Options(statementType = StatementType.STATEMENT)
    public void executeSql(String sql);


    @Select("${value}")
    @Options(statementType = StatementType.STATEMENT)
    String checkTable(String sql);

    @Select("${value}")
    @Options(statementType = StatementType.STATEMENT)
    List<JSONObject> getColumns(String sql);

}