新增自动建库
This commit is contained in:
parent
bcda18d2f0
commit
d9de4b54c9
@ -99,9 +99,3 @@
|
||||
- 链接:`/route/team/list`
|
||||
- 菜单排序:2
|
||||
- 菜单类别:系统菜单
|
||||
|
||||
### 数据库
|
||||
|
||||
```sql
|
||||
|
||||
```
|
@ -7,6 +7,7 @@ import ink.wgink.exceptions.UpdateException;
|
||||
import cn.com.tenlion.usercenter.pojo.bos.team.TeamBO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.team.TeamPO;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.team.TeamDTO;
|
||||
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@ -20,7 +21,7 @@ import java.util.Map;
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Repository
|
||||
public interface ITeamDao {
|
||||
public interface ITeamDao extends IInitBaseTable {
|
||||
|
||||
/**
|
||||
* 新增队伍
|
||||
|
@ -1,12 +1,13 @@
|
||||
package cn.com.tenlion.usercenter.dao.teammember;
|
||||
|
||||
import cn.com.tenlion.usercenter.pojo.bos.teammember.TeamMemberBO;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.teammember.TeamMemberDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.teammember.TeamMemberPO;
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import cn.com.tenlion.usercenter.pojo.bos.teammember.TeamMemberBO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.teammember.TeamMemberPO;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.teammember.TeamMemberDTO;
|
||||
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@ -20,7 +21,7 @@ import java.util.Map;
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Repository
|
||||
public interface ITeamMemberDao {
|
||||
public interface ITeamMemberDao extends IInitBaseTable {
|
||||
|
||||
/**
|
||||
* 新增队伍人员
|
||||
|
@ -1,12 +1,13 @@
|
||||
package cn.com.tenlion.usercenter.dao.teammembergrid;
|
||||
|
||||
import cn.com.tenlion.usercenter.pojo.bos.teammembergrid.TeamMemberGridBO;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.teammembergrid.TeamMemberGridDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.teammembergrid.TeamMemberGridPO;
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import cn.com.tenlion.usercenter.pojo.bos.teammembergrid.TeamMemberGridBO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.teammembergrid.TeamMemberGridPO;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.teammembergrid.TeamMemberGridDTO;
|
||||
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@ -20,7 +21,7 @@ import java.util.Map;
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Repository
|
||||
public interface ITeamMemberGridDao {
|
||||
public interface ITeamMemberGridDao extends IInitBaseTable {
|
||||
|
||||
/**
|
||||
* 新增队伍网格
|
||||
|
@ -1,12 +1,13 @@
|
||||
package cn.com.tenlion.usercenter.dao.teamtype;
|
||||
|
||||
import cn.com.tenlion.usercenter.pojo.bos.teamtype.TeamTypeBO;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.teamtype.TeamTypeDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.teamtype.TeamTypePO;
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import cn.com.tenlion.usercenter.pojo.bos.teamtype.TeamTypeBO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.teamtype.TeamTypePO;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.teamtype.TeamTypeDTO;
|
||||
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@ -20,7 +21,7 @@ import java.util.Map;
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Repository
|
||||
public interface ITeamTypeDao {
|
||||
public interface ITeamTypeDao extends IInitBaseTable {
|
||||
|
||||
/**
|
||||
* 新增队伍类型
|
||||
|
@ -52,6 +52,30 @@
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 建表 -->
|
||||
<update id="createTable">
|
||||
CREATE TABLE IF NOT EXISTS `city_team` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`team_id` char(36) DEFAULT NULL COMMENT '主键',
|
||||
`team_type_id` char(36) DEFAULT NULL COMMENT '队伍类型ID',
|
||||
`team_name` varchar(255) DEFAULT NULL COMMENT '队伍名称',
|
||||
`team_summary` varchar(255) DEFAULT NULL COMMENT '队伍描述',
|
||||
`team_duty` varchar(255) DEFAULT NULL COMMENT '队伍职责',
|
||||
`team_code` varchar(255) DEFAULT NULL COMMENT '队伍编码',
|
||||
`team_order` double(11,4) DEFAULT NULL COMMENT '队伍排序',
|
||||
`team_level` int(2) DEFAULT '1' COMMENT '队伍层级',
|
||||
`area_code` varchar(255) DEFAULT NULL COMMENT '区域编码',
|
||||
`area_name` varchar(255) DEFAULT NULL COMMENT '区域名称',
|
||||
`creator` char(36) DEFAULT NULL COMMENT '创建人',
|
||||
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`modifier` char(36) DEFAULT NULL COMMENT '修改人',
|
||||
`gmt_modified` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`is_delete` int(1) DEFAULT '0' COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `team_id` (`team_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='队伍';
|
||||
</update>
|
||||
|
||||
<!-- 新增队伍 -->
|
||||
<insert id="save" parameterType="map">
|
||||
INSERT INTO city_team(
|
||||
|
@ -41,6 +41,25 @@
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 建表 -->
|
||||
<update id="createTable">
|
||||
CREATE TABLE IF NOT EXISTS `city_team_member` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`team_member_id` char(36) DEFAULT NULL COMMENT '主键',
|
||||
`team_id` char(36) DEFAULT NULL COMMENT '队伍ID',
|
||||
`user_id` char(36) DEFAULT NULL COMMENT '用户ID',
|
||||
`leader_user_id` char(36) DEFAULT NULL COMMENT '上级用户ID',
|
||||
`member_type` varchar(255) DEFAULT NULL COMMENT '成员类型',
|
||||
`member_order` double(11,4) DEFAULT NULL COMMENT '成员排序',
|
||||
`member_level` int(2) DEFAULT NULL COMMENT '成员层级',
|
||||
`area_code` varchar(255) DEFAULT NULL COMMENT '区域编码',
|
||||
`area_name` varchar(255) DEFAULT NULL COMMENT '区域名称',
|
||||
`gmt_create` datetime DEFAULT NULL COMMENT '添加时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `team_member_id` (`team_member_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='队伍人员';
|
||||
</update>
|
||||
|
||||
<!-- 新增队伍人员 -->
|
||||
<insert id="save" parameterType="map">
|
||||
INSERT INTO city_team_member(
|
||||
|
@ -20,6 +20,20 @@
|
||||
<result column="grid_id" property="gridId"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 建表 -->
|
||||
<update id="createTable">
|
||||
CREATE TABLE IF NOT EXISTS `city_team_member_grid` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`team_member_grid_id` char(36) DEFAULT NULL COMMENT '主键',
|
||||
`team_id` char(36) DEFAULT NULL COMMENT '队伍',
|
||||
`grid_id` char(36) DEFAULT NULL COMMENT '网格ID',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `team_id` (`team_id`),
|
||||
KEY `grid_id` (`grid_id`),
|
||||
KEY `team_member_grid_id` (`team_member_grid_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='队伍网格';
|
||||
</update>
|
||||
|
||||
<!-- 新增队伍网格 -->
|
||||
<insert id="save" parameterType="map">
|
||||
INSERT INTO city_team_member_grid(
|
||||
|
@ -37,6 +37,25 @@
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 建表 -->
|
||||
<update id="createTable">
|
||||
CREATE TABLE IF NOT EXISTS `city_team_type` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`team_type_id` char(36) DEFAULT NULL COMMENT '主键',
|
||||
`team_type_name` varchar(255) DEFAULT NULL COMMENT '名称',
|
||||
`team_type_summary` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||
`team_type_duty` varchar(255) DEFAULT NULL COMMENT '职责',
|
||||
`team_type_code` varchar(255) DEFAULT NULL COMMENT '编码',
|
||||
`creator` char(36) DEFAULT NULL COMMENT '创建人',
|
||||
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`modifier` char(36) DEFAULT NULL COMMENT '修改人',
|
||||
`gmt_modified` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`is_delete` int(1) DEFAULT '0' COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `type_id` (`team_type_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='队伍类型';
|
||||
</update>
|
||||
|
||||
<!-- 新增队伍类型 -->
|
||||
<insert id="save" parameterType="map">
|
||||
INSERT INTO city_team_type(
|
||||
|
Loading…
Reference in New Issue
Block a user