这几天学习了一点前端的开发,后面通过这个小项目来整理开发的过程,参考的是动力节点的动力云客这个项目,大家有兴趣可以去看一下视频,我更多的是学习了它的前端开发,后端我是用自己的方式来的,那么开始今天的学习
项目简介:
该项目是一个简单的前后端分离项目,后端主要是以增删改查,配合前端的组件来完成网站的搭建
准备工具:
IDEA ,WebStorm,云服务器
技术:
jdk17 + spring boot3,vue3
redis,mysql,rocketmq,sa-token....
今天的目标是完成登录功能,前端的页面显示和后端的登录逻辑
在开始之前,需要安装好node.js、 npm、 Vite
这里不带大家去安装了,自行搜索一下,不难的
前端主要是使用别人已经开发好的组件,这里选取的是饿了么开发的Element plus
**安装:**npm i element-plus --save
一:前端页面的介绍
当使用webstorm建立一个vue项目后,会有很多文件,我来简单介绍一下这些文件是什么
1、node_modules/ 项目依赖的各种js依赖包;
2、public/ 公共的静态文件,一个网站图标;
3、src/ 源代码,我们前端写的源代码都会在这个文件夹下;
4、gitignore 提交git时忽略哪些文件;
5、index.html 项目的首页,访问入口文件;
6、package.json 整个项目对js依赖库的配置,还包括了启动、构建项目命令等;(类似maven的pom.xml)
7、package-lock.json 锁定各个js依赖包的来源和版本;
8、README.md 项目的使用帮助文档;
9、vite.config.js vite的配置文件;
vite的配置
类似于springboot的application文件,我们需要在这里指定前端的server,比如端口号,ip和一些其他的功能
代码如下:
javascript
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
server:{
host:'0.0.0.0' ,//ip地址
port: 8081, // 设置服务启动端口号
open: true, // 设置服务启动时是否自动打开浏览器
}
})
大家看注解就知道都是什么意思了
路由
路由就是前端的组件映射,对于vue来说,当访问一个地址
如:/index或者/index2
两个地址分别对应着两个不同的组件,也就是页面
当我们配置好路由后,就可以通过不同的地址访问不同的页面跳转了
代码如下:
新建文件夹:router
javascript
//从vue-router依赖库中导入函数
import { createRouter, createWebHistory } from "vue-router";
//定义一个变量
let router = createRouter({
//路由历史
history:createWebHistory(),
//配置路由,是一个数组,可以配置多个路由
routes:[
{
//路由路径
path:'/',
//路由路径所对应的页面
component : () => import('../view/LoginView.vue'),
},
{
//路由路径
path:'/dashboard',
//路由路径所对应的页面
component : () => import('../view/DashboardView.vue'),
}
]
})
export default router;
路由历史类似于浏览器的历史记录
而下面的配置路由,需要我们去调用vue-router依赖库的函数来创建,配置路由,是一个数组,可以配置多个路由,然后一一对应组件的位置即可
App.vue
这是vue项目中的根组件,是整个vue项目中第一个被加载的组件,所以它更多承担的是组件的容器,将其挂载到首页
javascript
<script setup>
</script>
<template>
<!--渲染路由地址所对应的页面组件-->
<!-- 访问 / 渲染显示Loginview-->
<router-view/>
</template>
<style scoped>
</style>
<router-view/>:是路由占位符。页面中所有与 URL 对应的内容会显示在这个位置。
当用户访问不同的路径(URL)时,Vue Router 会根据定义的路由规则,自动加载相应的组件,并将它们渲染在 <router-view/> 的位置。
main.js
在 Vue.js 项目中,main.js是整个应用的 入口文件。它的主要作用是初始化 Vue 应用和全局设置
所以需要做的事是:
1.导入Element plus,vue,路由,App.vue等组件
2.创建根组件实例,类似于java中的实例化
代码如下:
javascript
//import...from...语句导入,从vue框架导入createApp函数
import { createApp } from 'vue'
//import...from...语句导入,从element-plus框架导入ElementPlus组件
import ElementPlus from 'element-plus'
//导入css样式
//import './style.css'
import 'element-plus/dist/index.css'
//从router.js中导入router组件
import router from './router/router.js'
//从当前文件下的App.vue页面,导入App组件
import App from './App.vue' //根组件
//利用上面所导入的createApp()函数,创建一个vue应用,mount是挂载到#app地方
createApp(App).use(ElementPlus).use(router).mount('#app')
这里的实例化,就是使用vue的函数来进行创建,使用也很简单,我们选择需要创建的组件,并让其使用哪些组件,就在后面.use即可,最后进行挂载mount
index.html
index.html
是一个 Vue.js 单页面的入口 HTML 文件 。它负责提供应用的基本框架,并定义如何将 Vue 应用程序加载到浏览器中。虽然 Vue 的逻辑、组件和样式都定义在 JavaScript 和 Vue 文件中,index.html
是连接前端和浏览器的桥梁
挂载实际上就是将该组件最后的生成结果,放在页面上而已
代码如下:
html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<link rel="icon" type="image/svg+xml" href="/vite.svg"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Vite + Vue</title>
</head>
<body>
<div id="app">
</div>
<script type="module" src="/src/main.js"></script>
</body>
<style>
body {
margin: 0;
}
</style>
</html>
二:前端页面的编写
下面开始前端页面的正式编写
今天的目标是完成登录页面,在开始之前先了解一下vue中,标签的作用
标签<template>,里面写html页面要展示的内容;
标签<script>,里面写javascript代码;
标签<style>,里面写css样式;
LoginView组件:
在这里就要正式开始使用Element plus
完成图:
页面设计:
打开后选择右上角的组件,选择布局,我使用的是下面这个样式
将其代码复制粘贴到LoginView中,并简单的修改一下
布局划分好后,在标签<style>的css样式中修改一下效果如下:
为其添加一个背景色,宽度占比40%,高度填充满浏览器,并让文字在左侧居中
下面是右侧的登录表单,我们在Element中选择表单组件,如下:
实际上就是两个输入框,选择一个然后复制即可
简单说一下表单的属性:
ref是vue中特地的属性,可以通过this.$refs.loginRefForm来访问该组件的表单实例,后续我们通过ref来获取该表单,并实现表单验证
model是表单绑定的对象,可以理解为Java的对象
rules是表单验证的规则。剩下的大家看看文档,可以自行添加
然后输入框就是账号和密码了,其中prop也是指定了输入框的名称,为了后续的表单验证
我们还需要一个登录按钮,来触发登录,所以还是一样的步骤,在Element plus中找到按钮组件,选取自己喜欢的,如下:
参数大家可以看看文档,都有解释
登录逻辑 :
需要在标签<script>中编写js代码,在表单登录中,可以抽象的把账号和密码当成一个用户,转成对象的形式,来给后端进行传输,所以首先定义一个user对象,如下:
这样通过对象的形式,就可以完成双向绑定
这里的loginRules是验证规则,对输入框的prop进行对应
required: true
:表示该字段是必填项。
message: '请输入登录账号'
:如果该字段为空,验证时会提示这个错误消息。
trigger: 'blur'
:验证触发的时机是 blur
,即用户输入框失去焦点时触发验证
下面开始编写登录的方法,因为在点击登录后,就需要一段逻辑来进行登录
1.是否符合验证规则,如果符合进行登录向后端发送数据,不符合重新输入
2.进行登录,将用户作为参数,通过后端的接口来获取返回值
请求函数封装:
知道大概的流程,我们首先来封装请求的函数,如下:
javascript
import axios from "axios";
//定义后端接口地址的前缀
axios.defaults.baseURL = "http://localhost:8089"
export function doGet(url, params) {
axios({
method: 'GET',
url: url,
params: params,//{name: "...", age: ...},
dataType: 'json'
}
)
}
export function doPost(url, data) {
return axios({
method: 'POST',
url: url,
data: data,//{name: "...", age: ...},
dataType: 'json'
})
}
export function doPut(url, data) {
axios({
method: 'put',
url: url,
data: data,//{name: "...", age: ...},
dataType: 'json'
}
)
}
export function doDelete(url, params) {
axios({
method: 'delete',
url: url,
params: params,//{name: "...", age: ...},
dataType: 'json'
}
)
}
这里就很简单了,封装4个请求方法,增删改查
method:这表示请求方法是 POST,通常用于向服务器发送数据。
url: 这是请求的目标 URL,url 是该函数的参数,表示请求的地址。
data:这里是将 data 作为请求体发送。data 参数是你传递给 doPost 函数的实际数据,通常是一个 JavaScript 对象。这个对象将被转换成 JSON 格式,发送给服务器。
dataType: 这个属性设置了请求的数据类型为 json
登录实现:
调用刚刚封装好的doPost函数,将后端地址和用户参数传入,使用.then来接收后端的返回值,接收到后,使用回调函数,判断返回是否正确,如果正确为200则跳转
完整LoginView代码:
javascript
<template>
<el-container>
<!-- 左侧-->
<el-aside width="200px">
<img id="Logo" src="../assets/loginBox.svg" alt="图片未显示">
<p class="imgTitle">欢迎使用榴莲云客系统</p>
</el-aside>
<!-- 右侧-->
<el-main>
<div class="loginTile">欢迎登录</div>
<el-form ref="loginRefForm" :model="user" label-width="auto" :rules="loginRules" style="max-width: 600px">
<!-- 账号-->
<el-form-item label="账号" prop="loginAct">
<el-input v-model="user.loginAct"/>
</el-form-item>
<!-- 密码-->
<el-form-item label="密码" prop="loginPwd">
<el-input type="password" v-model="user.loginPwd"/>
</el-form-item>
<!-- 按钮-->
<el-form-item>
<el-button type="primary" @click="login()">登录</el-button>
</el-form-item>
<!-- 复选框-->
<el-form-item>
<el-checkbox label="记住我" name="rememberMe"/>
</el-form-item>
</el-form>
</el-main>
</el-container>
</template>
<script>
import {doPost} from "../hhtp/httpRequest.js";
import {ElMessage} from "element-plus";
import {messageTip} from "../util/util.js";
export default {
//组件的名字
name: "LoginView",
//定义页面使用到的变量
data() {
return {
//对象变量定义
user: {
loginAct: '',
loginPwd: ''
},
//定义登录表单验证规则
loginRules: {
//定义账号的验证规则,规则可以有多个,数组形式
loginAct : [
{ required: true, message: '请输入登录账号', trigger: 'blur' },
],
//定义密码的验证规则
loginPwd : [
{ required: true, message: '请输入登录密码', trigger: 'blur' },
{ min: 6, max: 16, message: '密码长度为6-16位', trigger: 'blur' },
]
}
}
},
//页面上需要使用功能的js函数,在methods属性定义
methods : {
login(){
//提交前保证输入框的合法性
this.$refs.loginRefForm.validate( (isValid) => {
//isValid是验证后的结果
if (isValid){
//验证通过
let formData = new FormData();
formData.append("loginAct", this.user.loginAct);
formData.append("loginPwd", this.user.loginPwd);
doPost("/api/login",formData).then((resp) => {
console.log(resp);
if(resp.data.code === 200){
//登录成功
messageTip("登录成功","success")
//跳转到系统的主页面
window.location.href = "/dashboard";
}else {
//登录失败
messageTip("登录失败","error")
}
});
}
} )
}
}
}
</script>
<style scoped>
.el-aside {
background: #1a1a1a;
width: 40%;
height: calc(100vh);
text-align: center;
}
#Logo {
height: 350px;
}
.imgTitle {
color: white;
font-size: 28px;
}
.el-form {
width: 60%;
margin: auto;
}
.loginTile {
text-align: center;
margin-top: 100px;
margin-bottom: 25px;
font-weight: bold;
}
.el-button {
width: 100%;
}
</style>
三:后端登录实现
这里的后端我就简单来说了,其实和我之前使用微服务是差不多的,只不过是springboot单体项目了,大家如果想看更详细的,可以去看一下我之前写的satoken的登录,那开始后端的开发
sql表和依赖给大家放最后了,依赖如果详细的话,大家可以看看我之前的文章,有详细说每个依赖
大家按照自己的思路建也是可以的,三层架构
主要是说一下如何用sa-token来完成登录,因为动力节点使用的是spring security,我觉得太重了,学习成本高,所以我还是选用了sa-token
**第一步:**引入satoken的相关依赖(放最后了)
**第二步:**配置satoken
如下:
java
package com.yizhiliulian.config;
import cn.dev33.satoken.context.SaHolder;
import cn.dev33.satoken.filter.SaServletFilter;
import cn.dev33.satoken.router.SaRouter;
import cn.dev33.satoken.stp.StpUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SaTokenConfig {
@Bean
public SaServletFilter getSaReactorFilter() {
return new SaServletFilter()
// 拦截地址
.addInclude("/**") /* 拦截全部path */
// 鉴权方法:每次访问进入
.setAuth(obj -> {
System.out.println("---- 前端访问path:" + SaHolder.getRequest().getRequestPath());
// 登录校验 -- 拦截所有路由,并排除/api/login 用于开放登录
SaRouter.match("/**", "/api/login", r -> StpUtil.checkLogin());
});
}
}
推荐大家阅读官方文档,固定的写法。拦截所有路径检查是否登录,并排除登录的请求
第三步:登录逻辑实现
那我习惯从controller层开始向下写
对于controller来说,关注的是前端传来的数据,传入service层就好,如下:
其中的通用工具,我都会放在文章最后
java
package com.yizhiliulian.controller;
import cn.dev33.satoken.stp.SaTokenInfo;
import cn.dev33.satoken.stp.StpUtil;
import cn.dev33.satoken.util.SaResult;
import com.yizhiliulian.manager.result.Result;
import com.yizhiliulian.service.impl.UserServiceImpl;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/")
@Slf4j
public class UserController {
@Resource
private UserServiceImpl userService;
@RequestMapping("login")
public Result<SaTokenInfo> doLogin(String loginAct, String loginPwd) {
SaTokenInfo login = userService.login(loginAct, loginPwd);
if (login == null){
return Result.fail("用户登录失败");
}
return Result.ok(login);
}
}
下面就是service层了,接口和实现类:
java
package com.yizhiliulian.service;
import cn.dev33.satoken.stp.SaTokenInfo;
public interface UserService {
public SaTokenInfo login(String loginAct, String loginPwd);
}
java
package com.yizhiliulian.service.impl;
import cn.dev33.satoken.stp.SaTokenInfo;
import cn.dev33.satoken.stp.StpUtil;
import com.yizhiliulian.mapper.TUserMapper;
import com.yizhiliulian.model.TUser;
import com.yizhiliulian.service.UserService;
import jakarta.annotation.Resource;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
@Service
public class UserServiceImpl implements UserService {
//用户层
@Resource
private TUserMapper tUserMapper;
public SaTokenInfo login(String loginAct, String loginPwd){
TUser tUser = tUserMapper.selectByLoginAct(loginAct);
if(StringUtils.isBlank(tUser.getLoginAct())) {
return null;
}
// 验证密码
if (!loginPwd.equals(tUser.getLoginPwd())){
return null;
}
StpUtil.login(tUser.getId());
return StpUtil.getTokenInfo();
}
}
首先我们注入Mapper,接受用户传来的参数,利用mapper层进行数据查询,如果没有或者密码不相符则返回空,如果有,则利用satoken的静态方法来进行登录,并讲token进行返回传递,那么后续的相关操作,就是用户上下文进行传递,利用threadlocal,后面再考虑
mapper层的sql语句:
java
<select id="selectByLoginAct" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_user
where login_act = #{loginAct}
</select>
第四步:跨域
如果我们现在直接进行登录,会报错,因为前端的端口是8081,而后端是8089,不同的端口号会产生跨域问题,那么我们需要利用WebMvcConfigurer来解决跨域问题,代码如下:
java
package com.yizhiliulian.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
// 设置允许跨域请求的路径和来源
registry.addMapping("/api/**") // 可以根据需要调整路径
.allowedOrigins("http://localhost:8081") // 允许的源地址
.allowedMethods("GET", "POST", "PUT", "DELETE") // 允许的方法
.allowedHeaders("*") // 允许的请求头
.allowCredentials(true); // 允许携带凭证(如 cookies)
}
}
那下面就是一些通用的封装了,大家自己复制或者手动敲一敲
Result类:统一封装的返回结果
java
package com.yizhiliulian.manager.entity;
/**
* 统一封装web层返回结果
*/
import com.yizhiliulian.manager.enums.ResultCodeEnum;
import lombok.Data;
@Data
public class Result<T> {
//是否成功
private Boolean success;
//状态码
private Integer code;
//状态详情信息
private String message;
//返回数据
private T data;
//无数据返回成功
public static Result ok(){
Result result = new Result();
result.setSuccess(true);
result.setCode(ResultCodeEnum.SUCCESS.getCode());
result.setMessage(ResultCodeEnum.SUCCESS.getDesc());
return result;
}
//有数据返回成功
public static <T> Result ok(T data){
Result result = new Result();
result.setSuccess(true);
result.setCode(ResultCodeEnum.SUCCESS.getCode());
result.setMessage(ResultCodeEnum.SUCCESS.getDesc());
result.setData(data);
return result;
}
//无数据返回失败
public static Result fail(){
Result result = new Result();
result.setSuccess(true);
result.setCode(ResultCodeEnum.FAIL.getCode());
result.setMessage(ResultCodeEnum.FAIL.getDesc());
return result;
}
//有数据返回失败
public static <T> Result fail(T data){
Result result = new Result();
result.setSuccess(false);
result.setCode(ResultCodeEnum.FAIL.getCode());
result.setMessage(ResultCodeEnum.FAIL.getDesc());
result.setData(data);
return result;
}
}
ResultCodeEnum枚举类:
java
package com.yizhiliulian.manager.enums;
import lombok.Getter;
@Getter
public enum ResultCodeEnum {
SUCCESS(200,"成功"),
FAIL(500,"失败");
public int code;
public String desc;
ResultCodeEnum(int code, String desc){
this.code = code;
this.desc = desc;
}
public static ResultCodeEnum getByCode(int codeVal){
for (ResultCodeEnum resultCodeEnum : ResultCodeEnum.values()){
if (resultCodeEnum.code == codeVal){
return resultCodeEnum;
}
}
return null;
}
}
sql表:
sql
/*
Navicat Premium Data Transfer
Source Server : 192.168.11.128
Source Server Type : MySQL
Source Server Version : 80033 (8.0.33)
Source Host : 192.168.11.128:3306
Source Schema : dlyk
Target Server Type : MySQL
Target Server Version : 80033 (8.0.33)
File Encoding : 65001
Date: 10/12/2023 21:55:10
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_activity
-- ----------------------------
DROP TABLE IF EXISTS `t_activity`;
CREATE TABLE `t_activity` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,活动ID',
`owner_id` int NULL DEFAULT NULL COMMENT '活动所属人ID',
`name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '活动名称',
`start_time` datetime NULL DEFAULT NULL COMMENT '活动开始时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '活动结束时间',
`cost` decimal(11, 2) NULL DEFAULT NULL COMMENT '活动预算',
`description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '活动描述',
`create_time` datetime NULL DEFAULT NULL COMMENT '活动创建时间',
`create_by` int NULL DEFAULT NULL COMMENT '活动创建人',
`edit_time` datetime NULL DEFAULT NULL COMMENT '活动编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '活动编辑人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `owner`(`owner_id` ASC) USING BTREE,
INDEX `create_by`(`create_by` ASC) USING BTREE,
INDEX `edit_by`(`edit_by` ASC) USING BTREE,
CONSTRAINT `t_activity_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_activity_ibfk_2` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_activity_ibfk_3` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '市场活动表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_activity
-- ----------------------------
INSERT INTO `t_activity` VALUES (1, 4, '百度推广', '2023-04-02 19:18:20', '2023-06-30 00:00:00', 1200000.00, '百度排名推广,活动非常非常贵,大家好好的做推广.由于推广活动的效果非常好,决定延期一个月.11111', NULL, NULL, '2023-05-15 00:10:49', NULL);
INSERT INTO `t_activity` VALUES (2, 2, '充话费-送手机', '2023-03-28 17:48:49', '2023-04-30 17:48:54', 9000.00, '充话费,送手机,充满送Iphone14', '2023-03-28 17:49:28', 1, '2023-05-15 00:10:52', 1);
INSERT INTO `t_activity` VALUES (7, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-30 12:03:09', 15800.00, '抖音直播推广活动1', NULL, 6, NULL, NULL);
INSERT INTO `t_activity` VALUES (8, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-30 12:03:09', 15800.00, '抖音直播推广活动2', NULL, 7, '2023-04-28 14:28:53', NULL);
INSERT INTO `t_activity` VALUES (10, 2, '11', '2023-04-11 00:30:58', '2023-04-30 00:31:00', 131.00, '12312312', NULL, NULL, '2023-04-28 13:33:56', NULL);
INSERT INTO `t_activity` VALUES (11, 3, '1213', '2023-04-01 00:00:00', '2023-04-30 00:31:13', 123123.00, '23123123', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (12, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (13, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, '2023-04-28 13:27:43', NULL);
INSERT INTO `t_activity` VALUES (14, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (15, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动11111', NULL, NULL, '2023-04-26 17:09:49', NULL);
INSERT INTO `t_activity` VALUES (16, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (17, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (18, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (19, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (20, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (21, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (22, 1, '抖音推广', '2023-04-01 10:03:09', '2023-04-09 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (23, 1, '抖音推广', '2023-04-01 10:03:09', '2023-04-11 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (24, 1, '抖音推广', '2023-04-01 10:03:09', '2023-04-12 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (25, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (26, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (27, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (28, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (29, 1, '抖音推广', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (40, 1, '抖音推广11', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (41, 1, '抖音推广11', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (42, 1, '抖音推广11', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (43, 1, '抖音推广11', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (44, 1, '抖音推广11', '2023-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动1', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (45, 1, '抖音推广11', '2022-04-01 12:03:09', '2023-04-01 12:03:09', 15800.00, '抖音直播推广活动2', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (46, 3, '抖音短视频广告', '2023-11-14 00:00:00', '2023-11-30 00:00:00', 5000.00, '抖音短视频广告,宣传产品', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (47, 3, '我去恶趣味', '2023-11-15 16:51:40', '2023-11-30 16:51:42', 231231.00, '色达所大所大所多', NULL, NULL, NULL, NULL);
INSERT INTO `t_activity` VALUES (48, NULL, NULL, '2023-06-30 00:44:19', NULL, NULL, NULL, '2023-06-27 22:27:15', NULL, NULL, NULL);
-- ----------------------------
-- Table structure for t_activity_remark
-- ----------------------------
DROP TABLE IF EXISTS `t_activity_remark`;
CREATE TABLE `t_activity_remark` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,活动备注ID',
`activity_id` int NULL DEFAULT NULL COMMENT '活动ID',
`note_content` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注内容',
`create_time` datetime NULL DEFAULT NULL COMMENT '备注创建时间',
`create_by` int NULL DEFAULT NULL COMMENT '备注创建人',
`edit_time` datetime NULL DEFAULT NULL COMMENT '备注编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '备注编辑人',
`deleted` int NULL DEFAULT NULL COMMENT '删除状态(0正常,1删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `activity_id`(`activity_id` ASC) USING BTREE,
INDEX `t_activity_remark_ibfk_2`(`create_by` ASC) USING BTREE,
INDEX `t_activity_remark_ibfk_3`(`edit_by` ASC) USING BTREE,
CONSTRAINT `t_activity_remark_ibfk_1` FOREIGN KEY (`activity_id`) REFERENCES `t_activity` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_activity_remark_ibfk_2` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_activity_remark_ibfk_3` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '市场活动备注表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_activity_remark
-- ----------------------------
INSERT INTO `t_activity_remark` VALUES (1, 46, '1111111111111', '2023-05-17 14:07:48', 1, NULL, NULL, NULL);
INSERT INTO `t_activity_remark` VALUES (2, 1, '2312323123123', '2023-05-17 14:25:30', 1, '2023-11-08 14:21:42', 1, NULL);
INSERT INTO `t_activity_remark` VALUES (3, 2, '1231231', '2023-06-07 23:08:32', 1, NULL, NULL, NULL);
INSERT INTO `t_activity_remark` VALUES (4, 2, '23123', '2023-06-07 23:08:57', 1, NULL, NULL, NULL);
INSERT INTO `t_activity_remark` VALUES (5, 10, '恶趣味群二无群二群无', '2023-06-07 23:10:20', 1, NULL, NULL, NULL);
INSERT INTO `t_activity_remark` VALUES (6, 1, '12而且我撒', '2023-08-04 22:30:47', 1, NULL, NULL, NULL);
-- ----------------------------
-- Table structure for t_clue
-- ----------------------------
DROP TABLE IF EXISTS `t_clue`;
CREATE TABLE `t_clue` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,线索ID',
`owner_id` int NULL DEFAULT NULL COMMENT '线索所属人ID',
`activity_id` int NULL DEFAULT NULL COMMENT '活动ID',
`full_name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '姓名',
`appellation` int NULL DEFAULT NULL COMMENT '称呼',
`phone` varchar(18) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '手机号',
`weixin` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '微信号',
`qq` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT 'QQ号',
`email` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '邮箱',
`age` int NULL DEFAULT NULL COMMENT '年龄',
`job` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '职业',
`year_income` decimal(10, 2) NULL DEFAULT NULL COMMENT '年收入',
`address` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '地址',
`need_loan` int NULL DEFAULT NULL COMMENT '是否需要贷款(0不需要,1需要)',
`intention_state` int NULL DEFAULT NULL COMMENT '意向状态',
`intention_product` int NULL DEFAULT NULL COMMENT '意向产品',
`state` int NULL DEFAULT NULL COMMENT '线索状态',
`source` int NULL DEFAULT NULL COMMENT '线索来源',
`description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '线索描述',
`next_contact_time` datetime NULL DEFAULT NULL COMMENT '下次联系时间',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`create_by` int NULL DEFAULT NULL COMMENT '创建人',
`edit_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '编辑人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `appellation`(`appellation` ASC) USING BTREE,
INDEX `state`(`state` ASC) USING BTREE,
INDEX `source`(`source` ASC) USING BTREE,
INDEX `owner`(`owner_id` ASC) USING BTREE,
INDEX `create_by`(`create_by` ASC) USING BTREE,
INDEX `edit_by`(`edit_by` ASC) USING BTREE,
INDEX `t_clue_ibfk_7`(`activity_id` ASC) USING BTREE,
INDEX `t_clue_ibfk_8`(`need_loan` ASC) USING BTREE,
INDEX `t_clue_ibfk_9`(`intention_state` ASC) USING BTREE,
INDEX `t_clue_ibfk_10`(`intention_product` ASC) USING BTREE,
CONSTRAINT `t_clue_ibfk_1` FOREIGN KEY (`appellation`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_ibfk_10` FOREIGN KEY (`intention_product`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_ibfk_2` FOREIGN KEY (`state`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_ibfk_3` FOREIGN KEY (`source`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_ibfk_4` FOREIGN KEY (`owner_id`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_ibfk_5` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_ibfk_6` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_ibfk_7` FOREIGN KEY (`activity_id`) REFERENCES `t_activity` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_ibfk_8` FOREIGN KEY (`need_loan`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_ibfk_9` FOREIGN KEY (`intention_state`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1144 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '线索表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_clue
-- ----------------------------
INSERT INTO `t_clue` VALUES (1, 1, 46, '王杰', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', 50, 46, 5, 24, 3, '近期在看车', '2023-04-27 10:33:47', '2023-07-17 15:17:52', NULL, '2023-11-29 20:10:28', 2);
INSERT INTO `t_clue` VALUES (2, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 50, 47, 8, -1, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:13', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (3, 2, 7, '张翔', 18, '13876903226', '13876903226', '123456', NULL, 26, NULL, 9.00, '天津和平', 50, 48, 10, 30, 44, '有购车意向,需要跟踪', '2023-04-15 00:00:00', '2023-06-10 01:01:17', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (4, 1, 46, '王杰', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', 50, 46, 5, 24, 3, '近期在看车', '2023-04-27 10:33:47', '2023-04-12 15:17:52', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (5, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 50, 47, 8, -1, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:19', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (6, 2, 7, '张翔', 18, '13876903226', '13876903226', NULL, NULL, 26, NULL, 9.00, '天津和平', 49, 48, 10, 30, 44, '有购车意向,需要跟踪', '2023-04-15 00:00:00', '2023-06-10 01:01:23', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (7, 1, 46, '王杰', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', 49, 46, 5, 24, 3, '近期在看车', '2023-04-27 10:33:47', '2023-04-12 15:17:52', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (8, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 49, 47, 8, 24, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:25', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (9, 2, 7, '张翔', 18, '13876903226', '13876903226', NULL, NULL, 26, NULL, 9.00, '天津和平', 49, 48, 10, 30, 44, '有购车意向,需要跟踪', '2023-04-28 13:24:10', '2023-06-10 01:01:28', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (10, 1, 46, '王杰89890890', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '', 10.00, '北京亦庄', 49, 46, 5, -1, 3, '近期在看车', '2023-04-27 10:33:47', '2023-04-12 15:17:52', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (11, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 49, 47, 8, 24, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:30', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (12, 2, 7, '张翔', 18, '13876903226', '13876903226', NULL, NULL, 26, NULL, 9.00, '天津和平', 49, 48, 10, 30, 44, '有购车意向,需要跟踪', '2023-04-15 00:00:00', '2023-06-10 01:01:33', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (13, 1, 46, '王杰', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', 49, 46, 5, -1, 3, '近期在看车', '2023-04-27 10:33:47', '2023-04-12 15:17:52', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (14, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 49, 47, 8, -1, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:36', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (15, 2, 7, '张翔', 18, '13876903226', '13876903226', NULL, NULL, 26, NULL, 9.00, '天津和平', 49, 48, 10, 30, 44, '有购车意向,需要跟踪', '2023-04-15 00:00:00', '2023-06-10 01:01:38', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (16, 1, 46, '王杰', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', 49, 46, 5, 24, 3, '近期在看车', '2023-04-27 10:33:47', '2023-04-12 15:17:52', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (17, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 49, 47, 8, -1, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:41', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (18, 2, 7, '张翔', 18, '13876903226', '13876903226', NULL, NULL, 26, NULL, 9.00, '天津和平', 49, 48, 10, 30, 44, '有购车意向,需要跟踪', '2023-04-15 00:00:00', '2023-06-10 01:01:44', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (19, 1, 46, '王杰', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', 49, 46, 5, -1, 3, '近期在看车', '2023-04-27 10:33:47', '2023-06-12 15:17:52', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (20, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 49, 47, 8, 24, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:46', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (21, 2, 7, '张翔', 18, '13876903226', '13876903226', NULL, NULL, 26, NULL, 9.00, '天津和平', 49, 48, 10, 30, 44, '有购车意向,需要跟踪', '2023-04-15 00:00:00', '2023-06-10 01:01:46', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (22, 1, 46, '王杰', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', 49, 46, 5, 24, 3, '近期在看车', '2023-04-27 10:33:47', '2023-04-12 15:17:52', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (23, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 49, 47, 8, -1, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:46', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (24, 2, 7, '张翔', 18, '13876903226', '13876903226', NULL, NULL, 26, NULL, 9.00, '天津和平', 49, 48, 10, 30, 44, '有购车意向,需要跟踪', '2023-04-15 00:00:00', '2023-06-10 01:01:46', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (25, 1, 46, '王杰', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', 49, 46, 5, 24, 3, '近期在看车', '2023-04-27 10:33:47', '2023-04-12 15:17:52', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (26, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 49, 47, 8, 24, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:46', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (27, 2, 7, '张翔', 18, '13876903226', '13876903226', NULL, NULL, 26, NULL, 9.00, '天津和平', 49, 48, 10, 30, 44, '有购车意向,需要跟踪', '2023-04-15 00:00:00', '2023-06-10 01:01:46', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (28, 1, 46, '王杰', 18, '13700000000', '13700000000', '13700000000', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', 49, 46, 5, 24, 3, '近期在看车', '2023-04-27 10:33:47', '2023-06-12 15:17:52', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (29, 1, 47, '张峰', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', 49, 47, 8, 24, 33, '通过打电话获取的线索', '2023-04-30 10:33:51', '2023-06-10 01:01:46', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (31, 3, 2, '213213', 20, '12312312', '12312312', '2312312', '12312312', 12, '341231', 2131231.00, '12312312', 50, 46, 7, 24, 44, 'asfeefsdewrewr', '2023-04-27 16:48:30', '2023-06-10 01:01:46', NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1109, 1, 46, '王杰', 18, '13700000000', '13700000000', '230989432', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-11-27 20:33:25', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1110, 1, 47, '张怡然', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 10:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1111, 2, 7, '张翔宇', 18, '13876903226', '13876903226', '1298094321', NULL, 26, NULL, 9.00, '天津和平', NULL, NULL, NULL, NULL, NULL, '有购车意向,需要跟踪', '2023-11-15 10:30:00', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1112, 1, 46, '王世坤', 18, '13700000000', '13700000000', '209836613', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-12-27 09:20:21', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1113, 1, 47, '张珊珊', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 13:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1114, 1, 46, '王杰', 18, '13700000000', '13700000000', '230989432', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-11-27 20:33:25', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1115, 1, 47, '张怡然', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 10:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1116, 2, 7, '张翔宇', 18, '13876903226', '13876903226', '1298094321', NULL, 26, NULL, 9.00, '天津和平', NULL, NULL, NULL, NULL, NULL, '有购车意向,需要跟踪', '2023-11-15 10:30:00', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1117, 1, 46, '王世坤', 18, '13700000000', '13700000000', '209836613', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-12-27 09:20:21', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1118, 1, 47, '张珊珊', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 13:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1119, 1, 46, '王杰', 18, '13700000000', '13700000000', '230989432', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-11-27 20:33:25', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1120, 1, 47, '张怡然', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 10:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1121, 2, 7, '张翔宇', 18, '13876903226', '13876903226', '1298094321', NULL, 26, NULL, 9.00, '天津和平', NULL, NULL, NULL, NULL, NULL, '有购车意向,需要跟踪', '2023-11-15 10:30:00', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1122, 1, 46, '王世坤', 18, '13700000000', '13700000000', '209836613', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-12-27 09:20:21', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1123, 1, 47, '张珊珊', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 13:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1124, 1, 46, '王杰', 18, '13700000000', '13700000000', '230989432', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-11-27 20:33:25', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1125, 1, 47, '张怡然', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 10:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1126, 2, 7, '张翔宇', 18, '13876903226', '13876903226', '1298094321', NULL, 26, NULL, 9.00, '天津和平', NULL, NULL, NULL, NULL, NULL, '有购车意向,需要跟踪', '2023-11-15 10:30:00', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1127, 1, 46, '王世坤', 18, '13700000000', '13700000000', '209836613', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-12-27 09:20:21', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1128, 1, 47, '张珊珊', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 13:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1129, 1, 46, '王杰', 18, '13700000000', '13700000000', '230989432', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-11-27 20:33:25', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1130, 1, 47, '张怡然', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 10:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1131, 2, 7, '张翔宇', 18, '13876903226', '13876903226', '1298094321', NULL, 26, NULL, 9.00, '天津和平', NULL, NULL, NULL, NULL, NULL, '有购车意向,需要跟踪', '2023-11-15 10:30:00', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1132, 1, 46, '王世坤', 18, '13700000000', '13700000000', '209836613', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-12-27 09:20:21', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1133, 1, 47, '张珊珊', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 13:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1134, 1, 46, '王杰', 18, '13700000000', '13700000000', '230989432', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-11-27 20:33:25', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1135, 1, 47, '张怡然', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 10:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1136, 2, 7, '张翔宇', 18, '13876903226', '13876903226', '1298094321', NULL, 26, NULL, 9.00, '天津和平', NULL, NULL, NULL, NULL, NULL, '有购车意向,需要跟踪', '2023-11-15 10:30:00', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1137, 1, 46, '王世坤', 18, '13700000000', '13700000000', '209836613', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-12-27 09:20:21', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1138, 1, 47, '张珊珊', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 13:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1139, 1, 46, '王杰', 18, '13700000000', '13700000000', '230989432', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-11-27 20:33:25', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1140, 1, 47, '张怡然', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 10:33:51', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1141, 2, 7, '张翔宇', 18, '13876903226', '13876903226', '1298094321', NULL, 26, NULL, 9.00, '天津和平', NULL, NULL, NULL, NULL, NULL, '有购车意向,需要跟踪', '2023-11-15 10:30:00', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1142, 1, 46, '王世坤', 18, '13700000000', '13700000000', '209836613', 'wangjie@163.com', 32, '工程师', 10.00, '北京亦庄', NULL, NULL, NULL, NULL, NULL, '近期在看车', '2023-12-27 09:20:21', NULL, NULL, NULL, NULL);
INSERT INTO `t_clue` VALUES (1143, 1, 47, '张珊珊', 41, '13700000001', '13700000001', NULL, NULL, 28, NULL, 8.00, '河北廊坊', NULL, NULL, NULL, NULL, NULL, '通过打电话获取的线索', '2023-11-30 13:33:51', NULL, NULL, NULL, NULL);
-- ----------------------------
-- Table structure for t_clue_remark
-- ----------------------------
DROP TABLE IF EXISTS `t_clue_remark`;
CREATE TABLE `t_clue_remark` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,线索备注ID',
`clue_id` int NULL DEFAULT NULL COMMENT '线索ID',
`note_way` int NULL DEFAULT NULL COMMENT '跟踪方式',
`note_content` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '跟踪内容',
`create_time` datetime NULL DEFAULT NULL COMMENT '跟踪时间',
`create_by` int NULL DEFAULT NULL COMMENT '跟踪人',
`edit_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '编辑人',
`deleted` int NULL DEFAULT NULL COMMENT '删除状态(0正常,1删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `create_by`(`create_by` ASC) USING BTREE,
INDEX `edit_by`(`edit_by` ASC) USING BTREE,
INDEX `clue_id`(`clue_id` ASC) USING BTREE,
INDEX `t_clue_remark_ibfk_4`(`note_way` ASC) USING BTREE,
CONSTRAINT `t_clue_remark_ibfk_1` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_remark_ibfk_2` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_remark_ibfk_3` FOREIGN KEY (`clue_id`) REFERENCES `t_clue` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_clue_remark_ibfk_4` FOREIGN KEY (`note_way`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '线索跟踪记录表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_clue_remark
-- ----------------------------
INSERT INTO `t_clue_remark` VALUES (5, 8, 65, '2143242354', '2023-04-28 14:24:27', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (6, 10, 64, '123412312312', '2023-04-28 14:29:41', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (7, 10, 63, '二位绕弯儿翁人', '2023-04-28 14:30:16', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (8, 21, 61, '12213123123', '2023-05-21 23:43:48', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (9, 21, 62, '3ewrwerewr', '2023-05-21 23:43:52', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (10, 21, 65, 'ewrwerewrewr', '2023-05-21 23:43:55', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (11, 16, 64, '123213123', '2023-05-21 23:54:57', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (12, 16, 63, '23123123', '2023-05-21 23:54:59', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (13, 16, 61, '2312313', '2023-05-21 23:55:02', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (14, 1, 62, NULL, '2023-06-27 22:47:49', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (15, 1, 65, '111111111111111', '2023-06-27 22:47:56', 1, NULL, NULL, NULL);
INSERT INTO `t_clue_remark` VALUES (16, 1, 64, '1111111111111111111111222222222222222222222222', '2023-06-27 22:48:01', 1, NULL, NULL, NULL);
-- ----------------------------
-- Table structure for t_customer
-- ----------------------------
DROP TABLE IF EXISTS `t_customer`;
CREATE TABLE `t_customer` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,客户ID',
`clue_id` int NULL DEFAULT NULL COMMENT '线索ID',
`product` int NULL DEFAULT NULL COMMENT '选购产品',
`description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '客户描述',
`next_contact_time` datetime NULL DEFAULT NULL COMMENT '下次联系时间',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`create_by` int NULL DEFAULT NULL COMMENT '创建人',
`edit_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '编辑人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_customer_ibfk_1`(`clue_id` ASC) USING BTREE,
INDEX `t_customer_ibfk_2`(`product` ASC) USING BTREE,
INDEX `t_customer_ibfk_3`(`create_by` ASC) USING BTREE,
INDEX `t_customer_ibfk_4`(`edit_by` ASC) USING BTREE,
CONSTRAINT `t_customer_ibfk_1` FOREIGN KEY (`clue_id`) REFERENCES `t_clue` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_customer_ibfk_2` FOREIGN KEY (`product`) REFERENCES `t_product` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_customer_ibfk_3` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_customer_ibfk_4` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '客户表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_customer
-- ----------------------------
INSERT INTO `t_customer` VALUES (1, 10, 3, '2131231', '2023-05-06 15:36:59', NULL, NULL, NULL, NULL);
INSERT INTO `t_customer` VALUES (2, 8, 6, '124气味儿群', '2023-05-05 00:00:00', NULL, NULL, NULL, NULL);
INSERT INTO `t_customer` VALUES (3, 6, 6, '1232强21312', '2023-05-06 00:00:00', '2023-04-28 15:42:15', 1, NULL, NULL);
INSERT INTO `t_customer` VALUES (4, 2, 3, '阿萨的人', '2023-05-05 00:00:00', '2023-04-28 15:54:04', 1, NULL, NULL);
INSERT INTO `t_customer` VALUES (5, 10, 1, '234234', '2023-05-05 00:00:00', '2023-04-28 15:56:44', 1, NULL, NULL);
INSERT INTO `t_customer` VALUES (6, 17, 2, '是的啊所大', '2023-05-05 00:00:00', '2023-04-28 15:59:33', 1, NULL, NULL);
INSERT INTO `t_customer` VALUES (7, 5, 2, '12312312', '2023-05-12 00:00:00', '2023-05-04 10:03:05', 1, NULL, NULL);
INSERT INTO `t_customer` VALUES (8, 19, 2, '气味儿群翁', '2023-05-04 10:03:18', '2023-05-04 10:03:20', 1, NULL, NULL);
INSERT INTO `t_customer` VALUES (9, 14, 4, '沃尔沃二', '2023-06-09 00:00:00', '2023-05-04 10:03:39', 1, NULL, NULL);
INSERT INTO `t_customer` VALUES (10, 23, 4, '沃尔沃二翁', '2023-05-23 00:00:00', '2023-05-04 10:03:53', 1, NULL, NULL);
INSERT INTO `t_customer` VALUES (11, 13, 2, '沃尔沃二', '2023-05-13 00:00:00', '2023-05-04 10:04:03', 1, NULL, NULL);
-- ----------------------------
-- Table structure for t_customer_remark
-- ----------------------------
DROP TABLE IF EXISTS `t_customer_remark`;
CREATE TABLE `t_customer_remark` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,客户备注ID',
`customer_id` int NULL DEFAULT NULL COMMENT '客户ID',
`note_way` int NULL DEFAULT NULL COMMENT '跟踪方式',
`note_content` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '跟踪内容',
`create_by` int NULL DEFAULT NULL COMMENT '跟踪人',
`create_time` datetime NULL DEFAULT NULL COMMENT '跟踪时间',
`edit_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '编辑人',
`deleted` int NULL DEFAULT NULL COMMENT '删除状态(0正常,1删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_customer_remark_ibfk_1`(`customer_id` ASC) USING BTREE,
INDEX `t_customer_remark_ibfk_2`(`note_way` ASC) USING BTREE,
INDEX `t_customer_remark_ibfk_3`(`create_by` ASC) USING BTREE,
INDEX `t_customer_remark_ibfk_4`(`edit_by` ASC) USING BTREE,
CONSTRAINT `t_customer_remark_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `t_customer` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_customer_remark_ibfk_2` FOREIGN KEY (`note_way`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_customer_remark_ibfk_3` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_customer_remark_ibfk_4` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '客户跟踪记录表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_customer_remark
-- ----------------------------
INSERT INTO `t_customer_remark` VALUES (1, 10, 65, '1111111111111111', 1, '2023-05-04 15:25:51', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (2, 10, 64, '2222222222222', 1, '2023-05-04 15:28:13', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (3, 10, 63, 'EREWREWRWRWR', 1, '2023-05-04 16:21:03', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (4, 7, 61, '13213123', 1, '2023-05-17 17:36:16', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (5, 10, 62, '2342423423423', 1, '2023-05-17 17:36:33', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (6, 1, 65, '3212321321', 1, '2023-05-21 23:50:42', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (7, 1, 64, 'eqwewqeqwe', 1, '2023-05-21 23:50:46', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (8, 1, 63, 'wqeqwewqeqw', 1, '2023-05-21 23:50:48', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (9, 8, 61, 'ewqeqweq', 1, '2023-05-21 23:50:59', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (10, 5, 62, 'weqweqweqweq', 1, '2023-05-21 23:51:05', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (11, 5, 65, 'weqwewqeqw', 1, '2023-05-21 23:51:08', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (12, 5, 64, '23213213123', 1, '2023-05-21 23:51:13', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (13, 5, 65, '23123213213', 1, '2023-05-21 23:51:16', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (14, 5, 64, '23123213213', 1, '2023-05-21 23:51:19', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (15, 5, 63, '3232323123', 1, '2023-05-21 23:51:23', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (16, 1, 61, '12312321321', 1, '2023-05-21 23:56:55', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (17, 2, 62, '1232131231', 1, '2023-05-21 23:57:03', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (18, 10, 65, NULL, 1, '2023-05-22 22:12:52', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (19, 10, 64, '123213214124', 1, '2023-05-22 22:12:58', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (20, 10, 63, '13241242432432', 1, '2023-05-22 22:13:03', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (21, 10, 61, '3423423423', 1, '2023-05-22 22:13:06', NULL, NULL, NULL);
INSERT INTO `t_customer_remark` VALUES (22, 2, 62, '1242412141', 1, '2023-05-31 20:14:08', NULL, NULL, NULL);
-- ----------------------------
-- Table structure for t_dic_type
-- ----------------------------
DROP TABLE IF EXISTS `t_dic_type`;
CREATE TABLE `t_dic_type` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,字典类型ID',
`type_code` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '字典类型代码',
`type_name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '字典类型名称',
`remark` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE,
INDEX `code`(`type_code` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '字典类型表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_dic_type
-- ----------------------------
INSERT INTO `t_dic_type` VALUES (1, 'sex', '性别', NULL);
INSERT INTO `t_dic_type` VALUES (2, 'appellation', '称呼', NULL);
INSERT INTO `t_dic_type` VALUES (3, 'clueState', '线索状态', NULL);
INSERT INTO `t_dic_type` VALUES (4, 'returnPriority', '回访优先级', NULL);
INSERT INTO `t_dic_type` VALUES (5, 'returnState', '回访状态', NULL);
INSERT INTO `t_dic_type` VALUES (6, 'source', '来源', NULL);
INSERT INTO `t_dic_type` VALUES (7, 'stage', '阶段', NULL);
INSERT INTO `t_dic_type` VALUES (8, 'transactionType', '交易类型', NULL);
INSERT INTO `t_dic_type` VALUES (9, 'intentionState', '意向状态', NULL);
INSERT INTO `t_dic_type` VALUES (10, 'needLoan', '是否贷款', NULL);
INSERT INTO `t_dic_type` VALUES (11, 'educational', '学历', NULL);
INSERT INTO `t_dic_type` VALUES (12, 'userState', '用户状态', NULL);
INSERT INTO `t_dic_type` VALUES (13, 'noteWay', '跟踪方式', NULL);
-- ----------------------------
-- Table structure for t_dic_value
-- ----------------------------
DROP TABLE IF EXISTS `t_dic_value`;
CREATE TABLE `t_dic_value` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,字典值ID',
`type_code` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '字典类型代码',
`type_value` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '字典值',
`order` int NULL DEFAULT NULL COMMENT '字典值排序',
`remark` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_dic_value_ibfk_1`(`type_code` ASC) USING BTREE,
CONSTRAINT `t_dic_value_ibfk_1` FOREIGN KEY (`type_code`) REFERENCES `t_dic_type` (`type_code`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 66 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '字典值表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_dic_value
-- ----------------------------
INSERT INTO `t_dic_value` VALUES (-1, 'clueState', '已转客户', 0, NULL);
INSERT INTO `t_dic_value` VALUES (1, 'clueState', '虚假线索', 4, NULL);
INSERT INTO `t_dic_value` VALUES (2, 'source', '知乎', 8, NULL);
INSERT INTO `t_dic_value` VALUES (3, 'source', '车展会', 11, NULL);
INSERT INTO `t_dic_value` VALUES (4, 'returnPriority', '最高', 2, NULL);
INSERT INTO `t_dic_value` VALUES (5, 'appellation', '教授', 5, NULL);
INSERT INTO `t_dic_value` VALUES (6, 'clueState', '将来联系', 2, NULL);
INSERT INTO `t_dic_value` VALUES (7, 'clueState', '丢失线索', 5, NULL);
INSERT INTO `t_dic_value` VALUES (8, 'returnState', '未启动', 1, NULL);
INSERT INTO `t_dic_value` VALUES (10, 'clueState', '试图联系', 1, NULL);
INSERT INTO `t_dic_value` VALUES (11, 'appellation', '博士', 4, NULL);
INSERT INTO `t_dic_value` VALUES (12, 'stage', '01创建交易', 1, NULL);
INSERT INTO `t_dic_value` VALUES (14, 'source', '汽车之家', 14, NULL);
INSERT INTO `t_dic_value` VALUES (15, 'returnPriority', '低', 3, NULL);
INSERT INTO `t_dic_value` VALUES (16, 'source', '网络广告', 1, NULL);
INSERT INTO `t_dic_value` VALUES (17, 'source', '视频直播', 9, NULL);
INSERT INTO `t_dic_value` VALUES (18, 'appellation', '先生', 1, NULL);
INSERT INTO `t_dic_value` VALUES (19, 'returnPriority', '高', 1, NULL);
INSERT INTO `t_dic_value` VALUES (20, 'appellation', '夫人', 2, NULL);
INSERT INTO `t_dic_value` VALUES (21, 'stage', '06丢失关闭', 7, NULL);
INSERT INTO `t_dic_value` VALUES (22, 'source', '地图', 13, NULL);
INSERT INTO `t_dic_value` VALUES (23, 'source', '合作伙伴', 6, NULL);
INSERT INTO `t_dic_value` VALUES (24, 'clueState', '未联系', 6, NULL);
INSERT INTO `t_dic_value` VALUES (25, 'source', '朋友圈', 10, NULL);
INSERT INTO `t_dic_value` VALUES (26, 'returnState', '进行中', 3, NULL);
INSERT INTO `t_dic_value` VALUES (27, 'clueState', '已联系', 3, NULL);
INSERT INTO `t_dic_value` VALUES (28, 'returnState', '推迟', 2, NULL);
INSERT INTO `t_dic_value` VALUES (29, 'returnState', '完成', 4, NULL);
INSERT INTO `t_dic_value` VALUES (30, 'clueState', '需要条件', 7, NULL);
INSERT INTO `t_dic_value` VALUES (32, 'returnState', '等待某人', 5, NULL);
INSERT INTO `t_dic_value` VALUES (33, 'source', '懂车帝', 2, NULL);
INSERT INTO `t_dic_value` VALUES (34, 'returnPriority', '常规', 5, NULL);
INSERT INTO `t_dic_value` VALUES (35, 'stage', '04产品检验', 5, NULL);
INSERT INTO `t_dic_value` VALUES (36, 'source', '易车网', 12, NULL);
INSERT INTO `t_dic_value` VALUES (37, 'stage', '02确认清单', 3, NULL);
INSERT INTO `t_dic_value` VALUES (38, 'returnPriority', '最低', 4, NULL);
INSERT INTO `t_dic_value` VALUES (39, 'source', '员工介绍', 3, NULL);
INSERT INTO `t_dic_value` VALUES (40, 'stage', '03交付定金', 4, NULL);
INSERT INTO `t_dic_value` VALUES (41, 'appellation', '女士', 3, NULL);
INSERT INTO `t_dic_value` VALUES (42, 'stage', '05付款成交', 6, NULL);
INSERT INTO `t_dic_value` VALUES (43, 'source', '官方网站', 5, NULL);
INSERT INTO `t_dic_value` VALUES (44, 'source', '公众号', 7, NULL);
INSERT INTO `t_dic_value` VALUES (45, 'source', '门店参观', 4, NULL);
INSERT INTO `t_dic_value` VALUES (46, 'intentionState', '有意向', 1, NULL);
INSERT INTO `t_dic_value` VALUES (47, 'intentionState', '无意向', 2, NULL);
INSERT INTO `t_dic_value` VALUES (48, 'intentionState', '意向不明', 3, NULL);
INSERT INTO `t_dic_value` VALUES (49, 'needLoan', '需要', 1, NULL);
INSERT INTO `t_dic_value` VALUES (50, 'needLoan', '不需要', 2, NULL);
INSERT INTO `t_dic_value` VALUES (51, 'sex', '男', 1, NULL);
INSERT INTO `t_dic_value` VALUES (52, 'sex', '女', 2, NULL);
INSERT INTO `t_dic_value` VALUES (53, 'educational', '小学', 1, NULL);
INSERT INTO `t_dic_value` VALUES (54, 'educational', '初中', 2, NULL);
INSERT INTO `t_dic_value` VALUES (55, 'educational', '高中', 3, NULL);
INSERT INTO `t_dic_value` VALUES (56, 'educational', '大学', 4, NULL);
INSERT INTO `t_dic_value` VALUES (57, 'educational', '研究生', 5, NULL);
INSERT INTO `t_dic_value` VALUES (58, 'userState', '正常', 1, NULL);
INSERT INTO `t_dic_value` VALUES (59, 'userState', '锁定', 2, NULL);
INSERT INTO `t_dic_value` VALUES (60, 'userState', '禁用', 3, NULL);
INSERT INTO `t_dic_value` VALUES (61, 'noteWay', '电话', 1, NULL);
INSERT INTO `t_dic_value` VALUES (62, 'noteWay', '微信', 2, NULL);
INSERT INTO `t_dic_value` VALUES (63, 'noteWay', 'QQ', 3, NULL);
INSERT INTO `t_dic_value` VALUES (64, 'noteWay', '面聊', 4, NULL);
INSERT INTO `t_dic_value` VALUES (65, 'noteWay', '其他', 5, NULL);
-- ----------------------------
-- Table structure for t_permission
-- ----------------------------
DROP TABLE IF EXISTS `t_permission`;
CREATE TABLE `t_permission` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`url` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`parent_id` int NULL DEFAULT NULL,
`order_no` int NULL DEFAULT NULL,
`icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1112 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '权限表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_permission
-- ----------------------------
INSERT INTO `t_permission` VALUES (1, '市场活动', NULL, NULL, 'menu', 0, 1, 'OfficeBuilding');
INSERT INTO `t_permission` VALUES (2, '市场活动', NULL, '/dashboard/activity', 'menu', 1, 1, 'CreditCard');
INSERT INTO `t_permission` VALUES (3, '市场活动-列表', 'activity:list', NULL, 'button', 2, NULL, NULL);
INSERT INTO `t_permission` VALUES (4, '市场活动-录入', 'activity:add', NULL, 'button', 2, NULL, NULL);
INSERT INTO `t_permission` VALUES (5, '市场活动-编辑', 'activity:edit', NULL, 'button', 2, NULL, NULL);
INSERT INTO `t_permission` VALUES (6, '市场活动-查看', 'activity:view', NULL, 'button', 2, NULL, NULL);
INSERT INTO `t_permission` VALUES (7, '市场活动-删除', 'activity:delete', NULL, 'button', 2, NULL, NULL);
INSERT INTO `t_permission` VALUES (9, '市场活动-搜索', 'activity:search', NULL, 'button', 2, NULL, NULL);
INSERT INTO `t_permission` VALUES (10, '线索管理', NULL, NULL, 'menu', 0, 2, 'Magnet');
INSERT INTO `t_permission` VALUES (12, '线索管理', NULL, '/dashboard/clue', 'menu', 10, 1, 'Paperclip');
INSERT INTO `t_permission` VALUES (13, '线索管理-列表', 'clue:list', NULL, 'button', 12, NULL, NULL);
INSERT INTO `t_permission` VALUES (14, '线索管理-录入', 'clue:add', NULL, 'button', 12, NULL, NULL);
INSERT INTO `t_permission` VALUES (15, '线索管理-编辑', 'clue:edit', NULL, 'button', 12, NULL, NULL);
INSERT INTO `t_permission` VALUES (16, '线索管理-查看', 'clue:view', NULL, 'button', 12, NULL, NULL);
INSERT INTO `t_permission` VALUES (17, '线索管理-删除', 'clue:delete', NULL, 'button', 12, NULL, NULL);
INSERT INTO `t_permission` VALUES (18, '线索管理-导入', 'clue:import', NULL, 'button', 12, NULL, NULL);
INSERT INTO `t_permission` VALUES (19, '客户管理', NULL, NULL, 'menu', 0, 3, 'User');
INSERT INTO `t_permission` VALUES (20, '客户管理', NULL, '/dashboard/customer', 'menu', 19, 1, 'UserFilled');
INSERT INTO `t_permission` VALUES (21, '客户管理-列表', 'customer:list', NULL, 'button', 20, NULL, NULL);
INSERT INTO `t_permission` VALUES (22, '客户管理-查看', 'customer:view', NULL, 'button', 20, NULL, NULL);
INSERT INTO `t_permission` VALUES (23, '客户管理-导出', 'customer:export', NULL, 'button', 20, NULL, NULL);
INSERT INTO `t_permission` VALUES (24, '交易管理', NULL, NULL, 'menu', 0, 4, 'Wallet');
INSERT INTO `t_permission` VALUES (25, '交易管理', NULL, '/dashboard/tran', 'menu', 24, 1, 'Coin');
INSERT INTO `t_permission` VALUES (26, '交易管理-列表', 'tran:list', NULL, 'button', 25, NULL, NULL);
INSERT INTO `t_permission` VALUES (27, '交易管理-查看', 'tran:view', NULL, 'button', 25, NULL, NULL);
INSERT INTO `t_permission` VALUES (28, '产品管理', NULL, NULL, 'menu', 0, 5, 'Memo');
INSERT INTO `t_permission` VALUES (29, '产品管理', NULL, '/dashboard/product', 'menu', 28, 1, 'SetUp');
INSERT INTO `t_permission` VALUES (30, '产品管理-列表', 'product:list', NULL, 'button', 29, NULL, NULL);
INSERT INTO `t_permission` VALUES (31, '产品管理-录入', 'product:add', NULL, 'button', 29, NULL, NULL);
INSERT INTO `t_permission` VALUES (32, '产品管理-编辑', 'product:edit', NULL, 'button', 29, NULL, NULL);
INSERT INTO `t_permission` VALUES (33, '产品管理-查看', 'product:view', NULL, 'button', 29, NULL, NULL);
INSERT INTO `t_permission` VALUES (34, '产品管理-删除', 'product:delete', NULL, 'button', 29, NULL, NULL);
INSERT INTO `t_permission` VALUES (35, '字典管理', NULL, NULL, 'menu', 0, 6, 'Grid');
INSERT INTO `t_permission` VALUES (36, '字典类型', NULL, '/dashboard/dictype', 'menu', 35, 1, 'Postcard');
INSERT INTO `t_permission` VALUES (37, '字典类型-列表', 'dictype:list', NULL, 'button', 36, NULL, NULL);
INSERT INTO `t_permission` VALUES (38, '字典类型-录入', 'dictype:add', NULL, 'button', 36, NULL, NULL);
INSERT INTO `t_permission` VALUES (39, '字典类型-编辑', 'dictype:edit', NULL, 'button', 36, NULL, NULL);
INSERT INTO `t_permission` VALUES (40, '字典类型-查看', 'dictype:view', NULL, 'button', 36, NULL, NULL);
INSERT INTO `t_permission` VALUES (41, '字典类型-删除', 'dictype:delete', NULL, 'button', 36, NULL, NULL);
INSERT INTO `t_permission` VALUES (42, '字典数据', '', '/dashboard/dicvalue', 'menu', 35, 2, 'DataAnalysis');
INSERT INTO `t_permission` VALUES (43, '字典数据-列表', 'dicvalue:list', NULL, 'button', 42, NULL, NULL);
INSERT INTO `t_permission` VALUES (44, '字典数据-录入', 'dicvalue:add', NULL, 'button', 42, NULL, NULL);
INSERT INTO `t_permission` VALUES (45, '字典数据-编辑', 'dicvalue:edit', NULL, 'button', 42, NULL, NULL);
INSERT INTO `t_permission` VALUES (46, '字典数据-查看', 'dicvalue:view', NULL, 'button', 42, NULL, NULL);
INSERT INTO `t_permission` VALUES (47, '字典数据-删除', 'dicvalue:delete', NULL, 'button', 42, NULL, NULL);
INSERT INTO `t_permission` VALUES (48, '用户管理', NULL, NULL, 'menu', 0, 7, 'Stamp');
INSERT INTO `t_permission` VALUES (49, '用户管理', NULL, '/dashboard/user', 'menu', 48, 1, 'User');
INSERT INTO `t_permission` VALUES (50, '用户管理-列表', 'user:list', NULL, 'button', 49, NULL, NULL);
INSERT INTO `t_permission` VALUES (51, '用户管理-录入', 'user:add', NULL, 'button', 49, NULL, NULL);
INSERT INTO `t_permission` VALUES (52, '用户管理-编辑', 'user:edit', NULL, 'button', 49, NULL, NULL);
INSERT INTO `t_permission` VALUES (53, '用户管理-查看', 'user:view', NULL, 'button', 49, NULL, NULL);
INSERT INTO `t_permission` VALUES (54, '用户管理-删除', 'user:delete', NULL, 'button', 49, NULL, NULL);
INSERT INTO `t_permission` VALUES (55, '系统管理', NULL, NULL, 'menu', 0, 8, 'Setting');
INSERT INTO `t_permission` VALUES (56, '系统管理', NULL, '/dashboard/system', 'menu', 55, 1, 'Tools');
INSERT INTO `t_permission` VALUES (57, '系统管理-列表', 'system:list', NULL, 'button', 56, NULL, NULL);
INSERT INTO `t_permission` VALUES (58, '系统管理-录入', 'system:add', NULL, 'button', 56, NULL, NULL);
INSERT INTO `t_permission` VALUES (59, '系统管理-编辑', 'system:edit', NULL, 'button', 56, NULL, NULL);
INSERT INTO `t_permission` VALUES (60, '系统管理-查看', 'system:view', NULL, 'button', 56, NULL, NULL);
INSERT INTO `t_permission` VALUES (61, '系统管理-删除', 'system:delete', NULL, 'button', 56, NULL, NULL);
-- ----------------------------
-- Table structure for t_product
-- ----------------------------
DROP TABLE IF EXISTS `t_product`;
CREATE TABLE `t_product` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,线索ID',
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产品名称',
`guide_price_s` decimal(10, 2) NULL DEFAULT NULL COMMENT '官方指导起始价',
`guide_price_e` decimal(10, 2) NULL DEFAULT NULL COMMENT '官方指导最高价',
`quotation` decimal(10, 2) NULL DEFAULT NULL COMMENT '经销商报价',
`state` int NULL DEFAULT NULL COMMENT '状态 0在售 1售罄',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`create_by` int NULL DEFAULT NULL COMMENT '创建人',
`edit_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '编辑人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_product_ibfk_1`(`create_by` ASC) USING BTREE,
INDEX `t_product_ibfk_2`(`edit_by` ASC) USING BTREE,
CONSTRAINT `t_product_ibfk_1` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_product_ibfk_2` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '产品表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_product
-- ----------------------------
INSERT INTO `t_product` VALUES (1, '海鸥', 10.18, 10.58, 9.28, 0, '2023-04-06 18:25:00', 1, NULL, NULL);
INSERT INTO `t_product` VALUES (2, '比亚迪e2', 10.28, 10.98, 9.78, 0, '2023-04-03 15:26:12', 1, NULL, NULL);
INSERT INTO `t_product` VALUES (3, '比亚迪e3', 15.48, 15.98, 14.38, 0, '2023-04-03 11:29:08', 1, NULL, NULL);
INSERT INTO `t_product` VALUES (4, '海豚', 11.68, 13.68, 10.86, 0, '2023-04-09 10:27:47', 1, NULL, NULL);
INSERT INTO `t_product` VALUES (5, '秦EV', 12.99, 16.98, 11.98, 0, '2023-04-08 15:28:23', 1, NULL, NULL);
INSERT INTO `t_product` VALUES (6, '秦PLUS DM-i', 9.98, 16.58, 9.06, 0, '2023-04-10 19:29:53', 1, NULL, NULL);
INSERT INTO `t_product` VALUES (7, '秦PLUS EV', 12.98, 18.08, 12.38, 0, '2023-04-05 09:30:31', 1, NULL, NULL);
INSERT INTO `t_product` VALUES (8, '海豹', 21.28, 28.98, 20.18, 0, '2023-04-02 10:31:08', 1, NULL, NULL);
INSERT INTO `t_product` VALUES (9, '汉DM', 21.78, 32.18, 19.88, 0, '2023-04-07 16:31:45', 1, NULL, NULL);
INSERT INTO `t_product` VALUES (10, '宋PLUS EV', 18.68, 20.38, 17.86, 0, '2023-03-18 21:33:08', 1, NULL, NULL);
-- ----------------------------
-- Table structure for t_role
-- ----------------------------
DROP TABLE IF EXISTS `t_role`;
CREATE TABLE `t_role` (
`id` int NOT NULL AUTO_INCREMENT,
`role` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_role
-- ----------------------------
INSERT INTO `t_role` VALUES (1, 'admin', '管理员');
INSERT INTO `t_role` VALUES (2, 'saler', '销售员');
INSERT INTO `t_role` VALUES (3, 'manager', '销售经理');
INSERT INTO `t_role` VALUES (4, 'marketing ', '市场营销');
INSERT INTO `t_role` VALUES (5, 'accountant', '会计');
-- ----------------------------
-- Table structure for t_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `t_role_permission`;
CREATE TABLE `t_role_permission` (
`id` int NOT NULL AUTO_INCREMENT,
`role_id` int NULL DEFAULT NULL,
`permission_id` int NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_role_permission_ibfk_1`(`role_id` ASC) USING BTREE,
INDEX `t_role_permission_ibfk_2`(`permission_id` ASC) USING BTREE,
CONSTRAINT `t_role_permission_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `t_role` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_role_permission_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `t_permission` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 77 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色权限关系表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_role_permission
-- ----------------------------
INSERT INTO `t_role_permission` VALUES (1, 1, 1);
INSERT INTO `t_role_permission` VALUES (2, 1, 2);
INSERT INTO `t_role_permission` VALUES (3, 1, 3);
INSERT INTO `t_role_permission` VALUES (4, 1, 4);
INSERT INTO `t_role_permission` VALUES (5, 1, 5);
INSERT INTO `t_role_permission` VALUES (6, 1, 6);
INSERT INTO `t_role_permission` VALUES (7, 1, 7);
INSERT INTO `t_role_permission` VALUES (8, 1, 9);
INSERT INTO `t_role_permission` VALUES (9, 1, 10);
INSERT INTO `t_role_permission` VALUES (10, 1, 12);
INSERT INTO `t_role_permission` VALUES (11, 1, 13);
INSERT INTO `t_role_permission` VALUES (12, 1, 14);
INSERT INTO `t_role_permission` VALUES (13, 1, 15);
INSERT INTO `t_role_permission` VALUES (14, 1, 16);
INSERT INTO `t_role_permission` VALUES (15, 1, 17);
INSERT INTO `t_role_permission` VALUES (16, 1, 18);
INSERT INTO `t_role_permission` VALUES (17, 1, 19);
INSERT INTO `t_role_permission` VALUES (18, 1, 20);
INSERT INTO `t_role_permission` VALUES (19, 1, 21);
INSERT INTO `t_role_permission` VALUES (20, 1, 22);
INSERT INTO `t_role_permission` VALUES (21, 1, 23);
INSERT INTO `t_role_permission` VALUES (22, 1, 24);
INSERT INTO `t_role_permission` VALUES (23, 1, 25);
INSERT INTO `t_role_permission` VALUES (24, 1, 26);
INSERT INTO `t_role_permission` VALUES (25, 1, 27);
INSERT INTO `t_role_permission` VALUES (26, 1, 28);
INSERT INTO `t_role_permission` VALUES (27, 1, 29);
INSERT INTO `t_role_permission` VALUES (28, 1, 30);
INSERT INTO `t_role_permission` VALUES (29, 1, 31);
INSERT INTO `t_role_permission` VALUES (30, 1, 32);
INSERT INTO `t_role_permission` VALUES (31, 1, 33);
INSERT INTO `t_role_permission` VALUES (32, 1, 34);
INSERT INTO `t_role_permission` VALUES (33, 1, 35);
INSERT INTO `t_role_permission` VALUES (34, 1, 36);
INSERT INTO `t_role_permission` VALUES (35, 1, 37);
INSERT INTO `t_role_permission` VALUES (36, 1, 38);
INSERT INTO `t_role_permission` VALUES (37, 1, 39);
INSERT INTO `t_role_permission` VALUES (38, 1, 40);
INSERT INTO `t_role_permission` VALUES (39, 1, 41);
INSERT INTO `t_role_permission` VALUES (40, 1, 42);
INSERT INTO `t_role_permission` VALUES (41, 1, 43);
INSERT INTO `t_role_permission` VALUES (42, 1, 44);
INSERT INTO `t_role_permission` VALUES (43, 1, 45);
INSERT INTO `t_role_permission` VALUES (44, 1, 46);
INSERT INTO `t_role_permission` VALUES (45, 1, 47);
INSERT INTO `t_role_permission` VALUES (46, 1, 48);
INSERT INTO `t_role_permission` VALUES (47, 1, 49);
INSERT INTO `t_role_permission` VALUES (48, 1, 50);
INSERT INTO `t_role_permission` VALUES (49, 1, 51);
INSERT INTO `t_role_permission` VALUES (50, 1, 52);
INSERT INTO `t_role_permission` VALUES (51, 1, 53);
INSERT INTO `t_role_permission` VALUES (52, 1, 54);
INSERT INTO `t_role_permission` VALUES (53, 1, 55);
INSERT INTO `t_role_permission` VALUES (54, 1, 56);
INSERT INTO `t_role_permission` VALUES (55, 1, 57);
INSERT INTO `t_role_permission` VALUES (56, 1, 58);
INSERT INTO `t_role_permission` VALUES (57, 1, 59);
INSERT INTO `t_role_permission` VALUES (58, 1, 60);
INSERT INTO `t_role_permission` VALUES (59, 1, 61);
INSERT INTO `t_role_permission` VALUES (60, 2, 10);
INSERT INTO `t_role_permission` VALUES (61, 2, 12);
INSERT INTO `t_role_permission` VALUES (62, 2, 13);
INSERT INTO `t_role_permission` VALUES (63, 2, 14);
INSERT INTO `t_role_permission` VALUES (64, 2, 15);
INSERT INTO `t_role_permission` VALUES (65, 2, 16);
INSERT INTO `t_role_permission` VALUES (66, 2, 57);
INSERT INTO `t_role_permission` VALUES (67, 2, 18);
INSERT INTO `t_role_permission` VALUES (68, 2, 19);
INSERT INTO `t_role_permission` VALUES (69, 2, 20);
INSERT INTO `t_role_permission` VALUES (70, 2, 21);
INSERT INTO `t_role_permission` VALUES (71, 2, 22);
INSERT INTO `t_role_permission` VALUES (72, 2, 23);
INSERT INTO `t_role_permission` VALUES (73, 2, 24);
INSERT INTO `t_role_permission` VALUES (74, 2, 25);
INSERT INTO `t_role_permission` VALUES (75, 2, 26);
INSERT INTO `t_role_permission` VALUES (76, 2, 27);
-- ----------------------------
-- Table structure for t_system_info
-- ----------------------------
DROP TABLE IF EXISTS `t_system_info`;
CREATE TABLE `t_system_info` (
`id` int NOT NULL AUTO_INCREMENT,
`system_code` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
`name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
`site` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
`logo` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
`title` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
`description` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
`keywords` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
`shortcuticon` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
`tel` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
`weixin` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
`email` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
`address` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
`version` varchar(145) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
`closeMsg` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
`isopen` varchar(8) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'y',
`create_time` datetime NULL DEFAULT NULL,
`create_by` int NULL DEFAULT NULL,
`edit_time` datetime NULL DEFAULT NULL,
`edit_by` int NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_system_info_ibfk_1`(`create_by` ASC) USING BTREE,
INDEX `t_system_info_ibfk_2`(`edit_by` ASC) USING BTREE,
CONSTRAINT `t_system_info_ibfk_1` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_system_info_ibfk_2` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '系统信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_system_info
-- ----------------------------
INSERT INTO `t_system_info` VALUES (1, 'crm', '动力云客系统', 'http://www.bjpowernode.com', 'http://localhost:8080/image/logo.png', '动力云客系统', '动力CRM 企业客户智慧云管理', 'crm, 客户, 客户关系, 客户关系管理', 'http://www.bjpowernode.com/favicon.ico', '010-84846003', '123456789', '123456789@qq.com', '北京市大兴区大族企业湾10栋3层', '系统版本:1.1.0.bate', '网站维护中 动力云客系统 http://www.bjpowernode.com', 'true', '2023-11-08 13:28:18', 1, NULL, NULL);
INSERT INTO `t_system_info` VALUES (2, 'call', '动力呼叫系统', 'http://www.bjpowernode.com', 'http://localhost:8080/image/logo.png', '动力呼叫系统', '动力CRM 企业客户智慧云管理', 'crm, 客户, 客户关系, 客户关系管理', 'http://www.bjpowernode.com/favicon.ico', '010-84846003', '123456789', '123456789@qq.com', '北京市大兴区大族企业湾10栋3层', '系统版本:1.1.0.bate', '网站维护中 动力呼叫系统 http://www.bjpowernode.com', 'true', '2023-11-08 13:28:21', 1, NULL, NULL);
-- ----------------------------
-- Table structure for t_tran
-- ----------------------------
DROP TABLE IF EXISTS `t_tran`;
CREATE TABLE `t_tran` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,交易ID',
`tran_no` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易流水号',
`customer_id` int NULL DEFAULT NULL COMMENT '客户ID',
`money` decimal(10, 2) NULL DEFAULT NULL COMMENT '交易金额',
`expected_date` datetime NULL DEFAULT NULL COMMENT '预计成交日期',
`stage` int NULL DEFAULT NULL COMMENT '交易所处阶段',
`description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易描述',
`next_contact_time` datetime NULL DEFAULT NULL COMMENT '下次联系时间',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`create_by` int NULL DEFAULT NULL COMMENT '创建人',
`edit_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '编辑人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_tran_ibfk_1`(`customer_id` ASC) USING BTREE,
INDEX `t_tran_ibfk_2`(`stage` ASC) USING BTREE,
INDEX `t_tran_ibfk_3`(`create_by` ASC) USING BTREE,
INDEX `t_tran_ibfk_4`(`edit_by` ASC) USING BTREE,
CONSTRAINT `t_tran_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `t_customer` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_tran_ibfk_2` FOREIGN KEY (`stage`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_tran_ibfk_3` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_tran_ibfk_4` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '交易表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_tran
-- ----------------------------
INSERT INTO `t_tran` VALUES (5, '202311121932019431', 1, 120000.00, '2023-11-14 00:00:00', 42, '123131', '2023-11-29 00:00:00', '2023-11-12 19:32:02', 1, NULL, NULL);
INSERT INTO `t_tran` VALUES (6, '202311121932019432', 1, 93000.00, '2023-11-12 00:00:00', 12, '123131', '2023-11-29 00:00:00', '2023-11-12 19:32:02', 1, NULL, NULL);
-- ----------------------------
-- Table structure for t_tran_history
-- ----------------------------
DROP TABLE IF EXISTS `t_tran_history`;
CREATE TABLE `t_tran_history` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,交易记录ID',
`tran_id` int NULL DEFAULT NULL COMMENT '交易ID',
`stage` int NULL DEFAULT NULL COMMENT '交易阶段',
`money` decimal(10, 2) NULL DEFAULT NULL COMMENT '交易金额',
`expected_date` datetime NULL DEFAULT NULL COMMENT '交易预计成交时间',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`create_by` int NULL DEFAULT NULL COMMENT '创建人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_tran_history_ibfk_1`(`tran_id` ASC) USING BTREE,
INDEX `t_tran_history_ibfk_2`(`stage` ASC) USING BTREE,
INDEX `t_tran_history_ibfk_3`(`create_by` ASC) USING BTREE,
CONSTRAINT `t_tran_history_ibfk_1` FOREIGN KEY (`tran_id`) REFERENCES `t_tran` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_tran_history_ibfk_2` FOREIGN KEY (`stage`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_tran_history_ibfk_3` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '交易历史记录表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_tran_history
-- ----------------------------
-- ----------------------------
-- Table structure for t_tran_remark
-- ----------------------------
DROP TABLE IF EXISTS `t_tran_remark`;
CREATE TABLE `t_tran_remark` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,交易备注ID',
`tran_id` int NULL DEFAULT NULL COMMENT '交易ID',
`note_way` int NULL DEFAULT NULL COMMENT '跟踪方式',
`note_content` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '跟踪内容',
`create_time` datetime NULL DEFAULT NULL COMMENT '跟踪时间',
`create_by` int NULL DEFAULT NULL COMMENT '跟踪人',
`edit_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '编辑人',
`deleted` int NULL DEFAULT NULL COMMENT '删除状态(0正常,1删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_tran_remark_ibfk_1`(`tran_id` ASC) USING BTREE,
INDEX `t_tran_remark_ibfk_2`(`note_way` ASC) USING BTREE,
INDEX `t_tran_remark_ibfk_3`(`create_by` ASC) USING BTREE,
INDEX `t_tran_remark_ibfk_4`(`edit_by` ASC) USING BTREE,
CONSTRAINT `t_tran_remark_ibfk_1` FOREIGN KEY (`tran_id`) REFERENCES `t_tran` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_tran_remark_ibfk_2` FOREIGN KEY (`note_way`) REFERENCES `t_dic_value` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_tran_remark_ibfk_3` FOREIGN KEY (`create_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_tran_remark_ibfk_4` FOREIGN KEY (`edit_by`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '交易跟踪记录表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_tran_remark
-- ----------------------------
-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键,自动增长,用户ID',
`login_act` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '登录账号',
`login_pwd` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '登录密码',
`name` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '用户姓名',
`phone` varchar(18) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '用户手机',
`email` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '用户邮箱',
`account_no_expired` int NULL DEFAULT NULL COMMENT '账户是否没有过期,0已过期 1正常',
`credentials_no_expired` int NULL DEFAULT NULL COMMENT '密码是否没有过期,0已过期 1正常',
`account_no_locked` int NULL DEFAULT NULL COMMENT '账号是否没有锁定,0已锁定 1正常',
`account_enabled` int NULL DEFAULT NULL COMMENT '账号是否启用,0禁用 1启用',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`create_by` int NULL DEFAULT NULL COMMENT '创建人',
`edit_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
`edit_by` int NULL DEFAULT NULL COMMENT '编辑人',
`last_login_time` datetime NULL DEFAULT NULL COMMENT '最近登录时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `login_act`(`login_act` ASC) USING BTREE,
UNIQUE INDEX `phone`(`phone` ASC) USING BTREE,
UNIQUE INDEX `email`(`email` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 34 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '用户表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_user
-- ----------------------------
INSERT INTO `t_user` VALUES (1, 'admin', '$2a$10$Nlhwhtd0BSCBK95CAifv7eWpCjHloPBMZ3Gaehcc56hRAV3DZALJO', '管理员', '13700000000', 'admin@qq.com', 1, 1, 1, 1, '2023-02-22 09:37:12', NULL, '2023-05-23 00:21:06', NULL, '2023-12-10 21:18:59');
INSERT INTO `t_user` VALUES (2, 'yuyan', '$2a$10$ZzzAd0nDuUGfGSjJDnZIyOaW7mUZkFzsYgOqiF/b07po/BGxBFjJ.', '于嫣', 'null', 'yuyan@163.com', 1, 1, 1, 1, '2023-02-28 12:11:40', NULL, '2023-05-23 00:21:14', NULL, '2023-11-29 20:14:31');
INSERT INTO `t_user` VALUES (3, 'zhangqi', '$2a$10$Q0qTW6QqkabTzFyoilViw..YdrVzZkSKe5RvLmjgPgW/IrcPkBoF.', '张琪', '1362362323', 'zhangqi@qq.com', 1, 1, 1, 1, '2023-03-02 11:37:34', NULL, '2023-05-23 00:21:02', NULL, NULL);
INSERT INTO `t_user` VALUES (4, 'suwanting', '$2a$10$3bambNLTCAKtQn2OXPiHb.f0SzH.MucTiLi6GPT6nQrYpsxsdxaFi', '苏婉婷', NULL, 'suwanting@qq.com', 1, 1, 1, 1, '2023-04-03 15:04:54', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (5, 'wuxiaoxiao', '$2a$10$Lmk5wXYkZzQMFJEcXVZAZegIQhnAm6ONHpz09X/.gbOh5ze5fU6MW', '吴潇潇', NULL, 'wuxiaoxiao@qq.com', 1, 1, 1, 1, '2023-01-27 12:15:26', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (6, 'mengyan', '$2a$10$6zGT7CfeuJ/6jZPk1pAqcuiMYDnCJstrceThGD5DVVOA5XvOP/sQq', '孟岩', NULL, 'mengyan@163.com', 1, 1, 1, 1, '2023-03-19 10:17:28', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (7, 'yuanhuimin', '$2a$10$mbsloGtPV7cDwfAVYxuvLemQRWumZKrDxVZxg4fnbfaocnfZFlYuu', '袁慧敏', NULL, 'yuanhuimin@11.com', 1, 1, 1, 1, '2023-04-11 20:18:50', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (8, 'qinxuwen', '$2a$10$ir8uLlBrPMHRtGiu5Ajkv.UKcRacXWRen7zxelp9iUaco3WhGkJ36', '秦旭文', '13820000000', 'qinxuwen@163.com', 1, 1, 1, 1, '2023-03-19 21:11:37', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (9, 'chengjie', '$2a$10$jQR8yyF/ailGP/zW6G4JOOffzWOXhe02Rgw7MZLfxL.IGFdM3cjM2', '程杰', '13500000000', 'chengjie@qq.com', 1, 1, 1, 1, '2023-04-16 07:16:19', NULL, '2023-04-20 21:42:21', NULL, NULL);
INSERT INTO `t_user` VALUES (10, 'zhouliang', '$2a$10$0yOGdkAcG8JLEcoEmmCnfO8Vp6rcqBnn30k6pGor5Z0.eLMyLEd7.', '周亮', '13800000008', 'zhouliang@163.com', 1, 1, 1, 1, '2023-03-18 13:13:45', NULL, '2023-06-06 00:06:31', NULL, NULL);
INSERT INTO `t_user` VALUES (11, 'zhangwei', '$2a$10$BfOgsdSAZ9VYBOzv692BM.oWGPLktcqhhjU3AaWESkGNRcW484N7O', '张伟', NULL, 'zhangwei@qq.com', 1, 1, 1, 1, '2023-03-06 09:18:23', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (12, 'dengping', '$2a$10$hpN8orfqUFXb.WWbIoZBkOZrr6D8rdSbl/SWXsMQ0zEuqkldlkpW2', '邓萍', NULL, 'dengping@qq.com', 1, 1, 1, 1, '2023-02-19 20:10:58', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (13, 'zhangxing', '$2a$10$uBVDcCCJQvTfoFCjbjwrf.MhyczNNJfCn76jD61CsAgsUlXjXhxzG', '张欣', NULL, 'zhangxing@qq.com', 1, 1, 1, 1, '2023-03-17 12:12:11', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (14, 'zhangmeng', '$2a$10$MMHG2cQh4H4YFbdf48SnyO9IZ78F110x3.7IWGNExrgk2rFmhrd/u', '张萌', NULL, 'zhangmeng@qq.com', 1, 1, 1, 1, '2023-01-13 08:16:02', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (15, 'shixixiang', '$2a$10$zYwq/QfevFPAZxw4b2DkCeQvjVQ52AUU9c4aC0uS0wTJaRr75G74y', '石喜祥', NULL, 'shixixiang@qq.com', 1, 1, 1, 1, '2023-03-10 15:19:49', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (16, 'chengjiuming', '$2a$10$yNN5TcFkM4OqRsKGNM8CNeqAJhRYKQgXVFqbre5lQPicnIXT7THTu', '陈久明', NULL, 'chengjiuming@163.com', 1, 1, 1, 1, '2023-04-09 23:17:37', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (17, 'genghao', '$2a$10$rWHo.vUpJCbqWLGMkPj95O5FlhaQLzro.LY7pVQ/UnVVAdvjEAy0K', '耿浩', NULL, 'genghao@qq.com', 1, 1, 1, 1, '2023-03-19 12:10:22', NULL, '2023-04-10 21:42:21', NULL, NULL);
INSERT INTO `t_user` VALUES (18, 'hanmingyang', '$2a$10$PRMdG7a8nFIN1A3TD584Xe2BZI7Y0mktDL7Wp5lF88E1D1iPijFc6', '韩明洋', NULL, 'hanmingyang@163.com', 1, 1, 1, 1, '2023-02-12 18:13:01', NULL, '2023-04-13 23:43:25', NULL, NULL);
INSERT INTO `t_user` VALUES (19, 'xuyan', '$2a$10$S7MF2dOqFcoOJPqpEH2nu.Muhn2XC0BlBTZ5gAoL3axrQxdJEJNnK', '徐燕', NULL, 'xuyan@qq.com', 1, 1, 1, 1, '2023-03-29 13:16:15', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (20, 'chengjuan', '$2a$10$m1g5cxikApV05pR7Cx4cy.d4sT3efOl6UvDLvH27WzMjtpymQ5ANi', '程娟', NULL, 'chengjuan@qq.com', 1, 1, 1, 1, '2023-02-19 15:12:22', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (21, 'huangxiao', '$2a$10$R/RwQd5.3OxYpSZBLIn8DeeYYNF0vgWCrCR4tcyL.c/HtnuIfBRIK', '黄潇', NULL, 'huangxiao@qq.com', 1, 1, 1, 1, '2023-03-26 22:11:37', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (22, 'yangyuxin', '$2a$10$ucE/By6NLBb4tN5H3CUimOQ2eAtbjXFf2v77SJUPbHXRI9lTF97Ka', '杨雨欣', NULL, 'yangyuxin@163.com', 1, 1, 1, 1, '2023-04-13 18:14:59', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (23, 'xiaojie', '$2a$10$A215.iFSp7/d99X5M6KE.eu5YvA7nJ5vNEJraxmpA8EUYJN6lx9rW', '肖捷', NULL, 'xiaojie@163.com', 1, 1, 1, 1, '2023-02-18 09:19:02', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (32, '111', '$2a$10$A215.iFSp7/d99X5M6KE.eu5YvA7nJ5vNEJraxmpA8EUYJN6lx9rW', '1111', '1111', '111', 1, 1, 1, 1, '2023-04-25 17:42:36', NULL, NULL, NULL, NULL);
INSERT INTO `t_user` VALUES (33, '222', '$2a$10$bBskT77XGhKDt1Oqg4aWseHOR2Yngv/Pozh76FprgM1JWDr6WWuFe', '22', '222', '222', 1, 1, 1, 1, '2023-04-25 17:46:07', NULL, '2023-06-20 22:23:48', NULL, NULL);
-- ----------------------------
-- Table structure for t_user_role
-- ----------------------------
DROP TABLE IF EXISTS `t_user_role`;
CREATE TABLE `t_user_role` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NULL DEFAULT NULL,
`role_id` int NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_user_role_ibfk_1`(`user_id` ASC) USING BTREE,
INDEX `t_user_role_ibfk_2`(`role_id` ASC) USING BTREE,
CONSTRAINT `t_user_role_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `t_user_role_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `t_role` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色关系表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_user_role
-- ----------------------------
INSERT INTO `t_user_role` VALUES (1, 1, 1);
INSERT INTO `t_user_role` VALUES (2, 2, 2);
INSERT INTO `t_user_role` VALUES (3, 3, 2);
INSERT INTO `t_user_role` VALUES (4, 4, 3);
INSERT INTO `t_user_role` VALUES (5, 5, 4);
INSERT INTO `t_user_role` VALUES (6, 6, 5);
SET FOREIGN_KEY_CHECKS = 1;