1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
epp/docs/ChatGPT/生成Mybatis xml SQL语句2.md

23 lines
988 B
Markdown
Raw Normal View History

2023-04-15 19:25:52 +08:00
CREATE TABLE `gate` (
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '雪花id',
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '大门显示名称',
`open` tinyint(1) NOT NULL DEFAULT 1 COMMENT '大门是否开放 1为开放 2为关闭',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '社区大门' ROW_FORMAT = DYNAMIC;
创建该表的 add update getList deleteById 的 Mybatils xml片段
(例如:<insert id="addGate"><update id="updateGate"><select id="getGateList"><delete id="deleteGateById">
实体类如下
public class Gate implements Serializable {
private Long id;
private String name;
private Boolean open;
}
以下是一些要求
parameterType="com.cxyxiaomo.epp.common.pojo.Gate"
where 条件所引用的Java变量都需要先判断是否为null或空
输出应该为一个 ```code``` 包起来的代码片段