第24讲投票管理实现

投票管理实现

在这里插入图片描述
后端:

package com.java1234.controller;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.java1234.entity.*;
import com.java1234.service.IVoteDetailService;
import com.java1234.service.IVoteItemService;
import com.java1234.service.IVoteService;
import com.java1234.service.WxUserInfoService;
import com.java1234.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;import java.util.HashMap;
import java.util.List;
import java.util.Map;/*** 投票Controller控制器* @author java1234_小锋 (公众号:java1234)* @site www.java1234.vip* @company 南通小锋网络科技有限公司*/
@RestController
@RequestMapping("/business/vote")
public class VoteController {@Autowiredprivate IVoteService voteService;@Autowiredprivate IVoteItemService voteItemService;@Autowiredprivate IVoteDetailService voteDetailService;@Autowiredprivate WxUserInfoService wxUserInfoService;/*** 根据条件分页查询投票信息* @param pageBean* @return*/@PostMapping("/list")@PreAuthorize("hasAuthority('business:vote:list')")public R list(@RequestBody PageBean pageBean){String query=pageBean.getQuery().trim();Page<Vote> pageResult = voteService.page(new Page<>(pageBean.getPageNum(), pageBean.getPageSize()), new QueryWrapper<Vote>().like(StringUtil.isNotEmpty(query), "title", query));List<Vote> voteList = pageResult.getRecords();for(Vote vote:voteList){// 根据openid获取投票人信息WxUserInfo wxUserInfo = wxUserInfoService.getOne(new QueryWrapper<WxUserInfo>().eq("openid", vote.getOpenid()));// 获取投票选项List<VoteItem> voteItemList = voteItemService.list(new QueryWrapper<VoteItem>().eq("vote_id", vote.getId()));vote.setVoteItemList(voteItemList);vote.setWxUserInfo(wxUserInfo);}Map<String,Object> resultMap=new HashMap<>();resultMap.put("voteList",voteList);resultMap.put("total",pageResult.getTotal());return R.ok(resultMap);}/*** 删除指定id的投票信息* @param id* @return*/@GetMapping("/delete/{id}")@Transactional@PreAuthorize("hasAuthority('business:vote:delete')")public R delete(@PathVariable(value = "id")Integer id){voteDetailService.remove(new QueryWrapper<VoteDetail>().eq("vote_id",id)); // 删除用户投票详情voteItemService.remove(new QueryWrapper<VoteItem>().eq("vote_id",id)); // 删除投票选项voteService.removeById(id); // 删除投票return R.ok();}}

前端:

<template><div class="app-container"><el-row :gutter="20" class="header"><el-col :span="7"><el-input placeholder="请输入标题..." v-model="queryForm.query" clearable ></el-input></el-col><el-button type="primary" :icon="Search" @click="initVoteList">搜索</el-button></el-row><el-table :data="tableData" stripe style="width: 100%" ><el-table-column prop="id" label="编号"  width="80" align="center"/><el-table-column prop="title" label="标题"  align="center"/><el-table-column prop="openid" label="投票人" width="250" ><template v-slot="scope"><img :src="getServerUrl()+'image/weixinAvatar/'+scope.row.wxUserInfo.avatarUrl" width="50" height="50"/>&nbsp;&nbsp;{{scope.row.wxUserInfo.nickName}}</template></el-table-column><el-table-column  label="投票选项" width="100" align="center"><template v-slot="scope"><el-popover placement="left" :width="400" trigger="click" @show="getItemList(scope.row)"><template #reference><el-button  type="success">查看</el-button></template><el-table :data="voteItemList" ><el-table-column type="index" label="序号" align="left" width="50" /><el-table-column  property="name" label="选项名称" /></el-table></el-popover></template></el-table-column><el-table-column prop="voteEndTime" label="投票截止时间" width="200" align="center"/><el-table-column prop="action" label="操作" width="100" fixed="right" align="center"><template v-slot="scope" ><el-popconfirm   title="您确定要删除这条记录吗?" @confirm="handleDelete(scope.row.id)"><template #reference><el-button  type="danger" :icon="Delete" v-if="hasAuth('business:vote:delete')"/></template></el-popconfirm></template></el-table-column></el-table><el-paginationv-model:currentPage="queryForm.pageNum"v-model:page-size="queryForm.pageSize":page-sizes="[10, 20, 30, 40]"layout="total, sizes, prev, pager, next, jumper":total="total"@size-change="handleSizeChange"@current-change="handleCurrentChange"/></div></template><script setup>
import {ref} from 'vue';
import requestUtil,{getServerUrl} from "@/util/request";
import { Search ,Delete,DocumentAdd ,Edit, Tools, RefreshRight} from '@element-plus/icons-vue'import { ElMessage, ElMessageBox } from 'element-plus'const tableData=ref({})const total=ref(0)const queryForm=ref({query:'',pageNum:1,pageSize:10
})const id=ref(-1)const voteItemList=ref([])const initVoteList=async()=>{const res=await requestUtil.post("business/vote/list",queryForm.value);tableData.value=res.data.voteList;total.value=res.data.total;
}initVoteList();const handleSizeChange=(pageSize)=>{queryForm.value.pageNum=1;queryForm.value.pageSize=pageSize;initVoteList();
}const handleCurrentChange=(pageNum)=>{queryForm.value.pageNum=pageNum;initVoteList();
}const getItemList=(row)=>{console.log("row="+JSON.stringify(row))voteItemList.value=row.voteItemList;}const handleDelete=async (id)=>{const res=await requestUtil.get("business/vote/delete/"+id)if(res.data.code==200){ElMessage({type: 'success',message: '执行成功!'})initVoteList();}else{ElMessage({type: 'error',message: res.data.msg,})}
}</script><style lang="scss" scoped>.header{padding-bottom: 16px;box-sizing: border-box;
}.el-pagination{float: right;padding: 20px;box-sizing: border-box;
}::v-deep th.el-table__cell{word-break: break-word;background-color: #f8f8f9 !important;color: #515a6e;height: 40px;font-size: 13px;}.el-tag--small {margin-left: 5px;
}
</style>
/*
SQLyog Ultimate v11.33 (64 bit)
MySQL - 5.7.18-log : Database - db_vote3
*********************************************************************
*//*!40101 SET NAMES utf8 */;/*!40101 SET SQL_MODE=''*/;/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`db_vote3` /*!40100 DEFAULT CHARACTER SET utf8 */;USE `db_vote3`;/*Table structure for table `sys_menu` */DROP TABLE IF EXISTS `sys_menu`;CREATE TABLE `sys_menu` (`id` bigint(20) DEFAULT NULL,`name` varchar(150) DEFAULT NULL,`icon` varchar(300) DEFAULT NULL,`parent_id` bigint(20) DEFAULT NULL,`order_num` int(11) DEFAULT NULL,`path` varchar(600) DEFAULT NULL,`component` varchar(765) DEFAULT NULL,`menu_type` char(3) DEFAULT NULL,`perms` varchar(300) DEFAULT NULL,`create_time` datetime DEFAULT NULL,`update_time` datetime DEFAULT NULL,`remark` varchar(1500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `sys_menu` */insert  into `sys_menu`(`id`,`name`,`icon`,`parent_id`,`order_num`,`path`,`component`,`menu_type`,`perms`,`create_time`,`update_time`,`remark`) values (1,'系统管理','system',0,1,'/sys','','M','','2022-07-04 14:56:29','2022-07-04 14:56:31','系统管理目录'),(2,'业务管理','monitor',0,2,'/bsns','','M','','2022-07-04 14:59:43','2022-07-04 14:59:45','业务管理目录'),(3,'用户管理','user',1,1,'/sys/user','sys/user/index','C','system:user:list','2022-07-04 15:20:51','2022-07-04 15:20:53','用户管理菜单'),(4,'角色管理','peoples',1,2,'/sys/role','sys/role/index','C','system:role:list','2022-07-04 15:23:35','2022-07-04 15:23:39','角色管理菜单'),(5,'菜单管理','tree-table',1,3,'/sys/menu','sys/menu/index','C','system:menu:list','2022-07-04 15:23:41','2022-07-04 15:23:43','菜单管理菜单'),(6,'部门管理','tree',2,4,'/bsns/department','bsns/Department','C','','2022-07-04 23:24:40','2023-04-30 08:27:33','部门管理菜单'),(7,'岗位管理','post',2,3,'/bsns/post','bsns/Post','C','','2022-07-04 23:24:42','2023-04-30 08:27:41','岗位管理菜单'),(8,'用户新增','#',3,2,'','','F','system:user:add','2022-07-04 15:24:42','2022-07-04 15:24:46','添加用户按钮'),(9,'用户修改','#',3,3,'','','F','system:user:edit','2022-07-04 15:24:42','2022-07-04 15:24:46','修改用户按钮'),(10,'用户删除','#',3,4,'','','F','system:user:delete','2022-07-04 15:24:42','2022-07-04 15:24:46','删除用户按钮'),(11,'分配角色','#',3,5,'','','F','system:user:role','2022-07-04 15:24:42','2022-07-04 15:24:46','分配角色按钮'),(12,'重置密码','#',3,6,'','','F','system:user:resetPwd','2022-07-04 15:24:42','2022-07-04 15:24:46','重置密码按钮'),(13,'角色新增','#',4,2,'','','F','system:role:add','2022-07-04 15:24:42','2022-07-04 15:24:46','添加用户按钮'),(14,'角色修改','#',4,3,'','','F','system:role:edit','2022-07-04 15:24:42','2022-07-04 15:24:46','修改用户按钮'),(15,'角色删除','#',4,4,'',NULL,'F','system:role:delete','2022-07-04 15:24:42','2022-07-04 15:24:46','删除用户按钮'),(16,'分配权限','#',4,5,'','','F','system:role:menu','2022-07-04 15:24:42','2022-07-04 15:24:46','分配权限按钮'),(17,'菜单新增','#',5,2,'',NULL,'F','system:menu:add','2022-07-04 15:24:42','2022-07-04 15:24:46','添加菜单按钮'),(18,'菜单修改','#',5,3,'',NULL,'F','system:menu:edit','2022-07-04 15:24:42','2022-07-04 15:24:46','修改菜单按钮'),(19,'菜单删除','#',5,4,'',NULL,'F','system:menu:delete','2022-07-04 15:24:42','2022-07-04 15:24:46','删除菜单按钮'),(20,'用户查询','#',3,1,'',NULL,'F','system:user:query','2022-07-04 15:24:42','2022-07-04 15:24:46','用户查询按钮'),(21,'角色查询','#',4,1,'',NULL,'F','system:role:query','2022-07-04 15:24:42','2022-07-04 15:24:46','角色查询按钮'),(22,'菜单查询','#',5,1,'',NULL,'F','system:menu:query','2022-07-04 15:24:42','2022-07-04 15:24:46','菜单查询按钮'),(33,'测速22','122',3,3,'','34','M','33','2022-08-19 03:11:20','2022-08-18 19:11:33',NULL),(34,'微信用户管理','weixin2',2,1,'/bsns/weixin','bsns/weixin/index','C','business:wxUser:list','2023-04-30 08:27:19',NULL,NULL),(35,'投票管理','vote3',2,2,'/bsns/vote','bsns/vote/index','C','business:vote:list','2023-04-30 08:31:17',NULL,NULL),(36,'微信用户查询','',34,1,'','','F','business:wxUser:query','2023-04-30 15:06:33',NULL,NULL),(37,'微信用户修改','',34,1,'','','F','business:wxUser:edit','2023-04-30 15:06:57',NULL,NULL),(38,'投票查询','',35,1,'','','F','business:vote:query','2023-05-01 08:06:01',NULL,NULL),(39,'投票删除','',35,2,'','','F','business:vote:delete','2023-05-01 16:06:28','2023-05-01 08:06:36',NULL);/*Table structure for table `sys_role` */DROP TABLE IF EXISTS `sys_role`;CREATE TABLE `sys_role` (`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色主键ID',`name` varchar(30) DEFAULT NULL COMMENT '角色名称',`code` varchar(100) DEFAULT NULL COMMENT '角色权限字符串',`create_time` datetime DEFAULT NULL COMMENT '创建时间',`update_time` datetime DEFAULT NULL COMMENT '更新时间',`remark` varchar(500) DEFAULT NULL COMMENT '备注',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;/*Data for the table `sys_role` */insert  into `sys_role`(`id`,`name`,`code`,`create_time`,`update_time`,`remark`) values (1,'超级管理员','admin','2022-07-04 14:40:44','2022-07-04 14:40:47','拥有系统最高权限'),(2,'普通角色','common','2022-07-04 14:41:56','2022-07-04 14:41:58','普通角色'),(3,'测试角色','test3','2022-07-04 14:42:24','2022-07-04 14:42:27','测试角色'),(4,'2',NULL,NULL,NULL,NULL),(6,'4',NULL,NULL,NULL,NULL),(17,'0',NULL,NULL,NULL,NULL),(19,'测2','cc2','2022-08-13 21:06:21','2022-08-13 13:06:27','eewew2'),(20,'ccc测试','test2','2022-08-29 17:10:33',NULL,'xxx'),(21,'今天测试角色','todytest','2022-08-29 22:01:11',NULL,'ccc'),(22,'ttt测','t11','2022-11-20 18:27:10','2022-11-20 10:27:24','tce测试');/*Table structure for table `sys_role_menu` */DROP TABLE IF EXISTS `sys_role_menu`;CREATE TABLE `sys_role_menu` (`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色菜单主键ID',`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',`menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=316 DEFAULT CHARSET=utf8;/*Data for the table `sys_role_menu` */insert  into `sys_role_menu`(`id`,`role_id`,`menu_id`) values (15,3,2),(16,3,6),(17,3,7),(21,7,1),(22,7,2),(23,7,6),(24,7,7),(25,6,1),(26,6,3),(27,6,9),(28,6,10),(29,19,1),(30,19,3),(31,19,2),(32,19,6),(208,20,1),(209,20,3),(210,20,20),(211,20,8),(212,20,9),(213,20,33),(214,20,10),(215,20,11),(216,20,4),(217,20,21),(218,20,13),(219,20,5),(220,20,22),(221,20,17),(222,20,18),(223,20,2),(224,20,6),(225,20,7),(232,21,1),(233,21,9),(234,21,4),(235,21,21),(236,21,2),(237,21,6),(238,21,7),(251,4,1),(252,4,2),(253,4,6),(254,4,7),(273,2,1),(274,2,3),(275,2,20),(276,2,8),(277,2,4),(278,2,21),(279,2,13),(280,2,15),(281,2,5),(282,2,22),(283,2,18),(284,2,19),(285,2,2),(286,2,6),(287,2,7),(288,1,1),(289,1,3),(290,1,20),(291,1,8),(292,1,9),(293,1,10),(294,1,11),(295,1,12),(296,1,4),(297,1,21),(298,1,13),(299,1,14),(300,1,15),(301,1,16),(302,1,5),(303,1,22),(304,1,17),(305,1,18),(306,1,19),(307,1,2),(308,1,34),(309,1,36),(310,1,37),(311,1,35),(312,1,38),(313,1,39),(314,1,7),(315,1,6);/*Table structure for table `sys_user` */DROP TABLE IF EXISTS `sys_user`;CREATE TABLE `sys_user` (`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID',`username` varchar(100) DEFAULT NULL COMMENT '用户名',`password` varchar(100) DEFAULT NULL COMMENT '密码',`avatar` varchar(255) DEFAULT 'default.jpg' COMMENT '用户头像',`email` varchar(100) DEFAULT '' COMMENT '用户邮箱',`phonenumber` varchar(11) DEFAULT '' COMMENT '手机号码',`login_date` datetime DEFAULT NULL COMMENT '最后登录时间',`status` char(1) DEFAULT '0' COMMENT '帐号状态(0正常 1停用)',`create_time` datetime DEFAULT NULL COMMENT '创建时间',`update_time` datetime DEFAULT NULL COMMENT '更新时间',`remark` varchar(500) DEFAULT NULL COMMENT '备注',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;/*Data for the table `sys_user` */insert  into `sys_user`(`id`,`username`,`password`,`avatar`,`email`,`phonenumber`,`login_date`,`status`,`create_time`,`update_time`,`remark`) values (1,'java1234','$2a$10$cLJkZ.VSAWw0g5fcYSs1Peuxwhalqrmkk9cnnWcXoJl6rzxld9bjS','20221012090919000000959.jpg','caofeng4012@126.com','18862857412','2022-08-29 22:10:52','0','2022-06-09 08:47:52','2022-10-12 09:10:33','备注'),(2,'common','$2a$10$tiArwm0GxChyEP5k0JGzsOuzyY15IKA.ZTl8S2aj3haYlKAfpwfl.','222.jpg','','','2022-08-22 21:34:39','0',NULL,NULL,NULL),(3,'test','$2a$10$tiArwm0GxChyEP5k0JGzsOuzyY15IKA.ZTl8S2aj3haYlKAfpwfl.','333.jpg','','','2022-07-24 17:36:07','0',NULL,NULL,NULL),(4,'1','$2a$10$lD0Fx7oMsFFmX9hVkmYy7eJteH8pBaXXro1X9DEMP5sbM.Z6Co55m','default.jpg','','',NULL,'1',NULL,NULL,NULL),(5,'2',NULL,'default.jpg','','',NULL,'1',NULL,NULL,NULL),(15,'fdsfs','$2a$10$AQVcp4hQ7REc5o7ztVnI7eX.sJdcYy3d1x2jm5CfrcCoMZMPacfpi','default.jpg','fdfa4@qq.com','18862851414','2022-08-02 02:22:45','1','2022-08-02 02:21:24','2022-08-01 18:23:16','fdfds4'),(28,'sdfss2','$2a$10$7aNJxwVmefI0XAk64vrzYuOqeeImYJUQnoBrtKP9pLTGTWO2CXQ/y','default.jpg','dfds3@qq.com','18862857413',NULL,'1','2022-08-07 00:42:46','2022-08-06 16:43:04','ddd33'),(29,'ccc','$2a$10$7cbWeVwDWO9Hh3qbJrvTHOn0E/DLYXxnIZpxZei0jY4ChfQbJuhi.','20220829080150000000341.jpg','3242@qq.com','18862584120','2022-08-29 19:52:27','0','2022-08-29 17:04:58',NULL,'xxx'),(30,'ccc666','$2a$10$Tmw5VCM/K2vb837AZDYHQOqE3gPiRZKevxLsh/ozndpTSjdwABqaK','20220829100454000000771.jpg','fdafds@qq.com','18865259845','2022-08-29 22:05:18','0','2022-08-29 22:00:39',NULL,'ccc'),(31,'1',NULL,'default.jpg','','',NULL,'0',NULL,NULL,NULL),(32,'2',NULL,'default.jpg','','',NULL,'0',NULL,NULL,NULL),(37,'common2','$2a$10$JpPa1JOQyrP1iRg.QnMmxuvAn.6J55QB5yd3nF1TpQuXGUJ5eOei.','default.jpg','dfs2@qq.com','15525462582',NULL,'1','2022-10-20 00:37:24','2022-10-20 08:48:47','xxx2'),(38,'ccc2','$2a$10$ZN9MoJwJsU36TJ27qXdmrel/FcXSDbczAVIUAS5I3GT8dIIHr74Wu','default.jpg','2@qq.com','15562854120',NULL,'0','2022-11-22 21:58:23',NULL,'111'),(39,'ccc2','$2a$10$eIsxbV4CIcxclMcp/da31en.RIUGeuYYFIF7pNhvTmkbONxCd4xVi','default.jpg','2@qq.com','15562854120',NULL,'0','2022-11-22 21:59:31',NULL,'111');/*Table structure for table `sys_user_role` */DROP TABLE IF EXISTS `sys_user_role`;CREATE TABLE `sys_user_role` (`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户角色主键ID',`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;/*Data for the table `sys_user_role` */insert  into `sys_user_role`(`id`,`user_id`,`role_id`) values (1,1,1),(2,2,2),(4,1,2),(6,3,3),(7,3,2),(9,4,3),(10,5,3),(11,15,3),(20,29,20),(21,30,17),(22,30,21);/*Table structure for table `t_vote` */DROP TABLE IF EXISTS `t_vote`;CREATE TABLE `t_vote` (`id` int(11) NOT NULL AUTO_INCREMENT,`title` varchar(600) DEFAULT NULL,`explanation` varchar(3000) DEFAULT NULL,`cover_image` varchar(600) DEFAULT NULL,`vote_end_time` datetime DEFAULT NULL,`openid` varchar(600) DEFAULT NULL,`type` int(11) DEFAULT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;/*Data for the table `t_vote` */insert  into `t_vote`(`id`,`title`,`explanation`,`cover_image`,`vote_end_time`,`openid`,`type`) values (2,'1','2','20230517045026000000236.jpg','2023-05-20 16:50:22','o30ur5JpAsAUyGBkR0uW4IxvahR8',2),(4,'1','2','20230521102103000000159.jpg','2023-05-22 10:20:32','o30ur5JpAsAUyGBkR0uW4IxvahR8',1),(5,'www','1','20230521123953000000327.jpg','2023-05-22 12:39:50','o30ur5JpAsAUyGBkR0uW4IxvahR8',1),(6,'1','2','20230522085421000000169.jpg','2023-05-23 20:54:17','o30ur5JpAsAUyGBkR0uW4IxvahR8',1);/*Table structure for table `t_vote_detail` */DROP TABLE IF EXISTS `t_vote_detail`;CREATE TABLE `t_vote_detail` (`id` int(11) NOT NULL AUTO_INCREMENT,`vote_id` int(11) DEFAULT NULL,`vote_item_id` int(11) DEFAULT NULL,`vote_date` datetime DEFAULT NULL,`openid` varchar(600) DEFAULT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;/*Data for the table `t_vote_detail` */insert  into `t_vote_detail`(`id`,`vote_id`,`vote_item_id`,`vote_date`,`openid`) values (2,2,3,'2023-05-20 12:09:39','o30ur5JpAsAUyGBkR0uW4IxvahR8'),(3,4,9,'2023-05-21 10:21:27','o30ur5JpAsAUyGBkR0uW4IxvahR8'),(5,4,9,'2023-05-21 10:49:14','o30ur5PiPOr52bBsetXcIV93NL-U'),(6,5,10,'2023-05-21 12:40:14','o30ur5JpAsAUyGBkR0uW4IxvahR8');/*Table structure for table `t_vote_item` */DROP TABLE IF EXISTS `t_vote_item`;CREATE TABLE `t_vote_item` (`id` int(11) NOT NULL AUTO_INCREMENT,`vote_id` int(11) DEFAULT NULL,`name` varchar(600) DEFAULT NULL,`image` varchar(600) DEFAULT NULL,`number` int(11) DEFAULT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;/*Data for the table `t_vote_item` */insert  into `t_vote_item`(`id`,`vote_id`,`name`,`image`,`number`) values (3,2,'1','20230517045034000000735.jpg',1),(4,2,'2','20230517045037000000283.jpg',0),(5,2,'长城','20230517045042000000183.jpg',0),(8,4,'1',NULL,1),(9,4,'2',NULL,2),(10,5,'1',NULL,1),(11,5,'2',NULL,0),(12,6,'1',NULL,0),(13,6,'2',NULL,0);/*Table structure for table `t_wxuserinfo` */DROP TABLE IF EXISTS `t_wxuserinfo`;CREATE TABLE `t_wxuserinfo` (`id` int(11) NOT NULL AUTO_INCREMENT,`openid` varchar(90) DEFAULT NULL,`nick_name` varchar(150) DEFAULT NULL,`avatar_url` varchar(600) DEFAULT NULL,`register_date` datetime DEFAULT NULL,`last_login_date` datetime DEFAULT NULL,`status` char(3) DEFAULT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;/*Data for the table `t_wxuserinfo` */insert  into `t_wxuserinfo`(`id`,`openid`,`nick_name`,`avatar_url`,`register_date`,`last_login_date`,`status`) values (7,'o30ur5PiPOr52bBsetXcIV93NL-U','小锋四号@java1234','20230410102248000000487.jpg','2023-04-10 10:21:30','2023-05-21 10:23:32','0'),(9,'o30ur5JpAsAUyGBkR0uW4IxvahR0','微信用户','default.png','2023-04-30 07:42:19','2023-04-30 07:42:19','0'),(10,'1',NULL,NULL,NULL,NULL,'1'),(11,'2',NULL,NULL,NULL,NULL,'1'),(12,'3',NULL,NULL,NULL,NULL,'1'),(13,'4',NULL,NULL,NULL,NULL,'1'),(14,'5',NULL,NULL,NULL,NULL,'1'),(15,'6',NULL,NULL,NULL,NULL,'1'),(16,'7',NULL,NULL,NULL,NULL,'1'),(17,'8',NULL,NULL,NULL,NULL,'1'),(19,'o30ur5JpAsAUyGBkR0uW4IxvahR8','小锋111@java1234','20230514112056000000757.jpeg','2023-05-11 08:44:11','2023-05-22 20:56:48','0');/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

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

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

LabVIEW高效电磁阀性能测试

LabVIEW高效电磁阀性能测试 在核电站的安全运营中&#xff0c;电磁阀作为关键组件&#xff0c;其性能的可靠性至关重要。设计一套基于LabVIEW的电磁阀测试平台&#xff0c;既能精准测试电磁阀的多项性能指标&#xff0c;又能提高检修效率与准确性&#xff0c;进而保障核电站的…

WebSocket | 基于TCP的全双工通信网络协议

文章目录 1、介绍2、示例2.1、分析2.2、代码开发2.3、功能测试 ​&#x1f343;作者介绍&#xff1a;双非本科大三网络工程专业在读&#xff0c;阿里云专家博主&#xff0c;专注于Java领域学习&#xff0c;擅长web应用开发、数据结构和算法&#xff0c;初步涉猎Python人工智能开…

【超级干货】ArcGIS_空间连接_工具详解

帮助里对空间连接的解释&#xff1a; 根据空间关系将一个要素的属性连接到另一个要素。 目标要素和来自连接要素的被连接属性写入到输出要素类。 如上图所示&#xff0c;关键在于空间关系&#xff0c;只有当两个要素存在空间关系的时候&#xff0c;空间连接才有用武之地。 一…

Json-序列化字符串时间格式问题

序列化字符串时间格式问题 一、项目场景二、问题描述三、解决方案 一、项目场景 最近C#中需要将实体进行json序列化&#xff0c;使用了Newtonsoft.Json public static void TestJson(){DataTable dt new DataTable();dt.Columns.Add("Age", Type.GetType("Sys…

ESP32学习(1)——环境搭建

使用的ESP32板子如下图所示 它可以用Arduino 软件&#xff0c;基于C语言开发。但是&#xff0c;在这里&#xff0c;我是用Thonny软件&#xff0c;基于micro_python对其进行开发。 1.安装Thonny Thonny的软件安装包&#xff0c;可以去它官网上下载。Thonny, Python IDE for begi…

【论文精读】EfficientNet

摘要 以往的卷积网络模型通过缩放深度&#xff0c;宽度和图像大小的其中之一或之二来扩大网络以实现更好的结果&#xff0c;但这种思想下经常产生次优的精度和效率的算法。 本文认为通过同时平衡网络宽度、深度、分辨率的缩放倍数来扩大卷积网络&#xff0c;可以达到更好的精度…

尚硅谷最新Node.js 学习笔记(四)

目录 八、express框架 8.1、express介绍 8.2、express使用 express下载 express初体验 8.3、express路由 什么是路由&#xff1f; 路由的使用 获取请求参数 获取路由参数 8.4、express响应设置 8.5、express中间件 什么是中间件&#xff1f; 中间件的作用 中间件…

VScode中配置 C/C++ 环境 | IT拯救者

文章目录 0 引言1. 下载编辑器VScode2. 下载编译器MinGW并解压3. 将MinGW添加至环境变量4. 配置VScode插件5. 运行代码6. 调整和优化7. 提示8. 例行格式条款9. 例行格式条款 0 引言 由于VScode毛毛张使用不习惯&#xff0c;因此配置教程记不住&#xff0c;不过毛毛张看到一篇不…

【数据结构】LRU Cache

文章目录 LRUCache LRUCache 1. LRUCache是一种缓存的替换技术&#xff0c;在CPU和main memory之间根据计算机的局部性原理&#xff0c;往往会采用SRAM技术来构建CPU和主存之间的高速缓存&#xff0c;DRAM(dynamic random access memory)用于构建主存&#xff0c;LRUCache这种…

论文阅读-PIM-tree:一种面向内存处理的抗偏移索引

论文名称&#xff1a;PIM-tree: A Skew-resistant Index for Processing-in-Memory 摘要 当今的内存索引性能受到内存延迟/带宽瓶颈的限制。Processing-in-memory (PIM) 是一种新兴的方法&#xff0c;可能通过实现低延迟内存访问&#xff0c;其聚合内存带宽随 PIM 节点数量扩…

文案馆头像壁纸微信小程序源码【支持流量主】

文案馆头像壁纸微信小程序源码【支持流量主】 源码介绍&#xff1a;文案馆头像壁纸微信小程序源码是一款可以获取套图、头像、壁纸的小程序。小程序源码内置流量主功能 需求环境&#xff1a;微信小程序phpmysql 下载地址&#xff1a; https://www.changyouzuhao.cn/13453.ht…

新机Word/PowerPoint新建空白文档后闪退问题

首先可以尝试一下常规的修复&#xff1a; 设置-应用-安装的应用-搜索office-点击Micros Office Home and Student...右侧三个点-选择修改-点击是-快速修复-修复 再不行就按上面的选择联机修复&#xff0c;这个会卸载现有Office然后自动帮你重新下载 我做了以上两个都没有解决问…