一、数据库表结构
1、mysql数据库建表语句
DROP TABLE IF EXISTS `t_sap_dept`;
CREATE TABLE `t_sap_dept` (
`add_user` varchar(32) NOT NULL COMMENT '创建人',
`add_time` datetime NOT NULL COMMENT '创建时间',
`update_user` varchar(32) DEFAULT NULL COMMENT '修改人',
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
`valid_status` varchar(3) DEFAULT NULL COMMENT '是否有效 0 无效 1 有效',
`delete_status` varchar(3) DEFAULT NULL COMMENT '是否删除 0 未删除 1 已删除',
`org_id` varchar(32) NOT NULL COMMENT '部门id',
`org_name` varchar(150) NOT NULL COMMENT '部门名称',
`org_level` varchar(2) DEFAULT NULL COMMENT '部门层级',
`status` varchar(3) DEFAULT NULL COMMENT '是否启用 0 未启用 1 启用',
`sup_org_id` varchar(32) DEFAULT NULL COMMENT '上级组织id',
`flag1` varchar(255) DEFAULT NULL,
`flag2` varchar(255) DEFAULT NULL,
`flag3` varchar(255) DEFAULT NULL,
`flag4` varchar(255) DEFAULT NULL,
PRIMARY KEY (`org_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2、mysql数据库插入语句
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '00030437', '天猫信息服务有限 ', NULL, '1', '00037534', 'D', '', '', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '00032794', '技术管理科', NULL, '1', '00030437', 'E', '', '0086040002', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '00032797', '用户运营模块', NULL, '1', '00030437', 'F', '', '0086090002', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '00034537', '产品管理模块', NULL, '1', '00030437', 'F', '', '0086040001', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '00037364', '风控平台模块', NULL, '1', '10000551', 'F', '', '', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '10000548', '技术二模块', NULL, '1', '00032794', 'F', '', '0086040002', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '10000549', '技术三模块', NULL, '1', '00032794', 'F', '', '0086040002', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '10000550', '运维模块', NULL, '1', '00032794', 'F', '', '0086040002', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '10000551', '业务发展一科', NULL, '1', '00030437', 'E', '', '', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '10000552', '业务发展二科', NULL, '1', '00030437', 'E', '', '', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '10000553', '技术一模块', NULL, '1', '00032794', 'F', '', '0086040002', 'U');
INSERT INTO t_sap_dept VALUES ('system', '2021-2-24 17:12:53', NULL, NULL, '1', '0', '10000554', '金融业务模块', NULL, '1', '10000551', 'F', '', '', 'U');
3、mysql数据库插入截图
二、创建数据库实体类
1、创建实体类SapDept
package com.tianmao.demand.synchrous.entity;
import com.tianmao.db.boot.entity.BaseEntity;
import java.util.Date;
public class SapDept extends BaseEntity {
private static final long serialVersionUID = 5275435492439961860L;
public static String STATUS_FALSE = "0";
public static String STATUS_TRUE = "1";
private String deleteStatus;
private String validStatus;
private String addUser;
private Date addTime;
private String updateUser;
private Date updateTime;
private String orgId;
private String orgName;
private String supOrgId;
private String orgLevel;
private String status;
private String flag1;
private String flag2;
private String flag3;
private String flag4;
public String getDel