【微信小程序】实现投票功能

news2024/9/28 15:30:43

一、后端

1、xmlsql

<select id="voteList" resultMap="BaseResultMap" >
    select
    <include refid="Base_Column_List" />
    from t_oa_meeting_info
    where 1=1
    <if test="state!=null">
      and state=#{state}
    </if>
    <if test="title!=null">
      and title like concat('%',#{title},'%')
    </if>
  </select>

​
<select id="voteList" resultMap="BaseResultMap" >
    select
    <include refid="Base_Column_List" />
    from t_oa_meeting_info
    where 1=1
    <if test="state!=null">
      and state=#{state}
    </if>
    <if test="title!=null">
      and title like concat('%',#{title},'%')
    </if>
  </select>

​

2、实现接口

编写接口方法

package com.zking.ssm.mapper;

import com.zking.ssm.model.Info;

import java.util.List;

public interface InfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Info record);

    int insertSelective(Info record);

    Info selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Info record);

    int updateByPrimaryKey(Info record);

    List<Info> list(Info info);

    List<Info> voteList(Info info);
}

package com.zking.ssm.mapper;

import com.zking.ssm.model.Option;

public interface OptionMapper {
    int deleteByPrimaryKey(String id);

    int insert(Option record);

    int insertSelective(Option record);

    Option selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Option record);

    int updateByPrimaryKey(Option record);
}

实现接口

package com.zking.ssm.service.impl;

import com.zking.ssm.mapper.InfoMapper;
import com.zking.ssm.mapper.WxUserMapper;
import com.zking.ssm.model.Info;
import com.zking.ssm.service.InfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @软件包名 com.zking.ssm.service.impl
 * @用户 tgq
 * @create 2023-10-24 上午11:24
 * @注释说明:
 */
@Service
public class InfoServiceImpl implements InfoService {
    @Autowired
    private InfoMapper infoMapper;

    @Override
    public int updateByPrimaryKeySelective(Info record) {
        return infoMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<Info> voteList(Info info) {
        return infoMapper.voteList(info);
    }
}

package com.zking.ssm.service.impl;

import com.zking.ssm.mapper.OptionMapper;
import com.zking.ssm.model.Option;
import com.zking.ssm.service.OptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @软件包名 com.zking.ssm.service.impl
 * @用户 tgq
 * @create 2023-10-24 下午9:57
 * @注释说明:
 */
@Service
public class OptionServiceImpl implements OptionService {
    @Autowired
    private OptionMapper om;

    @Override
    public int insertSelective(Option record) {
        return om.insertSelective(record);
    }
}

3、编写Controller

package com.zking.ssm.wxcontroller;

import com.zking.ssm.mapper.InfoMapper;
import com.zking.ssm.model.Info;
import com.zking.ssm.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 
 */
@SuppressWarnings("all")
@RestController
@RequestMapping("/wx/info")
public class WxInfoController {
    @Autowired
    private InfoMapper infoMapper;
    @RequestMapping("/list")
    public Object list (Info info){
        List<Info> list = infoMapper.list(info);
        Map<Object, Object> data = new HashMap<Object, Object>();
        data.put("infoList",list);
        return ResponseUtil.ok(data);
    }

    @RequestMapping("/votelist")
    public Object voteList (Info info){
        List<Info> list = infoMapper.voteList(info);
        Map<Object, Object> data = new HashMap<Object, Object>();
        data.put("voteList",list);
        return ResponseUtil.ok(data);
    }

    @RequestMapping("/update")
    public Object update (Info info){
        int i = infoMapper.updateByPrimaryKeySelective(info);
        return ResponseUtil.ok(i);
    }
}

package com.zking.ssm.wxcontroller;

import com.zking.ssm.mapper.InfoMapper;
import com.zking.ssm.mapper.OptionMapper;
import com.zking.ssm.model.Info;
import com.zking.ssm.model.Option;
import com.zking.ssm.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Autho donkee
 * @Since 2022/7/29
 */
@SuppressWarnings("all")
@RestController
@RequestMapping("/wx/option")
public class WxOptionController {
    @Autowired
    private OptionMapper optionMapper;

    @RequestMapping("/insert")
    public Object insertSelective(Option option) {
        int i = optionMapper.insertSelective(option);
        return ResponseUtil.ok(i);
    }

}

二、前端

里面有一些技术这里就不多做讲解了,可以查看我的专栏微信小程序_无法自律的人的博客-CSDN博客。

在这里面运用到了一个小程序的插件Dialog 弹出框 - Vant Weapp (youzan.github.io)。在Vant Weapp里面有很多使用的插件,可以更便捷使用起来,主要引用需要自己查看官方文档了。

1、页面布置

wxml

<!--pages/vote/list/list.wxml-->
<!-- <text>投票</text> -->
<!-- <tabs inner-text='6666'></tabs> -->
<tabs tabList="{{tabs}}" bindtabsItemChange="tabsItemChange">
    <view class="search-container">
        <input class="search-input" bindblur="ontitle" bindblur="onBlur" placeholder="会议标题" />
        <!-- <input class="search-input" bindinput="searchInputTwo" placeholder="投票标题" /> -->
        <button type="primary" plain="true" size="mini" bindtap="likelist">搜索</button>
    </view>
</tabs>
<!-- <view style="background-color: #aaa;height: 120rpx;"></view> -->
<view>
    <view class="list" data-id="">
        <view class="list-img al-center">
            <image class="video-img" mode="scaleToFill" src=""></image>
        </view>
        <view class="list-detail">
            <view class="list-title"><text><text style="margin-right: 13rpx;"></text></text></view>
            <view class="list-title"><text></text></view>
            <view class="list-tag">
                <view class="state al-center"></view>
                <view class="join al-center"><text class="list-count"></text></view>
            </view>
            <view class="list-info"><text style="font-weight: bold;"></text><text></text> <text style="float: right;"></text> </view>
            <view>
                <button class="btn"></button>
            </view>
        </view>
    </view>
    <!-- <wxs src="../../utils/capture.wxs" module="tools" /> -->
    <wxs src="/utils/capture.wxs" module="tools" />
    <block wx:for-items="{{lists}}" wx:for-item="item" wx:key="item.id">
        <view class="list" data-id="{{item.id}}">
            <view class="list-img al-center">
                <image class="video-img" mode="scaleToFill" src="/static/persons/7.jpg"></image>
            </view>
            <view class="list-detail">
                <view class="list-title"><text><text style="margin-right: 13rpx;"> 发 起 人</text> : {{item.zhuchiren}}</text></view>
                <view class="list-title"><text>会议名称 : {{item.title}}</text></view>
                <!-- <view class="list-title"><text>投票标题 : [ {{item.vote}} ]</text></view> -->
                <view class="list-tag">
                    <view class="state al-center">{{tools.getState(item.state)}}</view>
                    <view class="join al-center"><text class="list-count">{{tools.getNumber(item.canyuze,item.liexize,item.zhuzhiren)}}</text>人参与会议</view>
                </view>
                <view class="list-info"><text style="font-weight: bold;">地址:</text><text>{{item.location}}</text> <text style="float: right;">开始时间:{{tools.formatDate(item.starttime,'YY-MM-DD hh-mm-ss')}}结束时间:{{tools.formatDate(item.endTime,'YY-MM-DD hh-mm-ss')}}</text> </view>
                <view data-id="{{item.id}}" bindtap="{{data.state == 5 ? 'show1' : 'showPopup'}}">
                    <button class="btn">{{data.state == 5? '开启投票' : '参与投票'}}</button>
                    <!-- <button wx:if="{{data.state == 5}}"  class="btn" bindtap="show1">开启投票</button>
          <button wx:else="{{data.state == 6}}" class="btn" bindtap="showPopup">参与投票</button> -->
                </view>
            </view>
        </view>

    </block>
    <view class="section bottom-line">
        <text>到底啦</text>
    </view>
</view>


<!-- 开启投票 弹窗-->
<van-dialog use-slot title="请添加投票选项" show="{{ show1 }}" show-cancel-button bind:close="onClose1" bind:confirm="getVoteState">
    <view class="container">
        <view class="input-box">
            <input placeholder="请输入投票选项" bindblur="onOptionValue" bindinput="bindInput"></input>
        </view>
        <view class="checkbox-group">
            <view class="checkbox-item" data-id="1" bindtap="toggleCheckbox">同意</view>
            <view class="checkbox-item" data-id="2" bindtap="toggleCheckbox">不同意</view>
            <view class="checkbox-item" data-id="3" bindtap="toggleCheckbox">保留意见</view>
            <view class="checkbox-item" data-id="4" bindtap="toggleCheckbox">弃票</view>
        </view>
    </view>
</van-dialog>
<!-- 选择投票选项 弹窗 -->
<van-dialog use-slot title="选择投票" show="{{ show }}" show-cancel-button bind:close="onClose" bind:confirm="getVoteOption">
    <view class="container">
        <view class="input-box">
            <!-- <input placeholder="请输入投票选项" bindinput="bindInput"></input> -->
        </view>
        <view class="checkbox-group">
            <view class="checkbox-item {{ checkbox1 ? 'active' : '' }}" data-id="1" bindtap="toggleCheckbox">同意</view>
            <view class="checkbox-item {{ checkbox2 ? 'active' : '' }}" data-id="2" bindtap="toggleCheckbox">不同意</view>
            <view class="checkbox-item {{ checkbox3 ? 'active' : '' }}" data-id="3" bindtap="toggleCheckbox">保留意见</view>
            <view class="checkbox-item {{ checkbox4 ? 'active' : '' }}" data-id="4" bindtap="toggleCheckbox">弃票</view>
        </view>
    </view>
</van-dialog>

2、功能实现

js

// pages/vote/list/list.js ../../config/api.js
const api = require('../../../config/api.js');
const util = require('../../../utils/util.js');
const app = getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    show: false,
    show1: false,
    tabs: ['未开启投票', '已开启投票'],
    lists: [],
    inputValue: '',//输入框内容
    data: {
      id: 0,
      state: 5,
      title: ''
    },
    option: {
      meetingId: 0,
      optionValue: ''
    },
    checkbox1: false,
    checkbox2: false,
    checkbox3: false,
    checkbox4: false
  },
  onBlur: function (e) {//输入框获取事件
    this.setData({
      inputValue: e.detail.value
    });
  },
  onOptionValue: function (e) {//弹窗1输入框获取
    this.setData({
      option: { optionValue: e.detail.value }
    });
  },
  likelist() {//搜索事件
    // console.log(this.data.inputValue);
    this.data.data.title = this.data.inputValue
    this.InfoVote();
  },
  tabsItemChange(e) {//是否投票

    var tolists;
    if (e.detail.index == 0) {
      tolists = 5;
      this.data.data.state = 5
      // tolists = this.data.lists;
    } else if (e.detail.index == 1) {
      // tolists = this.data.lists;
      tolists = 6;
      this.data.data.state = 6
    }
    this.setData({
      data: {
        state: tolists
      }
    })
    console.log(e.detail, this.data.Profile, this.data.data, tolists);
    this.InfoVote();
  },
  InfoVote() {//初始化数据
    util.request(api.MettingInfoVote, this.data.data).then(res => {
      // console.log(res)
      this.setData({
        lists: res.data.voteList
      })
    }).catch(res => {
      console.log('服器没有开启,使用模拟数据!')
    })
  },
  toggleCheckbox: function (e) {
    var checkboxId = e.currentTarget.dataset.id;

    var data = {}; // 更新的状态数据

    // 遍历每个复选框的状态变量,根据点击的复选框的id确定是否选中
    Object.keys(this.data).forEach(key => {
      if (key.includes('checkbox') && key !== `checkbox${checkboxId}` && this.data[key]) {
        data[key] = false; // 将其他复选框的状态设为false
      }
    });

    // 切换当前复选框的选中状态
    data[`checkbox${checkboxId}`] = !this.data[`checkbox${checkboxId}`];

    this.setData(data);
  },
  // 1弹窗
  show1(e) {
    // console.log(e, e.currentTarget.dataset.id)
    this.setData({
      data: {
        id: e.currentTarget.dataset.id
      },
    })
    this.setData({
      show1: true
    })
    // console.log(e.currentTarget.dataset.id, this.data.data)
  },
  getVoteState(e) {//开启投票确认事件
    console.log(e, this.data.data, this.data.option.meetingId);

    var optiondata = {
      meetingId: this.data.data.id,
      optionValue: this.data.option.optionValue
    }
    // console.log(optiondata)
    util.request(api.MettingOptionInsert, optiondata).then(res => {//添加投票选项
      // console.log(api.MettingOptionInsert);
      if (res.errno == 0) {
        wx.showToast({
          title: '开启投票成功',
          icon: 'none',
          duration: 1500//持续的时间
        })
        util.request(api.MettingInfoupdate, { id: optiondata.meetingId, state: 6 }).then(r => {//更改会议状态
          // console.log(api.MettingInfoupdate);
          // this.InfoVote('');
          if (res.errno == 0) {
            this.data.data.state = 5
            this.InfoVote('');
          }
        }).catch(res => {
          console.log('服器没有开启,使用模拟数据!')
        })
      }

    }).catch(res => {
      console.log('服器没有开启,使用模拟数据!')
    })
    // console.log(123,i)


  },
  onClose1() {
    this.setData({ show1: false });
  },
  // 2弹窗
  showPopup(e) {
    this.setData({
      show: true,
      data: {
        id: e.currentTarget.dataset.id
      }
    })
  },
  getVoteOption(e) {//参与投票确认事件
    console.log(2, e.detail);
  },

  onClose() {
    this.setData({ show: false });
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    // this.data.Profile=true
    this.InfoVote('');
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})

3、页面美化

wxss

/* pages/vote/list/list.wxss */

.search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #ffffff;
    border: cornsilk;
}

.search-input {
    width: 45%;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid rgb(255, 255, 255);
    font-size: 14px;
    transition: border-color 0.3s;
    border: cornsilk;
}

.search-input:focus {
    outline: none;
    border-color: #51a7f9;
}

.search-input::placeholder {
    color: #999;
}

.search-input::-webkit-input-placeholder {
    color: #999;
}

.search-input::-moz-placeholder {
    color: #999;
}

.search-input:-ms-input-placeholder {
    color: #999;
}

/* .search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f0f0f0;
  }

  .search-input {
    width: 45%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
  } */
.list {
    display: flex;
    flex-direction: row;
    width: 100%;
    padding: 0 20rpx 0 0;
    background-color: seashell;
    border-bottom: 1px solid #cecece;
    margin-bottom: 5rpx;
    height: 350rpx;
}

.list-img {
    display: flex;
    margin: 10rpx 10rpx;
    width: 160rpx;
    height: 250rpx;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.list-img .video-img {
    width: 140rpx;
    height: 160rpx;
    border-radius: 6px;
}

.list-detail {
    margin: 10rpx 10rpx;
    display: flex;
    flex-direction: column;
    width: 600rpx;
    height: 300rpx;
}

.list-title text {
    font-size: 9pt;
    color: #333;
    font-weight: bold;
}

.list-detail {
    display: flex;
    height: 100rpx;
}

.list-tag {
    display: flex;
}

.state {
    font-size: 9pt;
    color: blue;
    width: 120rpx;
    height: 40rpx;
    border: 1px solid blue;
    border-radius: 2px;
    margin: 10rpx 0rpx;
    display: flex;
    justify-content: center;
    align-items: center;
}

.join {
    font-size: 11pt;
    color: #bbb;
    margin-left: 20rpx;
    display: flex;
    justify-content: center;
    align-items: center;
}

.list-count {
    margin-right: 10rpx;
    font-size: 11pt;
    color: red;
}

.list-info {
    font-size: 9pt;
    color: #bbb;
}

.btn {
    /* width: 10rpx;
    height: 40rpx;
    background-color: #3388ff;
    color: #fff;
    text-align: center;
    font-size: 16rpx;
    display: flex;
    justify-content: center;
    align-items: center; */

    background-color: #3388ff;
    color: #fff;
    border-radius: 4rpx;
    font-size: 16rpx;
    padding: 10rpx 20rpx;

    /* background-color: #3388ff;
      color: #fff;
      border-color: #3388ff; */


    /* width: 100rpx;
      height: 40rpx;
      border: 1rpx solid #3388ff;
      border-radius: 4rpx;
      font-size: 16rpx;
      background-color: #3388ff;
      color: #fff;
      outline: none;
      box-shadow: 0 0 5rpx #3388ff; */

    /* width: 60rpx;
      height: 30rpx;
      border-radius: 4rpx;
      font-size: 16rpx; */

    /* width: 40rpx;
      height: 40rpx;
      background-color: transparent;
      border: none;
      font-size: 24rpx;
      color: #666; */


}

.bottom-line {
    display: flex;
    height: 60rpx;
    justify-content: center;
    align-items: center;
    background-color: #f3f3f3;
}

.bottom-line text {
    font-size: 9pt;
    color: #666;
}

/* 弹窗 */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.input-box {
    margin-top: 20px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    margin-top: 15px;
}

.checkbox-item {
    width: 100px;
    height: 40px;
    background-color: #eaf0f4;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .input-box {
    margin-top: 20px;
  }
  
  .checkbox-group {
    display: flex;
    flex-direction: column;
    margin-top: 15px;
  }
  
  .checkbox-item {
    width: 100px;
    height: 40px;
    background-color: #eaf0f4;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ccc;
  }
  
  .checkbox-item.active {
    background-color: #4285f4;
    color: white;
    border-color: #4285f4;
  }
  

4、效果演示

演示效果较长,请耐心观看等待.....

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

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

相关文章

互联网Java工程师面试题·Spring篇·第四弹

目录 6、AOP 6.1、什么是 AOP&#xff1f; 6.2、什么是 Aspect&#xff1f; 6.3、什么是切点&#xff08;JoinPoint&#xff09; 6.4、什么是通知&#xff08;Advice&#xff09;&#xff1f; 6.5、有哪些类型的通知&#xff08;Advice&#xff09;&#xff1f; 6.6、指出…

06 MIT线性代数-列空间和零空间 Column space Nullspace

1. Vector space Vector space requirements vw and c v are in the space, all combs c v d w are in the space 但是“子空间”和“子集”的概念有区别&#xff0c;所有元素都在原空间之内就可称之为子集&#xff0c;但是要满足对线性运算封闭的子集才能成为子空间 中 2 …

嵌入式实时操作系统的设计与开发(消息)

消息 从概念上讲&#xff0c;消息机制和邮箱机制很类似&#xff0c;区别在于邮箱一般只能容纳一条消息&#xff0c;而消息则会包含一系列的消息。 系统定义了一个全局变量g_msgctr_header&#xff0c;通过它可以查找到任一已创建的消息容器。 每一个消息容器都可以根据其参数…

CentOS 7 安装Java环境

本文采用源码安装 1. 下载安装包 下载地址&#xff1a;jdk官网下载地址 下载linux64位tgz压缩包、官网下载需要登录oracle账号、可临时注册一个、几分钟搞定、或者查下其他方式获取安装包皆可。 2. 上传至centos7服务器 3. 安装 # tar zxvf jdk-8u381-linux-x64.tar.gz4.…

UE5 Blueprint发送http请求

一、下载插件HttpBlueprint、Json Blueprint Utilities两个插件是互相依赖的&#xff0c;启用&#xff0c;重启项目 目前两个是Beta的状态&#xff0c;如果你使用的平台支持就可以使用&#xff0c;我们的项目因为需要取Header的值&#xff0c;所有没法使用这两个插件&#xff0…

【AI视野·今日Robot 机器人论文速览 第五十九期】Fri, 20 Oct 2023

AI视野今日CS.Robotics 机器人学论文速览 Fri, 20 Oct 2023 Totally 29 papers &#x1f449;上期速览✈更多精彩请移步主页 Daily Robotics Papers CCIL: Continuity-based Data Augmentation for Corrective Imitation Learning Authors Liyiming Ke, Yunchu Zhang, Abhay D…

vue3检测是手机还是pc端,监测视图窗口变化

1.超小屏幕&#xff08;手机&#xff09; 768px以下 2.小屏设备&#xff08;平板&#xff09; 768px-992px 3.中等屏幕&#xff08;旧式电脑&#xff09; 992px-1200px 4.大屏设备&#xff08;现代电脑&#xff09; 1200px以上 <script setup name"welcome"> i…

BurpSuite安装

下载 BurpSuite 下载 Java17 下载后确定版本 java -version获取启动器 密钥生成器 破解 将下载的 BurpSuite、启动器、密钥生成器&#xff0c;放入同一个目录 打开 CMD 进入该目录 启动密钥生成器 java -jar burp-keygen-scz.jar开启新的CMD&#xff0c;进入该目录 启动…

Spark_SQL-DataFrame数据写出以及读写数据库(以MySQl为例)

一、数据写出 &#xff08;1&#xff09;SparkSQL统一API写出DataFrame数据 统一API写法&#xff1a; 常见源写出&#xff1a; # cording:utf8from pyspark.sql import SparkSession from pyspark.sql.types import StructType, IntegerType, StringType import pyspark.sql.fu…

Android 下载文件后,调用系统文件管理器打开方式

如果是定制的系统&#xff0c;可能需要注意下有没有内置播放器或者浏览软件&#xff01;&#xff01;&#xff01; 看效果&#xff1a; 第一先上个文件类型判断的方法&#xff1a; //建立一个文件类型与文件后缀名的匹配表public static final String[][] MATCH_ARRAY{//{后缀…

CICD 流程学习(五)Jenkins后端工程构建

案例1&#xff1a;数据库服务部署 MySQL部署 #安装MySQL服务 [rootServices ~]# yum clean all; yum repolist -v ... Total packages: 8,265 [rootServices ~]# yum -y install mysql.x86_64 mysql-server.x86_64 mysql-devel.x86_64 ... Complete! [rootServices ~]# #启动…

【MySQL架构篇】SQL执行流程与缓冲池

文章目录 1. SQL执行流程2. 数据库缓冲池(Buffer Pool)2.1 缓冲池概述2.2 缓冲池如何读取数据2.3 查看和设置缓冲池的大小2.4 多个Buffer Pool实例2.5 引申问题 1. SQL执行流程 查询缓存&#xff1a;因为查询效率往往不高&#xff0c;所以在MySQL8.0之后就抛弃了这个功能解析器…

永中office电子表格使用函数求和

下载安装一个永中office个人版&#xff1b; 基本没用过这软件&#xff1b;看一下有没有电子表格&#xff1b; 有的&#xff1b; 再看一下电子表格有没有类似excel的函数功能&#xff1b; 看一下能不能sum()求和&#xff1b; 可以的&#xff1b;

百度Comate SaaS版本正式发布,助力开发者加速研发过程

百度Comate是基于文心大模型的智能代码助手&#xff0c;让开发者的编码更快、更好、更简单&#xff0c;为开发者自动生成完整的、且更符合实际研发场景的代码行或整个代码块&#xff0c;帮助每一位开发者轻松完成研发任务。10月17日召开的百度世界大会上&#xff0c;百度CTO王海…

CVE-2023-46227 Apache inlong JDBC URL反序列化漏洞

项目介绍 Apache InLong&#xff08;应龙&#xff09;是一站式、全场景的海量数据集成框架&#xff0c;同时支持数据接入、数据同步和数据订阅&#xff0c;提供自动、安全、可靠和高性能的数据传输能力&#xff0c;方便业务构建基于流式的数据分析、建模和应用。 项目地址 h…

SpringCloud微服务 【实用篇】| 认识微服务

目录 一&#xff1a;认识微服务 1. 微服务框架介绍 2. 服务架构演变 3. 微服务技术对比 4. SpringCloud 图书推荐&#xff1a;《巧用ChatGPT快速提高职场晋升力》 一&#xff1a;认识微服务 本课程学习于黑马&#xff0c;会通过分层次学习&#xff0c;分为三部分去讲解微…

BUUCTF刷题记录

[BJDCTF2020]Easy MD51 进入题目页面&#xff0c;题目提示有一个链接&#xff0c;应该是题目源码 进入环境&#xff0c;是一个查询框&#xff0c;无论输入什么都没有回显&#xff0c;查看源码也没什么用 利用bp抓包查看有没有什么有用的东西 发现响应的Hint那里有一个sql语句&…

【高效开发工具系列】Postman

&#x1f49d;&#x1f49d;&#x1f49d;欢迎来到我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐:kuan 的首页,持续学…

人工智能:CNN(卷积神经网络)、RNN(循环神经网络)、DNN(深度神经网络)的知识梳理

卷积神经网络&#xff08;CNN&#xff09; 卷积神经网络&#xff08;CNN&#xff09;&#xff0c;也被称为ConvNets或Convolutional Neural Networks&#xff0c;是一种深度学习神经网络架构&#xff0c;主要用于处理和分析具有网格状结构的数据&#xff0c;特别是图像和视频数…

学习笔记二十三:Deployment入门到企业实战应用

Deployment入门到企业实战应用 Deployment控制器&#xff1a;概念、原理解读Deployment概述Deployment工作原理&#xff1a;如何管理rs和Pod&#xff1f;什么叫做更新节奏和更新逻辑呢 Deployment使用案例&#xff1a;创建一个web站点,2个副本deploy-demo详细解读 通过k8s实现滚…