微信小程序会议OA-后台数据交互(首页)05

news2024/11/18 0:28:01

1.后台准备

 

 

        1.1 pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.7</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.ruojuan</groupId>
    <artifactId>minoa</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>minoa</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>1.8</java.version>
        <fastjson.version>1.2.70</fastjson.version>
        <jackson.version>2.9.8</jackson.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.2.1</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.44</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.mybatis.generator</groupId>
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.2</version>
                <dependencies>
                    <!--使用Mybatis-generator插件不能使用太高版本的mysql驱动 -->
                    <dependency>
                        <groupId>mysql</groupId>
                        <artifactId>mysql-connector-java</artifactId>
                        <version>${mysql.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <overwrite>true</overwrite>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

 

 

        1.2 配置数据资源

        Application.yml

 

spring:
  datasource:
    #type连接池类型 DBCP,C3P0,Hikari,Druid,默认为Hikari
    type: com.zaxxer.hikari.HikariDataSource
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/localhost?useUnicode=true&characterEncoding=UTF-8&useSSL=false
    username: root
    password: 123456
mybatis:
  mapper-locations: classpath*:mapper/*.xml #指定mapper文件位置
  type-aliases-package: com.ruojuan.minoa.model #指定自动生成别名所在包

 

        1.3 mybatis-generate

        1.4 整合mybatis

package com.ruojuan.minoa;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@MapperScan("com.ruojuan.minoa.mapper")
@SpringBootApplication
public class MinoaApplication {

    public static void main(String[] args) {
        SpringApplication.run(MinoaApplication.class, args);
    }

}

 

 

 

2.准备前端得首页的数据

导入数据库:

oapro.sql:

/*
 Navicat Premium Data Transfer

 Source Server         : mysql273
 Source Server Type    : MySQL
 Source Server Version : 50723
 Source Host           : localhost:3306
 Source Schema         : oapro

 Target Server Type    : MySQL
 Target Server Version : 50723
 File Encoding         : 65001

 Date: 02/09/2022 16:46:06
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_oa_data_dict
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_data_dict`;
CREATE TABLE `t_oa_data_dict`  (
  `id` bigint(20) NOT NULL,
  `datasource` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `description` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_data_dict
-- ----------------------------
INSERT INTO `t_oa_data_dict` VALUES (1, 'sys_user_role', '用户角色');
INSERT INTO `t_oa_data_dict` VALUES (2, 'sys_permission_type', '权限类别');
INSERT INTO `t_oa_data_dict` VALUES (3, 'meeting_info_state', '会议状态');
INSERT INTO `t_oa_data_dict` VALUES (4, 'meeting_person_type', '会议人员类别');
INSERT INTO `t_oa_data_dict` VALUES (5, 'meeting_person_result', '会议反馈结果');
INSERT INTO `t_oa_data_dict` VALUES (6, 'meeting_equipment_type', '会议设备类别');

-- ----------------------------
-- Table structure for t_oa_data_item
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_data_item`;
CREATE TABLE `t_oa_data_item`  (
  `id` bigint(11) NOT NULL,
  `datasource` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源标识',
  `code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '据库数存储的值',
  `val` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '该值对应的文本内容'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_data_item
-- ----------------------------
INSERT INTO `t_oa_data_item` VALUES (1, 'sys_user_role', '1', '管理员');
INSERT INTO `t_oa_data_item` VALUES (2, 'sys_user_role', '2', '发起者');
INSERT INTO `t_oa_data_item` VALUES (3, 'sys_user_role', '3', '审批者');
INSERT INTO `t_oa_data_item` VALUES (4, 'sys_user_role', '4', '参与者');
INSERT INTO `t_oa_data_item` VALUES (5, 'sys_user_role', '5', '会议室管理员');
INSERT INTO `t_oa_data_item` VALUES (6, 'sys_permission_type', '1', '菜单');
INSERT INTO `t_oa_data_item` VALUES (7, 'sys_permission_type', '2', '按钮');
INSERT INTO `t_oa_data_item` VALUES (8, 'meeting_info_state', '1', '待审核');
INSERT INTO `t_oa_data_item` VALUES (9, 'meeting_info_state', '2', '驳回');
INSERT INTO `t_oa_data_item` VALUES (10, 'meeting_info_state', '3', '待开');
INSERT INTO `t_oa_data_item` VALUES (11, 'meeting_info_state', '4', '进行中');
INSERT INTO `t_oa_data_item` VALUES (12, 'meeting_info_state', '5', '开启投票');
INSERT INTO `t_oa_data_item` VALUES (13, 'meeting_info_state', '6', '结束会议');
INSERT INTO `t_oa_data_item` VALUES (14, 'meeting_info_state', '0', '取消会议');
INSERT INTO `t_oa_data_item` VALUES (15, 'meeting_person_type', '1', '参会');
INSERT INTO `t_oa_data_item` VALUES (16, 'meeting_person_type', '2', '列席');
INSERT INTO `t_oa_data_item` VALUES (17, 'meeting_person_result', '1', '参加');
INSERT INTO `t_oa_data_item` VALUES (18, 'meeting_person_result', '0', '不参加');
INSERT INTO `t_oa_data_item` VALUES (19, 'meeting_equipment_type', '1', '投影仪');
INSERT INTO `t_oa_data_item` VALUES (20, 'meeting_equipment_type', '2', '麦克风');
INSERT INTO `t_oa_data_item` VALUES (21, 'meeting_equipment_type', '3', '电子版书屏');
INSERT INTO `t_oa_data_item` VALUES (22, 'meeting_equipment_type', '4', '主持台');
INSERT INTO `t_oa_data_item` VALUES (23, 'meeting_equipment_type', '5', '音响');

-- ----------------------------
-- Table structure for t_oa_meeting_feedback
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_feedback`;
CREATE TABLE `t_oa_meeting_feedback`  (
  `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `meetingId` bigint(11) NULL DEFAULT NULL COMMENT '外键:会议表主键\r\n',
  `personType` int(2) NULL DEFAULT NULL COMMENT '人员类别:1参会2列席\r\n',
  `personId` bigint(11) NULL DEFAULT NULL COMMENT '人员ID\r\n',
  `result` int(2) NULL DEFAULT NULL COMMENT '反馈结果:1参加0不参加\r\n',
  `reason` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '不参加的原因\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议通知反馈表\r\n' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_oa_meeting_info
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_info`;
CREATE TABLE `t_oa_meeting_info`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议标题\r\n',
  `content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议内容\r\n',
  `canyuze` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参会人员\r\n',
  `liexize` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '列席人员\r\n',
  `zhuchiren` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主持人\r\n',
  `location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议地点\r\n',
  `startTime` datetime(0) NULL DEFAULT NULL COMMENT '开始时间\r\n',
  `endTime` datetime(0) NULL DEFAULT NULL COMMENT '结束时间\r\n',
  `fujian` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议附件\r\n',
  `state` int(11) NULL DEFAULT NULL COMMENT '状态:0取消会议1待审核2驳回3待开4进行中5开启投票6结束会议,默认值为1\r\n',
  `auditPerson` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审核人\r\n',
  `auditTime` datetime(0) NULL DEFAULT NULL COMMENT '审核时间\r\n',
  `seatPic` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议排座图片地址\r\n',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议信息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_meeting_info
-- ----------------------------
INSERT INTO `t_oa_meeting_info` VALUES (1, '关于张三的人事任命', '张三工作期间表现优秀,经集团公司领导研究,最终一致同意,张三升为就业组长', '2,3,4,5,6,7,8,9,10,11', '23,24', '1', '会议室1', '2022-03-13 00:00:00', NULL, NULL, 1, '1', NULL, NULL, '/upload/qianzi/0e12bf4d-2a37-43d7-a283-9805687eb596.jpg');
INSERT INTO `t_oa_meeting_info` VALUES (2, '关于李四的开除通告', '李四工作期间无故旷工、办公室传递负能量消息,经公司商议,给予开除决定', '11,12,13,14,15,16,17', '23,24', '1', '会议室1', '2022-03-13 00:00:00', NULL, NULL, 1, '1', NULL, NULL, '');
INSERT INTO `t_oa_meeting_info` VALUES (15, '11', '11', '1', '3,2', '1', '会议室2', '2022-03-13 00:00:00', NULL, NULL, 1, NULL, NULL, NULL, NULL);
INSERT INTO `t_oa_meeting_info` VALUES (16, '22', '22', '1', '2,3', '1', '会议室122', '2022-03-13 00:00:00', NULL, NULL, 1, '1', NULL, '/uploads/ef512ab350814002b4330efe81ccbba2.png', NULL);
INSERT INTO `t_oa_meeting_info` VALUES (17, '11', '22', '1', '3,4', '1', '会议室111', '2022-03-13 10:00:00', NULL, NULL, 2, NULL, NULL, '/uploads/06db5bd3b6674b599f7ade2276c03ab7.png', NULL);
INSERT INTO `t_oa_meeting_info` VALUES (18, '11', '22', '1', '3,4', '1', '会议室111', '2022-03-13 11:00:00', NULL, NULL, 1, NULL, NULL, '/uploads/5b91797446a74da19cad0b921ac79ea5.png', NULL);
INSERT INTO `t_oa_meeting_info` VALUES (19, '22', '22', '1', '2,3', '2', '会议室122', '2022-03-13 12:00:00', NULL, NULL, 2, NULL, NULL, '/uploads/851bda19dfaf494f9abaebe5b691e9ad.png', NULL);
INSERT INTO `t_oa_meeting_info` VALUES (20, 'ee', 'ee', '1,2', '3,4,5', '2', '会议室1111', '2022-03-15 09:00:00', '2022-03-15 11:00:00', NULL, 2, '1', NULL, '/uploads/abab715507314fbd8a9dd42e38e6693c.png', '/uploads/e403fa90455747c399b66054ee06b70e.png');

-- ----------------------------
-- Table structure for t_oa_meeting_option
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_option`;
CREATE TABLE `t_oa_meeting_option`  (
  `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `meetingId` bigint(11) NULL DEFAULT NULL COMMENT '会议ID\r\n',
  `optionValue` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '选项标识(A/B/C/D)\r\n',
  `optionText` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '选项描述\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议投票标题选项表\r\n' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_oa_meeting_room
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_room`;
CREATE TABLE `t_oa_meeting_room`  (
  `id` int(11) NOT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议室名称\r\n',
  `equipment` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议设备\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议室信息\r\n' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_oa_meeting_vote
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_vote`;
CREATE TABLE `t_oa_meeting_vote`  (
  `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `optionId` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '选项ID(投票标题选项表的主键)\r\n',
  `personId` bigint(11) NULL DEFAULT NULL COMMENT '投票人员ID\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议投票记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_oa_permission
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_permission`;
CREATE TABLE `t_oa_permission`  (
  `id` bigint(20) NOT NULL DEFAULT 0 COMMENT '权限id',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限名字',
  `description` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限描述',
  `url` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单路径',
  `pid` bigint(20) NULL DEFAULT NULL COMMENT '父权限',
  `ismenu` int(11) NULL DEFAULT 1 COMMENT '是否为菜单 1、菜单  2、按钮',
  `displayno` bigint(20) NULL DEFAULT 0 COMMENT '展现顺序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_permission
-- ----------------------------
INSERT INTO `t_oa_permission` VALUES (1, '系统管理', '系统管理', NULL, -1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (2, '用户管理', '用户管理', 'admin/user/user_list.jsp', 1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (3, '数据字典', '数据字典', 'admin/dict/dict_list.jsp', 1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (4, '会议管理', '会议管理', NULL, -1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (5, '发布会议', '发布会议', 'admin/meeting/meeting_add.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (6, '我的会议', '我的会议', 'admin/meeting/myMeeting.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (7, '我的审批', '我的审批', 'admin/meeting/myAudit.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (8, '代开会议', '代开会议', 'admin/meeting/meeting_info_list.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (10, '所有会议', '所有会议', 'admin/meeting/meeting_info_list.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (11, '会议室管理', '会议室管理', 'admin/meeting/meeting_info_list.jsp', -1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (12, '历史会议', '历史会议', '/bg/listOrder4.jsp', 4, 1, 0);

-- ----------------------------
-- Table structure for t_oa_role
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_role`;
CREATE TABLE `t_oa_role`  (
  `id` int(11) NOT NULL,
  `name` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_role
-- ----------------------------
INSERT INTO `t_oa_role` VALUES (1, '管理员');
INSERT INTO `t_oa_role` VALUES (2, '普通用户');

-- ----------------------------
-- Table structure for t_oa_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_role_permission`;
CREATE TABLE `t_oa_role_permission`  (
  `rid` bigint(20) NULL DEFAULT NULL,
  `pid` bigint(20) NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_role_permission
-- ----------------------------
INSERT INTO `t_oa_role_permission` VALUES (1, 0);
INSERT INTO `t_oa_role_permission` VALUES (1, 1);
INSERT INTO `t_oa_role_permission` VALUES (1, 2);
INSERT INTO `t_oa_role_permission` VALUES (1, 3);
INSERT INTO `t_oa_role_permission` VALUES (1, 4);
INSERT INTO `t_oa_role_permission` VALUES (1, 5);
INSERT INTO `t_oa_role_permission` VALUES (1, 6);
INSERT INTO `t_oa_role_permission` VALUES (1, 7);
INSERT INTO `t_oa_role_permission` VALUES (1, 8);
INSERT INTO `t_oa_role_permission` VALUES (1, 9);
INSERT INTO `t_oa_role_permission` VALUES (2, 10);
INSERT INTO `t_oa_role_permission` VALUES (2, 11);
INSERT INTO `t_oa_role_permission` VALUES (2, 12);
INSERT INTO `t_oa_role_permission` VALUES (2, 13);
INSERT INTO `t_oa_role_permission` VALUES (1, 14);

-- ----------------------------
-- Table structure for t_oa_user
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_user`;
CREATE TABLE `t_oa_user`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名: 唯一键 登陆时使用 禁止修改',
  `pwd` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码:长度6~10位,MD5加密',
  `rid` bigint(20) NULL DEFAULT 2 COMMENT '用户角色:1 管理员 2 发起者 3 审批者 4 参与者 5 会议室管理员',
  `loginName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录名',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 65 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_user
-- ----------------------------
INSERT INTO `t_oa_user` VALUES (1, '唐某', '123', 1, 'admin');
INSERT INTO `t_oa_user` VALUES (2, '陈某', '123', 2, 'cheng');
INSERT INTO `t_oa_user` VALUES (3, '胡某', '123', 2, 'hu');
INSERT INTO `t_oa_user` VALUES (4, '王某', '123', 2, 'wang');
INSERT INTO `t_oa_user` VALUES (5, '潘某', '123', 2, 'pang');
INSERT INTO `t_oa_user` VALUES (6, '李某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (7, '易某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (8, '刘某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (9, '裴某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (10, '行政部经理王某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (11, '后勤部主管刘某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (12, '林科大内务校长文某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (13, '林科大教学部经理唐某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (14, '林科大教质部主管洪某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (15, '民族项目市场部经理李某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (16, '民族项目教质部经理熊樱', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (17, '民族项目教学部经理李某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (18, '卓景京项目市场部经理夏某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (19, '卓景京项目内务校长赵某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (20, '卓景京项目教质部主管周某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (21, '电子科技校区市场部经理姚某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (22, '电子科技校区内务校长田某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (23, '张三', '123', 2, 'zhangsan');
INSERT INTO `t_oa_user` VALUES (24, '李四', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (25, 'aa', '11', 1, 'aa');
INSERT INTO `t_oa_user` VALUES (26, 'aa', '11', 1, '11');
INSERT INTO `t_oa_user` VALUES (27, 'aa', '1', 1, 'bb');
INSERT INTO `t_oa_user` VALUES (28, 'cc', '1', 1, 'cc');
INSERT INTO `t_oa_user` VALUES (29, 'vv', '1', 1, 'vv');
INSERT INTO `t_oa_user` VALUES (30, 'dd', '1', 1, 'dd');
INSERT INTO `t_oa_user` VALUES (35, 'aa', '11', 1, 'aa');
INSERT INTO `t_oa_user` VALUES (36, 'bb', 'bb', 2, 'bb');
INSERT INTO `t_oa_user` VALUES (37, 'cc', 'cc', 2, 'cc');
INSERT INTO `t_oa_user` VALUES (38, 'dd', 'dd', 1, 'dd');
INSERT INTO `t_oa_user` VALUES (39, 'ee', 'ee', 2, 'ee');
INSERT INTO `t_oa_user` VALUES (40, 'vv', 'vv', 2, 'vv');
INSERT INTO `t_oa_user` VALUES (41, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (42, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (43, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (44, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (45, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (46, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (47, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (48, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (49, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (50, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (51, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (52, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (53, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (54, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (55, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (56, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (57, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (58, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (59, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (60, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (61, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (62, '文博', '123', NULL, 'wenbo');
INSERT INTO `t_oa_user` VALUES (63, 'cc', '123', NULL, 'cc');
INSERT INTO `t_oa_user` VALUES (64, 'vv', '123', 1, 'vv');

-- ----------------------------
-- Table structure for wx_user
-- ----------------------------
DROP TABLE IF EXISTS `wx_user`;
CREATE TABLE `wx_user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名称',
  `password` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户密码',
  `gender` tinyint(3) NOT NULL DEFAULT 0 COMMENT '性别:0 未知, 1男, 1 女',
  `birthday` date NULL DEFAULT NULL COMMENT '生日',
  `last_login_time` datetime(0) NULL DEFAULT NULL COMMENT '最近一次登录时间',
  `last_login_ip` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '最近一次登录IP地址',
  `user_level` tinyint(3) NULL DEFAULT 0 COMMENT '用户层级 0 普通用户,1 VIP用户,2 区域代理用户',
  `nickname` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称或网络名称',
  `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户手机号码',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户头像图片',
  `weixin_openid` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信登录openid',
  `status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '0 可用, 1 禁用, 2 注销',
  `add_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除',
  `share_user_id` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `user_name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of wx_user
-- ----------------------------
INSERT INTO `wx_user` VALUES (1, 'of_zY6RGwMfbacRbEngFD4dZMoJ4', 'of_zY6RGwMfbacRbEngFD4dZMoJ4', 0, NULL, '2022-09-02 11:29:55', '0:0:0:0:0:0:0:1', 1, 'donkee', '18008497070', 'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoQicXQBHibRUP4Ix1x5U1FZOcKgYbRrl8UiaaOMTA5J6Lmr0An4ffnAYrqOIPhz6945wNsExOnianAdg/132', 'of_zY6RGwMfbacRbEngFD4dZMoJ4', 0, NULL, NULL, 0, 1);
INSERT INTO `wx_user` VALUES (2, 'of_zY6UTYaWS7tTOfo9XJ9VyiOcc', 'of_zY6UTYaWS7tTOfo9XJ9VyiOcc', 0, NULL, '2022-08-30 21:28:37', '0:0:0:0:0:0:0:1', 2, '测试号🐷', '12066600001', 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJhF2keTvcWiaRPXYTrIkpxYhdRQaLLnQp6AJJUFcCDYNLXe3iaywwJbGIeOrD3LKZE7x6zdOl6Lchg/132', 'of_zY6UTYaWS7tTOfo9XJ9VyiOcc', 0, NULL, NULL, 0, 1);

SET FOREIGN_KEY_CHECKS = 1;

 wx-user-emoji.txt:

DROP TABLE IF EXISTS `wx_user`;
CREATE TABLE `wx_user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名称',
  `password` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户密码',
  `gender` tinyint(3) NOT NULL DEFAULT 0 COMMENT '性别:0 未知, 1男, 1 女',
  `birthday` date NULL DEFAULT NULL COMMENT '生日',
  `last_login_time` datetime(0) NULL DEFAULT NULL COMMENT '最近一次登录时间',
  `last_login_ip` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '最近一次登录IP地址',
  `user_level` tinyint(3) NULL DEFAULT 0 COMMENT '用户层级 0 普通用户,1 VIP用户,2 区域代理用户',
  `nickname` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称或网络名称',
  `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户手机号码',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户头像图片',
  `weixin_openid` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信登录openid',
  `status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '0 可用, 1 禁用, 2 注销',
  `add_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除',
  `share_user_id` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `user_name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Compact;
 

 

 

 

3.Promise

Promise 是异步编程的一种解决方案,比传统的解决方案——回调函数和事件——更合理和更强大。它由社区最早提出和实现,ES6 将其写进了语言标准,统一了用法,原生提供了Promise对象。

所谓Promise,简单说就是一个容器,里面保存着某个未来才会结束的事件(通常是一个异步操作)的结果。从语法上说,Promise 是一个对象,从它可以获取异步操作的消息。Promise 提供统一的 API,各种异步操作都可以用同样的方法进行处理。

  • promise运行中有三个状态:

    • pending: 等待 (进行中) promise一创建出来,就是pending进行中

    • fulfilled: 成功 (已完成), 调用 resolve, 就会将状态从pending改成fulfilled, 且将来就会执行.then

    • rejected: 失败 (拒绝), 调用 reject, 就会将状态从pending改成rejected, 且将来就会执行.catch

  • 注意点:

    • 一旦promise的状态发生变化, 状态就会被凝固

    • 如果再调用reject或resolve,进行状态修改就没有意义了

4.封装request

/**
 * 封装微信的request请求
 */
function request(url, data = {}, method = "GET") {
  return new Promise(function (resolve, reject) {
    wx.request({
      url: url,
      data: data,
      method: method,
      header: {
        'Content-Type': 'application/json',
      },
      success: function (res) {
        if (res.statusCode == 200) {
            resolve(res.data);//会把进行中改变成已成功
        } else {
          reject(res.errMsg);//会把进行中改变成已失败
        }
      },
      fail: function (err) {
        reject(err)
      }
    })
  });
}

5.会议展示

<!--pages/index/index.wxml-->
<!-- <text>pages/index/index.wxml</text> -->
<wxs src="/utils/page.wxs" module="tools" />
<view>
    <swiper autoplay="true" indicator-dots="true" indicator-color="#fff" indicator-active-color="#00f">
        <block wx:for="{{imgSrcs}}" wx:key="text">
            <swiper-item>
                <view>
                    <image src="{{item.img}}" class="swiper-item" />
                </view>
            </swiper-item>
        </block>
    </swiper>
</view>
<view class="mobi-title">
    <text class="mobi-icon"></text>
    <text>会议信息</text>
</view>
<block wx:for-items="{{lists}}" wx:for-item="item" wx:key="item.id">
    <view class="list" data-id="{{item.id}}">
        <view class="list-img">
            <image class="video-img" mode="scaleToFill" src="{{item.image != null ? item.image : '/static/persons/1.jpg'}}"></image>
        </view>
        <view class="list-detail">
            <view class="list-title"><text>{{item.title}}</text></view>
            <view class="list-tag">
                <view class="state">{{tools.getState(item.state)}}</view>
                <view class="join"><text class="list-num">{{tools.getNumber(item.canyuze)}}</text>人报名</view>
            </view>
            <view class="list-info"><text>{{item.location}}</text>|<text>{{tools.formatDate(item.starttime)}}</text></view>
        </view>
    </view>
</block>
<view class="section bottom-line">
        <text>到底啦</text>
</view>
 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/125470.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Charles -抓不到包常见原因之证书过期失效处理方法

当出现环境配置正常但却无法抓包的时候&#xff0c;可能是因为证书失效了&#xff0c;这种情况移除旧证书&#xff0c;安装新的证书即可。 一、判断是否证书过期 iOS手机&#xff1a; 进入&#xff1a;设置 > 通用 > VPN与设备管理 > Charles Proxy CA... > 更多…

劲爆美女来袭,这不得用python高清保存防止她被封禁

前言 大家早好、午好、晚好吖 ❤ ~ 环境使用: Python 3.8 解释器 Pycharm 编辑器 模块使用: requests 数据请求 第三方模块 pip install requests <工具> re <正则表达式模块> 安装python第三方模块: win R 输入 cmd 点击确定, 输入安装命令 pip install 模块…

密码学_AES加密算法

目录 简介 AES的加密过程如下&#xff08;以128位密钥为例&#xff09;&#xff1a; 异或运算 初始变换&#xff08;initial round&#xff09; 字节代换&#xff08;SubBytes&#xff09; 行位移&#xff08;ShiftRows&#xff09; 列混合&#xff08;MixColumns&#x…

Socket套接字(网络编程万字总结-附代码)

文章目录前言一、概念二、分类&#xff08;三类&#xff09;2.1 流套接字&#xff1a;使用传输层TCP协议2.2 数据报套接字&#xff1a;使用传输层UDP协议2.3 原始套接字三、UDP数据报套接字编程3.1 Java数据报套接字通信模型3.2 DatagramSocket API3.2.1 DatagramSocket 构造方…

Shell函数

1、 函数定义 格式一&#xff1a; function name() { Command sequence; } 格式二&#xff1a; name() { Command sequence); } 1、()内是没有参数的&#xff0c;他只是函数定义的固定格式。 2、第八行fun 是函数的调用(第一种方式) 2、 函数传参 1、在Shell中&#xff0c;调用…

Jina 实例秀|基于CLIP模型的跨模态视频搜索

不同于传统的关键词搜索&#xff0c;你不需要给每个视频素材人为地打上标签。使用开源产品 CLIP-as-service&#xff0c;输入画面的描述文本&#xff0c;直接搜索到对应的视频片段。CLIP 是一个强大的模型&#xff0c;能够很好地判别文本和图片是否相关&#xff0c;但将其集成到…

【LeetCode】验证二叉搜索树 [M]

98. 验证二叉搜索树 - 力扣&#xff08;LeetCode&#xff09; 一、题目 给你一个二叉树的根节点 root &#xff0c;判断其是否是一个有效的二叉搜索树。 有效 二叉搜索树定义如下&#xff1a; 节点的左子树只包含 小于 当前节点的数。节点的右子树只包含 大于 当前节点的数。…

微信小程序框架02

目录 1.框架简介 2.视图层 View 2.2 WXML 2.3 WXSS 2.4 JS 3.事件 4.逻辑层 APP service 4.1 生命周期 4.2 页面路由 4.3模块化 1.框架简介 小程序开发框架的目标是通过尽可能简单、高效的方式让开发者可以在微信中开发具有原生 APP 体验的服务。 整个小程序框架系统分为两部…

山东大学机器学习课程资源索引

实验 完整实验代码获取 github repo 【ML实验4】多分类贝叶斯模型 【ML实验5】SVM&#xff08;手写数字识别、核方法&#xff09; 【ML实验6】K-means&#xff08;图像压缩&#xff09; 【ML实验7】人脸识别综合项目&#xff08;PCA、多分类SVM&#xff09; 一个PCA加速技巧 …

数据治理:企业数据治理蓝图

参考《一本书讲透数据治理》、《数据治理》等 文章目录企业数据治理体系企业数据治理9个要素企业数据治理4个层面企业数据治理之道企业数据治理之法企业数据治理之术企业数据治理之器企业数据治理体系 数据治理、数据管理、数据管控三者是什么关系&#xff1f;很多人都搞混&am…

【Spring(二)】IoC入门案例(XML版)

文章目录前言1.IoC入门案例总结前言 上篇文章我们讲了IOC和DI两个核心概念&#xff0c;本篇文章我们会在Spring的环境下来实现它们&#x1f4aa;&#x1f4aa;。 1.IoC入门案例 我们先来实现IoC也就是管理Bean的这套模式&#xff0c;我们先来说说这套程序应该怎么做&#xff0c…

深度学习Week12-训练自己的数据集(YOLOv5)

这周接着详细解析小白YOLOv5全流程-训练实现数字识别_牛大了2022的博客-CSDN博客_yolov5识别数字&#xff0c;上周入门教大家下载配置环境&#xff0c;如果没有的话请参考上周的文章深度学习Week11-调用官方权重进行检测&#xff08;YOLOv5&#xff09;_牛大了2022的博客-CSDN博…

《IDC MarketScape:2022全球通用计算机视觉厂商评估》出炉,腾讯云智能入选

近日&#xff0c;全球领先的IT市场研究和咨询公司IDC发布了2022年度《MarketScape&#xff1a;全球通用计算机视觉厂商评估》报告&#xff08;以下简称“报告”&#xff09;&#xff0c;腾讯云智能凭借在计算机视觉领域领先的技术积累、出色的产品能力和丰富的行业落地实践&…

案例分享:硬件敏捷

“没有人能够在硬件领域推动以两周为单位的循环迭代&#xff01;”当人们谈起敏捷方法在包含了硬件及软件产品开发时&#xff0c;第一反应都是类似的论调。然而&#xff0c;已经有一些团队&#xff0c;尝试将已有的可靠硬件开发理念与少量从敏捷软件中借鉴的新鲜思想结合&#…

系统日志- Journal and Rsyslog

Log文件 Rsyslog 的配置文件/etc/rsyslog.conf Rsyslog的旧的信息会在最前面&#xff0c;新的信息会在最下面。 tail -f /var/log/messages #可以动态监控日志信息logger 发送日志信息 logger -p user.notice #“内容” -p选项测试实验&#xff1a; 1.在/etc/rsyslog.d/文…

基于ThinkPHP框架开发的全套家政服务小程序源码(带调试视频)

家政服务小程序源码 在线派单 商家入驻 多城市带积分开源小程序 了解更多内容可私信我。 1、独立版 ThinkPHP框架 后端全开源&#xff1b; 2. 开发语言&#xff1a;PHP&#xff1b; 3. 数据库&#xff1a;MySQL&#xff1b; 4.小程序端&#xff1a;Uniapp&#xff1b; 5.…

Vuex基础概念用法(新手入门)

一.Vuex概念及解释 定义: vue全局状态管理器。有了Vuex在任意组件/页面都可以访问vuex数据&#xff0c;当数据更新的时候&#xff0c;引用vuex的组件视图会自动更新。也就是说Vuex实现数据全局共享&#xff0c;响应式更新。 1.state&#xff08;存放状态&#xff09; $store…

《flask》flask+mqtt联动快速上手

简介 本文旨在介绍如何快速上手联动flask mqtt&#xff0c;本文将会给出一个简单的demo&#xff0c;用于演示在如何通过访问flask接口来触发mqtt&#xff0c;并在flask运行的基础的上对mqtt进行订阅。 快速上手 因为有项目需求&#xff0c;所以需要flask mqtt进行联动&…

Docker网络中篇-docker网络的四种类型

通过上一篇学习,我们对docker网络有了初步的了解。本篇,咱们就来实战docker网络。 docker网络实战 实战docker网络,我们将从以下几个案例来讲解 1:birdge是什么? 2:host 3:none 4:container 实战网络类型如下: 在docker中,网络的配置是以json格式存在的,下面…

知识变现创业者必读——《知识变现实操手册》

现在越来越多人&#xff0c;正在跑步进入知识变现创业这个赛道。 为什么进入这个赛道&#xff0c;因为能赚钱钱啊&#xff0c;大部分人是受到了知识变现大咖们日入万元&#xff0c;月入十万&#xff0c;这些赚钱效益的刺激&#xff0c;匆忙进入的。 我问一句&#xff0c;你知识…