forked from fuzhengwei/book-small-mybatis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3ddfea
commit 62b98cc
Showing
109 changed files
with
7,930 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
Navicat Premium Data Transfer | ||
Source Server : 127.0.0.1 | ||
Source Server Type : MySQL | ||
Source Server Version : 50639 | ||
Source Host : localhost:3306 | ||
Source Schema : mybatis | ||
Target Server Type : MySQL | ||
Target Server Version : 50639 | ||
File Encoding : 65001 | ||
Date: 16/06/2022 12:59:31 | ||
*/ | ||
|
||
SET NAMES utf8mb4; | ||
SET FOREIGN_KEY_CHECKS = 0; | ||
|
||
-- ---------------------------- | ||
-- Table structure for activity | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `activity`; | ||
CREATE TABLE `activity` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增ID', | ||
`activity_id` bigint(20) NOT NULL COMMENT '活动ID', | ||
`activity_name` varchar(64) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '活动名称', | ||
`activity_desc` varchar(128) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '活动描述', | ||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `unique_activity_id` (`activity_id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='活动配置'; | ||
|
||
-- ---------------------------- | ||
-- Records of activity | ||
-- ---------------------------- | ||
BEGIN; | ||
INSERT INTO `activity` VALUES (1, 100001, '活动名', '测试活动', '2021-08-08 20:14:50', '2021-08-08 20:14:50'); | ||
INSERT INTO `activity` VALUES (3, 100002, '活动名', '测试活动', '2021-10-05 15:49:21', '2021-10-05 15:49:21'); | ||
COMMIT; | ||
|
||
-- ---------------------------- | ||
-- Table structure for user | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `user`; | ||
CREATE TABLE `user` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增ID', | ||
`userId` varchar(9) DEFAULT NULL COMMENT '用户ID', | ||
`userHead` varchar(16) DEFAULT NULL COMMENT '用户头像', | ||
`createTime` timestamp NULL DEFAULT NULL COMMENT '创建时间', | ||
`updateTime` timestamp NULL DEFAULT NULL COMMENT '更新时间', | ||
`userName` varchar(64) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; | ||
|
||
-- ---------------------------- | ||
-- Records of user | ||
-- ---------------------------- | ||
BEGIN; | ||
INSERT INTO `user` VALUES (1, '10001', '1_04', '2022-04-13 00:00:00', '2022-04-13 00:00:00', '叮当猫'); | ||
COMMIT; | ||
|
||
SET FOREIGN_KEY_CHECKS = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>cn.bugstack.mybatis</groupId> | ||
<artifactId>mybatis-step-15</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<dependencies> | ||
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson --> | ||
<dependency> | ||
<groupId>com.alibaba</groupId> | ||
<artifactId>fastjson</artifactId> | ||
<version>1.2.75</version> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/org.dom4j/dom4j --> | ||
<dependency> | ||
<groupId>org.dom4j</groupId> | ||
<artifactId>dom4j</artifactId> | ||
<version>2.1.3</version> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/junit/junit --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.7</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>cn.hutool</groupId> | ||
<artifactId>hutool-all</artifactId> | ||
<version>5.5.0</version> | ||
</dependency> | ||
<!-- LOGGING begin --> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>1.7.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>jcl-over-slf4j</artifactId> | ||
<version>1.7.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>1.0.9</version> | ||
<exclusions> | ||
<exclusion> | ||
<artifactId>slf4j-api</artifactId> | ||
<groupId>org.slf4j</groupId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<!-- LOGGING end --> | ||
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> | ||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
<version>5.1.48</version> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/com.alibaba/druid --> | ||
<dependency> | ||
<groupId>com.alibaba</groupId> | ||
<artifactId>druid</artifactId> | ||
<version>1.2.9</version> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/ognl/ognl --> | ||
<dependency> | ||
<groupId>ognl</groupId> | ||
<artifactId>ognl</artifactId> | ||
<version>3.3.2</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<compilerVersion>1.8</compilerVersion> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
21 changes: 21 additions & 0 deletions
21
mybatis-step-15/src/main/java/cn/bugstack/mybatis/annotations/Delete.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cn.bugstack.mybatis.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* @author 小傅哥,微信:fustack | ||
* @description delete 语句注解 | ||
* @date 2022/6/14 | ||
* @github https://github.com/fuzhengwei/CodeDesignTutorials | ||
* @Copyright 公众号:bugstack虫洞栈 | 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.METHOD) | ||
public @interface Delete { | ||
|
||
String[] value(); | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
mybatis-step-15/src/main/java/cn/bugstack/mybatis/annotations/Insert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cn.bugstack.mybatis.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* @author 小傅哥,微信:fustack | ||
* @description insert 语句注解 | ||
* @date 2022/6/14 | ||
* @github https://github.com/fuzhengwei/CodeDesignTutorials | ||
* @Copyright 公众号:bugstack虫洞栈 | 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.METHOD) | ||
public @interface Insert { | ||
|
||
String[] value(); | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
mybatis-step-15/src/main/java/cn/bugstack/mybatis/annotations/Select.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cn.bugstack.mybatis.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* @author 小傅哥,微信:fustack | ||
* @description select 语句注解 | ||
* @date 2022/6/14 | ||
* @github https://github.com/fuzhengwei/CodeDesignTutorials | ||
* @Copyright 公众号:bugstack虫洞栈 | 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.METHOD) | ||
public @interface Select { | ||
|
||
String[] value(); | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
mybatis-step-15/src/main/java/cn/bugstack/mybatis/annotations/Update.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cn.bugstack.mybatis.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* @author 小傅哥,微信:fustack | ||
* @description update 语句注解 | ||
* @date 2022/6/14 | ||
* @github https://github.com/fuzhengwei/CodeDesignTutorials | ||
* @Copyright 公众号:bugstack虫洞栈 | 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.METHOD) | ||
public @interface Update { | ||
|
||
String[] value(); | ||
|
||
} |
Oops, something went wrong.