开发日志2024-04-11

news2024/11/28 2:37:09

开发日志2024/04/11

1、会员/普通用户预约完成后,技师对应的积分添加预约完成的项目价格添加到统计表的业绩字段中,同时对应的服务次数字段+1

实现代码:

  • 前端
    shHandler(){
      this.$confirm(`确定操作?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        this.$http({
          url: "huiyuanyuyuexinxi/update",
          method: "post",
          data: this.shForm
        }).then(({ data }) => {
          if (data && data.code === 0) {
            this.$message({
              message: "操作成功",
              type: "success",
              duration: 1500,
              onClose: () => {
                this.getDataList();
                this.shDialog()
              }
            });
          } else {
            this.$message.error(data.msg);
          }
        });
      });
    },
  • 后端
   /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody HuiyuanyuyuexinxiEntity huiyuanyuyuexinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(huiyuanyuyuexinxi);
        huiyuanyuyuexinxiService.updateById(huiyuanyuyuexinxi);//全部更新
		//给相应的技师添加对应项目的积分
		//查询对应的项目所对应的积分数据
		String jifenByXiangmu = meirongxiangmuService.selectJifenByXiangmu(huiyuanyuyuexinxi.getXiangmumingcheng());
		//查询对应的技师数据,在此基础上进行修改积分字段
		int result =  jishiService.UpdateJiShiByMingcheng(huiyuanyuyuexinxi.getZhidingjishi(),Integer.parseInt(jifenByXiangmu));
        //TODO 将积分添加到技师月统计和年统计业绩上
		int res = jishinianyejitongjiService.updateYeJiByMincheng(huiyuanyuyuexinxi.getZhidingjishi(),Integer.parseInt(jifenByXiangmu));
		int resYue = jishiyueyejitongjiService.updateYeJiByMincheng(huiyuanyuyuexinxi.getZhidingjishi(),Integer.parseInt(jifenByXiangmu));
		//TODO 将统计表中的服务次数都+1
		int resFuWu = jishinianyejitongjiService.updateFuWuByMincheng(huiyuanyuyuexinxi.getZhidingjishi());
		int resYueFuWu = jishiyueyejitongjiService.updateFuWuByMincheng(huiyuanyuyuexinxi.getZhidingjishi());
		return R.ok();
    }

2、管理员的会员的消费管理和技师的业绩统计管理分店业绩管理

**开发思路:**按照之前的思路将所有的图标汇总到一起

代码实现:

  • 前端
<div class="home">
  <el-row>
      <el-col :span="12"><div id="myChart" :style="{ width: '600px', height: '600px' }"></div></el-col>
      <el-col :span="12"> <div id="myChartNian" style="height: 500px; width: 600px;"></div></el-col>
    </el-row>
  </div>
------------------
dataXiaoliang: [],
dataNianXiaoliang: [],
----------------    
mounted() {
    this.Draw();
    this.$http({
      url: 'huiyuanyuexiaofeixinxi/xiaofei',
      method: 'get'
    }).then(res => {
      console.log(res.data)
      // 读取接口请求成功回传回来的数据
      var Huiyuanyuexiaofeixinxis = res.data.Huiyuanyuexiaofeixinxis
      // 定义数组,存放一会覆盖echarts图形的数据
      var data = []
      // 循环遍历数组,取出数据,转成和data一样的格式
      for (var i = 0; i < Huiyuanyuexiaofeixinxis.length; i++) {
        var d = { name: '', value: 0 }
        d.name = Huiyuanyuexiaofeixinxis[i].huiyuanxingming
        d.value = Huiyuanyuexiaofeixinxis[i].yuexiaofeie
        // 往data数组中添加数据
        data.push(d)
      }
      // 排序,b - a降序——a - b升序
      data.sort((a, b) => b.value - a.value)
      // 覆盖data(){}中全局变量的数据
      this.dataXiaoliang = data
      // 画出图形
      this.Draw()
    }).catch(err => {
      console.log(err)
      console.log("后台接口请求失败!")
    })
    this.DrawNian();
    //绘制年销量的图
    this.$http({
      url: 'huiyuannianxiaofeixinxi/xiaofei',
      method: 'get'
    }).then(res => {
      console.log(res.data)
      // 读取接口请求成功回传回来的数据
      var Huiyuannianxiaofeixins = res.data.Huiyuannianxiaofeixins
      // 定义数组,存放一会覆盖echarts图形的数据
      var data = []
      console.log(Huiyuannianxiaofeixins.length)
      // 循环遍历数组,取出数据,转成和data一样的格式
      for (var i = 0; i < Huiyuannianxiaofeixins.length; i++) {
        var d = { name: '', value: 0 }
        d.name = Huiyuannianxiaofeixins[i].huiyuanxingming
        d.value = Huiyuannianxiaofeixins[i].nianxiaofeie
        // 往data数组中添加数据
        data.push(d)
      }
      // 排序,b - a降序——a - b升序
      data.sort((a, b) => b.value - a.value)
      // 覆盖data(){}中全局变量的数据
      this.dataNianXiaoliang = data
      // 画出图形
      this.DrawNian()
    }).catch(err => {
      console.log(err)
      console.log("后台接口请求失败!")
    })
  },      
//绘制饼状图
methods:	
        Draw() {
      // 基于准备好的dom,初始化echarts实例
      let myChart = this.$echarts.init(document.getElementById('myChart'))

      // 绘制图表
      myChart.setOption({
        title: {
            text: '会员用户月销量统计(饼状图)',
            x: 'center'
          },
        // options配置项
        tooltip: {
          trigger: 'item'
        },
        legend: {
          top: '5%',
          left: 'center'
        },
        series: [
          {
            name: 'Access From',
            type: 'pie',
            radius: ['40%', '70%'],
            avoidLabelOverlap: false,
            itemStyle: {
              borderRadius: 10,
              borderColor: '#fff',
              borderWidth: 2
            },
            label: {
              show: false,
              position: 'center'
            },
            emphasis: {
              label: {
                show: true,
                fontSize: 40,
                fontWeight: 'bold'
              }
            },
            labelLine: {
              show: false
            },
            data: this.dataXiaoliang
          }
        ]
      })
    },
    DrawNian() {
      // 基于准备好的dom,初始化echarts实例
      let myChartNian = this.$echarts.init(document.getElementById('myChartNian'))

      // 绘制图表
      myChartNian.setOption({
        title: {
            text: '会员用户年销量统计(饼状图)',
            x: 'center'
          },
        // options配置项
        tooltip: {
          trigger: 'item'
        },
        legend: {
          top: '7%', //调整图例的位置
          left: 'center'
        },
        series: [
       
          {
            center: ['50%', '60%'], // 调整饼图位置
            name: 'Access From',
            type: 'pie',
            radius: ['40%', '70%'],
            avoidLabelOverlap: false,
            itemStyle: {
              borderRadius: 10,
              borderColor: '#fff',
              borderWidth: 2
            },
            label: {
              show: false,
              position: 'center'
            },
            emphasis: {
              label: {
                show: true,
                fontSize: 40,
                fontWeight: 'bold'
              }
            },
            labelLine: {
              show: false
            },
            data: this.dataNianXiaoliang
          }
        ]
      })
    },
  • 后端
    /**
     * 后端饼状图
     */
    @GetMapping("/xiaofei")
    public Map<String,List<MeirongxiangmuniantongjiEntity>> xiaofei(){
        HashMap<String,List<MeirongxiangmuniantongjiEntity>> map = new HashMap<>();
        map.put("Xiangmunianyejixinxis",meirongxiangmuniantongjiService.selectAllYonghuyuexiaofeixinxis());
        return map;
    }

image-20240411105207602

3、实现用于和会员在前台预约完成后管理员审核后,在普通用户/会员的消费统计页面添加对应的值

**开发思路:**普通用户和会员在预约后,管理员审核完成后将预约的项目的价格加到他们对应的消费额度上

代码实现:

  • 前端

  • 后端
/**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody YonghuyuyuexinxiEntity yonghuyuyuexinxi, HttpServletRequest request){
        yonghuyuyuexinxiService.updateById(yonghuyuyuexinxi);//全部更新
		//给相应的技师添加对应项目的积分
		//查询对应的项目所对应的积分数据
  		String jifenByXiangmu = meirongxiangmuService.selectJifenByXiangmu(yonghuyuyuexinxi.getXiangmumingcheng());
  		//查询对应的技师数据,在此基础上进行修改积分字段
		System.out.println("jifenByXiangmu = " + jifenByXiangmu);
		int result =  jishiService.UpdateJiShiByMingcheng(yonghuyuyuexinxi.getZhidingjishi(),Integer.parseInt(jifenByXiangmu));
		System.out.println("result = " + result);
		System.out.println("zhidingjishi = " + yonghuyuyuexinxi.getZhidingjishi());
		//将积分添加到技师月统计和年统计业绩上
		int res = jishinianyejitongjiService.updateYeJiByMincheng(yonghuyuyuexinxi.getZhidingjishi(),Integer.parseInt(jifenByXiangmu));
		int resYue = jishiyueyejitongjiService.updateYeJiByMincheng(yonghuyuyuexinxi.getZhidingjishi(),Integer.parseInt(jifenByXiangmu));
		//将统计表中的服务次数都+1
		int resFuWu = jishinianyejitongjiService.updateFuWuByMincheng(yonghuyuyuexinxi.getZhidingjishi());
		int resYueFuWu = jishiyueyejitongjiService.updateFuWuByMincheng(yonghuyuyuexinxi.getZhidingjishi());
		//TODO 将项目对应的价格添加到用户的月消费额度和年消费额度
		//TODO 根据用户预约的项目名称查询对应的价格
		int xiangmuJiaGe = meirongxiangmuService.selectJiaGeByXiangMuXingMing(yonghuyuyuexinxi.getXiangmumingcheng());
		//先查询一下用户统计表中有没有要查询的数据,有则更新,无则增加
		int resXiaoFei =  yonghuyuexiaofeixinxiService.selectYonghuYueXiaoFeie(yonghuyuyuexinxi.getXingming());
		System.out.println("resXiaoFei = " + resXiaoFei);
		/*用户月消费*/
		if (resXiaoFei == 0) {
			//用户月消费统计表中添加这条数据
			YonghuyuexiaofeixinxiEntity yonghuyuexiaofeixinxi = new YonghuyuexiaofeixinxiEntity();
			yonghuyuexiaofeixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
			yonghuyuexiaofeixinxi.setZhanghao(yonghuyuyuexinxi.getZhanghao());
			yonghuyuexiaofeixinxi.setAddtime(new DateTime());
			//根据预约的姓名查询用户表中对应的性别
			String sex = putongyonghuService.selectSexByName(yonghuyuyuexinxi.getXingming());
			yonghuyuexiaofeixinxi.setXingbie(sex);
			yonghuyuexiaofeixinxi.setXingming(yonghuyuyuexinxi.getXingming());
			yonghuyuexiaofeixinxi.setYuexiaofeie(xiangmuJiaGe);
			boolean insert = yonghuyuexiaofeixinxiService.insert(yonghuyuexiaofeixinxi);
			if (insert) {
				System.out.println("用户月消费额度增加一条" + insert);
			}
		}else{
			//更新数据
			yonghuyuexiaofeixinxiService.updateYonghuYueXiaoFeie(yonghuyuyuexinxi.getXingming(), xiangmuJiaGe);
		}
		//先查询一下用户统计表中有没有要查询的数据,有则更新,无则增加
		int resNianXiaoFei =  yonghunianxiaofeixinxiService.selectYonghuNianXiaoFeie(yonghuyuyuexinxi.getXingming());
		/*用户年消费*/
		if (resNianXiaoFei == 0) {
			//用户月消费统计表中添加这条数据
			YonghunianxiaofeixinxiEntity yonghunianxiaofeixinxi = new YonghunianxiaofeixinxiEntity();
			yonghunianxiaofeixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
			yonghunianxiaofeixinxi.setZhanghao(yonghuyuyuexinxi.getZhanghao());
			yonghunianxiaofeixinxi.setAddtime(new DateTime());
			//根据预约的姓名查询用户表中对应的性别
			String sex = putongyonghuService.selectSexByName(yonghuyuyuexinxi.getXingming());
			yonghunianxiaofeixinxi.setXingbie(sex);
			yonghunianxiaofeixinxi.setXingming(yonghuyuyuexinxi.getXingming());
			yonghunianxiaofeixinxi.setNianxiaofeie(xiangmuJiaGe);
			boolean insert = yonghunianxiaofeixinxiService.insert(yonghunianxiaofeixinxi);
			if (insert) {
				System.out.println("用户年消费额度增加一条" + insert);
			}
		}else{
			//更新数据
			int updateYonghuNianXiaoFeie = yonghunianxiaofeixinxiService.updateYonghuNianXiaoFeie(yonghuyuyuexinxi.getXingming(), xiangmuJiaGe);
			System.out.println("updateYonghuNianXiaoFeie = " + updateYonghuNianXiaoFeie);
		}
		System.out.println("resNianXiaoFei = " + resNianXiaoFei);
		return R.ok();
    }

会员:

  • 后端
   /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody HuiyuanyuyuexinxiEntity huiyuanyuyuexinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(huiyuanyuyuexinxi);
        huiyuanyuyuexinxiService.updateById(huiyuanyuyuexinxi);//全部更新
		//给相应的技师添加对应项目的积分
		//查询对应的项目所对应的积分数据
		String jifenByXiangmu = meirongxiangmuService.selectJifenByXiangmu(huiyuanyuyuexinxi.getXiangmumingcheng());
		//查询对应的技师数据,在此基础上进行修改积分字段
		int result =  jishiService.UpdateJiShiByMingcheng(huiyuanyuyuexinxi.getZhidingjishi(),Integer.parseInt(jifenByXiangmu));
        //TODO 将积分添加到技师月统计和年统计业绩上
		int res = jishinianyejitongjiService.updateYeJiByMincheng(huiyuanyuyuexinxi.getZhidingjishi(),Integer.parseInt(jifenByXiangmu));
		int resYue = jishiyueyejitongjiService.updateYeJiByMincheng(huiyuanyuyuexinxi.getZhidingjishi(),Integer.parseInt(jifenByXiangmu));
		//TODO 将统计表中的服务次数都+1
		int resFuWu = jishinianyejitongjiService.updateFuWuByMincheng(huiyuanyuyuexinxi.getZhidingjishi());
		int resYueFuWu = jishiyueyejitongjiService.updateFuWuByMincheng(huiyuanyuyuexinxi.getZhidingjishi());
		//TODO 将项目对应的价格添加到会员的月消费额度和年消费额度
		//TODO 根据会员预约的项目名称查询对应的价格
		int xiangmuJiaGe = meirongxiangmuService.selectJiaGeByXiangMuXingMing(huiyuanyuyuexinxi.getXiangmumingcheng());
		//先查询一下用户统计表中有没有要查询的数据,有则更新,无则增加
		int resHuiYuanXiaoFei =  huiyuanyuexiaofeixinxiService.selectHuiYuanYueXiaoFeie(huiyuanyuyuexinxi.getHuiyuanxingming());
		System.out.println("resHuiYuanXiaoFei的值为:" + resHuiYuanXiaoFei);
		/*用户月消费*/
		if (resHuiYuanXiaoFei == 0) {
			//用户月消费统计表中添加这条数据
			HuiyuanyuexiaofeixinxiEntity huiyuanyuexiaofeixinxi = new HuiyuanyuexiaofeixinxiEntity();
			huiyuanyuexiaofeixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
			huiyuanyuexiaofeixinxi.setHuiyuanzhanghao(huiyuanyuyuexinxi.getHuiyuanzhanghao());
			huiyuanyuexiaofeixinxi.setAddtime(new DateTime());
			//根据预约的姓名查询用户表中对应的性别
			String sex = huiyuanService.selectSexByName(huiyuanyuyuexinxi.getHuiyuanxingming());
			huiyuanyuexiaofeixinxi.setXingbie(sex);
			huiyuanyuexiaofeixinxi.setHuiyuanxingming(huiyuanyuyuexinxi.getHuiyuanxingming());
			huiyuanyuexiaofeixinxi.setYuexiaofeie(xiangmuJiaGe);
			boolean insert = huiyuanyuexiaofeixinxiService.insert(huiyuanyuexiaofeixinxi);
			if (insert) {
				System.out.println("会员的月消费额度数据增加条数为:" + insert + "条");
			}
		}else{
			//更新数据
			huiyuanyuexiaofeixinxiService.updateHuiYuanYueXiaoFeie(huiyuanyuyuexinxi.getHuiyuanxingming(), xiangmuJiaGe);
		}
		//先查询一下用户统计表中有没有要查询的数据,有则更新,无则增加
		int resHuiYuanNianXiaoFei =  huiyuannianxiaofeixinxiService.selectHuiyuanNianXiaoFeie(huiyuanyuyuexinxi.getHuiyuanxingming());
		/*用户年消费*/
		if (resHuiYuanNianXiaoFei == 0) {
			//用户月消费统计表中添加这条数据
			HuiyuannianxiaofeixinxiEntity huiyuannianxiaofeixinxi = new HuiyuannianxiaofeixinxiEntity();
			huiyuannianxiaofeixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
			huiyuannianxiaofeixinxi.setHuiyuanzhanghao(huiyuanyuyuexinxi.getHuiyuanzhanghao());
			System.out.println("会员账号是:" + (huiyuanyuyuexinxi.getHuiyuanzhanghao()));
			huiyuannianxiaofeixinxi.setAddtime(new DateTime());
			//根据预约的姓名查询用户表中对应的性别
			String sex = huiyuanService.selectSexByName(huiyuanyuyuexinxi.getHuiyuanxingming());
			huiyuannianxiaofeixinxi.setXingbie(sex);
			huiyuannianxiaofeixinxi.setHuiyuanxingming(huiyuanyuyuexinxi.getHuiyuanxingming());
			huiyuannianxiaofeixinxi.setNianxiaofeie(xiangmuJiaGe);
			boolean insert = huiyuannianxiaofeixinxiService.insert(huiyuannianxiaofeixinxi);
			if (insert) {
				System.out.println("会员年消费额度增加条数为:" + insert + "条");
			}
		}else{
			//更新数据
			int updateYonghuNianXiaoFeie = huiyuannianxiaofeixinxiService.updateHuiYuanNianXiaoFeie(huiyuanyuyuexinxi.getHuiyuanxingming(), xiangmuJiaGe);
			System.out.println("updateYonghuNianXiaoFeie的值为:" + updateYonghuNianXiaoFeie);
		}
		System.out.println("resHuiYuanNianXiaoFei的值为:" + resHuiYuanNianXiaoFei);
		return R.ok();
    }
 后端

```java
	/**
	 * 后端查询所有的所有的技师工号
	 */
	@RequestMapping("/getJiShiGongHaoList")
	public R getJiShiGongHaoList() {
		List<String> result = jishiService.getJiShiGongHaoList();
		return R.ok().put("data", result);
	}

	/**
	 * 后端查询根据技师工号查询技师姓名
	 */
	@RequestMapping("/getJiShiGongName")
	public R getJiShiGongName(String jishigonghao) {
		List<String> result = jishiService.getJiShiGongName(jishigonghao);
		return R.ok().put("data", result);
	}
--------------
<select id="getJiShiGongHaoList" resultType="java.lang.String">
        select distinct jishigonghao from jishi
    </select>
    <select id="getJiShiGongName" resultType="java.lang.String">
        select distinct jishixingming from jishi
        where  jishigonghao = #{jishigonghao}
</select>

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

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

相关文章

基于模型预测算法的含储能微网双层能量管理模型

基于模型预测算法的含储能微网双层能量管理模型 文章目录 基于模型预测算法的含储能微网双层能量管理模型一、项目介绍二、源程序下载 一、项目介绍 代码主要做的是一个微网双层优化调度模型&#xff0c;微网聚合单元包括风电、光伏、储能以及超级电容器&#xff0c;在微网的运…

ELFK (Filebeat+ELK)日志分析系统

一. 相关介绍 Filebeat&#xff1a;轻量级的开源日志文件数据搜集器。通常在需要采集数据的客户端安装 Filebeat&#xff0c;并指定目录与日志格式&#xff0c;Filebeat 就能快速收集数据&#xff0c;并发送给 logstash 进或是直接发给 Elasticsearch 存储&#xff0c;性能上相…

Maven、redis、javaJDK环境配置及安装

一、Maven下载配置 Maven下载地址 下载完成完成配置环境变量 新建系统变量 MAVEN_HOME 地址 设置MAVEN… mvn -v 检测成功 二 、redis安装 下载地址 在安装目录cmd输入redis-server --version检测版本号 三、JAVA配置 设置JAVA… 测试

【Vue3语法单文件——自用】

1. Vue3基础语法 <script setup> import { ref,computed } from vue// 定义响应式的变量 const count ref(0) const author ref({name: John Doe,books: [Vue 2 - Advanced Guide,Vue 3 - Basic Guide,Vue 4 - The Mystery] }) //定义props const props defineProps(…

贪心算法|56.合并区间

力扣题目链接 class Solution { public:vector<vector<int>> merge(vector<vector<int>>& intervals) {vector<vector<int>> result;if (intervals.size() 0) return result; // 区间集合为空直接返回// 排序的参数使用了lambda表达…

Mongodb前后端整合篇

一、前端篇 1.1mongoose介绍 Mongoose 是一个对象文档模型库&#xff0c;官网 http://www.mongoosejs.net/ 方便使用代码操作 mongodb 数据库pnpm i mongoose5.13.15 1.2初步使用 import mongoose from mongoose; //设置 strictQuery 为 true mongoose.set(strictQuery, true…

ubuntu或类Debian获取某些包的离线版本-包括依赖(还有一些意想不到的用途,哈哈)

前言 偶尔能碰到很特殊的情况。网址白名单&#xff0c;纯内网&#xff0c;超多依赖及一些很难描述的场景。 比如一些少见的发行版缺少某些包。这时候可以找一台类似的系统环境来下载离线包及 其依赖包&#xff0c;然后转移到内网进行安装。如果是网址白名单&#xff0c;或者纯内…

为什么需要网络切片?

网络切片是电信领域的一个突破性概念&#xff0c;它允许将物理网络基础设施划分为多个虚拟网络&#xff0c;称为切片。每个切片作为一个独立的网络运行&#xff0c;拥有自己的专用资源和定制的特性&#xff0c;满足不同应用、行业或用户的特定需求。 将网络切片视为在共享物理…

计算机网络——交换机和路由器

目录 前言 引言 交换机是用来做什么的&#xff1f; 与路由器有什么区别&#xff1f; 网关 子网掩码 网关、路由 前言 本博客是博主用于复习计算机网络的博客&#xff0c;如果疏忽出现错误&#xff0c;还望各位指正。 这篇博客是在B站掌芝士zzs这个UP主的视频的总结&am…

【论文阅读】Digging Into Self-Supervised Monocular Depth Estimation

论文&#xff1a;https://arxiv.org/pdf/1806.01260.pdf 代码&#xff1a;https://github.com/nianticlabs/monodepth2 Q: 这篇论文试图解决什么问题&#xff1f; A: 这篇论文试图解决的问题是如何提高仅使用单目图像进行深度估计的性能。具体来说&#xff0c;它关注的是如何…

[大模型]Qwen1.5-7B-Chat-GPTQ-Int4 部署环境

Qwen1.5-7B-Chat-GPTQ-Int4 部署环境 说明 Qwen1.5-72b 版本有BF16、INT8、INT4三个版本&#xff0c;三个版本性能接近。由于BF16版本需要144GB的显存&#xff0c;让普通用户忘却止步&#xff0c;而INT4版本只需要48GB即可推理&#xff0c;给普通用户本地化部署创造了机会。&…

Linux 函数学习 poll

1、Linux poll 函数 int poll(struct pollfd *fds, nfds_t nfds, int timeout); fds&#xff1a; 需要轮询的fd集合 nfds&#xff1a;需要轮询的fds数量 timeout&#xff1a;超时时间 返回值&#xff1a;0 超时&#xff0c;<0 发生异常&#xff0c;> 0 存在数据变化 …

函数、指针和数组的相互运用(C语言)

1、函数指针数组 含义&#xff1a;数组的每个元素都是函数指针类型.eg&#xff1a; &#xff08;此代码链接&#xff1a;http://t.csdnimg.cn/ClJmb.也可以在我发布博客中找到&#xff09; 2、指向函数指针数组的指针 1、引入 3、回调函数 1、含义&#xff1a;就是一个通过…

【嵌入式之中断】

Cortex-M4集成了嵌套式矢量型中断控制器(Nested Vectored Interrupt Controller (NVIC))来实现高效的异常和中断处理。NVIC实现了低延迟的异常和中断处理&#xff0c;以及电源管理控制。它和内核是紧密耦合的。 凡是打断程序顺序执行的事件都称为异常&#xff08;exception&am…

uniapp h5项目实现多选按钮/多选标签/多选框

需求&#xff1a;实现简单多选功能&#xff0c;遍历数据&#xff0c;添加样式 1.效果图 2.以下代码粘贴到代码中&#xff0c;可直接运行&#xff0c;html代码 <view class"page index"><view class"list-box"><view v-for"(item,in…

【力扣】-- 移除链表元素

&#x1f308; 个人主页&#xff1a;白子寰 &#x1f525; 分类专栏&#xff1a;python从入门到精通&#xff0c;魔法指针&#xff0c;进阶C&#xff0c;C语言&#xff0c;C语言题集&#xff0c;C语言实现游戏&#x1f448; 希望得到您的订阅和支持~ &#x1f4a1; 坚持创作博文…

Github 2024-04-11 开源项目日报 Top10

根据Github Trendings的统计,今日(2024-04-11统计)共有10个项目上榜。根据开发语言中项目的数量,汇总情况如下: 开发语言项目数量TypeScript项目4Python项目3JavaScript项目1Cuda项目1Jupyter Notebook项目1非开发语言项目1Dify.AI: 开源的LLM应用程序开发平台 创建周期:29…

C语言 | Leetcode C语言题解之第21题合并两个有序链表

题目&#xff1a; 题解&#xff1a; /*** Definition for singly-linked list.* struct ListNode {* int val;* struct ListNode *next;* };*/typedef struct ListNode ListNode; struct ListNode* mergeTwoLists(struct ListNode* list1, struct ListNode* list2) {/…

基于Vue的宠物领养系统的设计与实现(论文+源码)_kaic

目 录 摘 要 ABSTRACT 1 引言 1.1 课题背景 1.2 设计原则 1.3 论文组织结构 2 系统关键技术 2.1 JSP技术 2.2 JAVA技术 2.3 B/S结构 2.4 MYSQL数据库 3 系统分析 3.1 可行性分析 3.1.1 操作可行性 3.1.2 经济可行性 3.1.3 技术可行性 3.1.4 法律可行性 3.2 系统功能分析 3.3…

SpringClout 引用 xxjob定时任务

SpringClout 引用 xxjob定时任务 下载源码组成部分调度中心使用步骤修改调度中心配置配置解释启动验证 执行器使用步骤修改执行器配置执行器组件配置启动创建定时任务创建任务代码 [附加已有项目调用xxjob API](https://blog.csdn.net/fannan521/article/details/132707242) 下…