forked from opentiny/tiny-engine-backend-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModelDataDao.java
More file actions
32 lines (23 loc) · 1.02 KB
/
ModelDataDao.java
File metadata and controls
32 lines (23 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.tinyengine.it.dynamic.dao;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Repository
@Mapper
public interface ModelDataDao {
@SelectProvider(type = DynamicSqlProvider.class, method = "select")
List<JSONObject> select(Map<String, Object> params);
@InsertProvider(type = DynamicSqlProvider.class, method = "insert")
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
Long insert(Map<String, Object> params);
@UpdateProvider(type = DynamicSqlProvider.class, method = "update")
Integer update(Map<String, Object> params);
@DeleteProvider(type = DynamicSqlProvider.class, method = "delete")
Integer delete(Map<String, Object> params);
@Select("SELECT COLUMN_NAME, DATA_TYPE, COLUMN_COMMENT " +
"FROM INFORMATION_SCHEMA.COLUMNS " +
"WHERE TABLE_NAME = #{tableName} AND TABLE_SCHEMA = DATABASE()")
List<Map<String, Object>> getTableStructure(String tableName);
}