当前位置: 首页 > news >正文

每日Bug汇总--Day05

Bug汇总—Day05

一、项目运行报错

二、项目运行Bug

1、**问题描述:**前端将从后台查询的数据作为参数进行get请求,参数为空
image-20240412112802690

原因分析:

  • 这种写法可能只支全局的参数
  • 调用方法的传参响应

代码实现

if (this.jishiName) {this.$http({url: `huiyuanyuyuexinxi/xiaofei/${this.jishiName}`,method: 'get'}).then(res => {console.log(res.data)// 读取接口请求成功回传回来的数据var Huiyuanxiaofeixinxis = res.data.Huiyuanxiaofeixinxis// 定义数组,存放一会覆盖echarts图形的数据var data = []console.log(Huiyuanxiaofeixinxis.length)// 循环遍历数组,取出数据,转成和data一样的格式for (var i = 0; i < Huiyuanxiaofeixinxis.length; i++) {var d = { name: '', value: 0 }d.name = Huiyuanxiaofeixinxis[i].xingmingd.value = Huiyuanxiaofeixinxis[i].nianxiaofeie// 往data数组中添加数据data.push(d)}// 排序,b - a降序——a - b升序data.sort((a, b) => b.value - a.value)// 覆盖data(){}中全局变量的数据this.dataHuiyuanXiaoliang = data// 画出图形this.DrawNian()}).catch(err => {console.log(err)console.log("后台接口请求失败!")})} else {this.$http({url: `jishi/jishiName/${this.$storage.get('adminName')}`,method: 'get'}).then(res => {console.log(res.data.data)this.jishiName = res.data.datathis.$http({url: `huiyuanyuyuexinxi/xiaofei/${this.jishiName}`,method: 'get'}).then(res => {console.log(res.data)// 读取接口请求成功回传回来的数据var Huiyuanxiaofeixinxis = res.data.Huiyuanxiaofeixinxis// 定义数组,存放一会覆盖echarts图形的数据var data = []console.log(Huiyuanxiaofeixinxis.length)// 循环遍历数组,取出数据,转成和data一样的格式for (var i = 0; i < Huiyuanxiaofeixinxis.length; i++) {var d = { name: '', value: 0 }d.name = Huiyuanxiaofeixinxis[i].xiangmumingchengd.value = Huiyuanxiaofeixinxis[i].count// 往data数组中添加数据data.push(d)}// 排序,b - a降序——a - b升序data.sort((a, b) => b.value - a.value)// 覆盖data(){}中全局变量的数据this.dataHuiyuanXiaoliang = data// 画出图形this.DrawNian()}).catch(err => {console.log(err)console.log("后台接口请求失败!")})console.log("技师姓名查询成功!")})}

2、问题描述: Parameter ‘jishiNames’ not found. Available parameters are [collection, list]

解决思路: 在DAO层方法参数加注解@Param(“jishiNames”)

实现代码:

List<JishinianyejitongjiEntity> selectJiShixiaofeixinxis(@Param("jishiNames") List<String> jishiNames);
http://www.lryc.cn/news/337387.html

相关文章:

  • docker、ctr、crictl命令对比
  • uniapp 编译后分包下静态图片404问题解决方案
  • 第十二届蓝桥杯大赛软件赛省赛Java 大学 B 组题解
  • 关于openai和chatgpt、gpt-4、PyTorch、TensorFlow 两者和Transformers的关系
  • C 共用体
  • 智能合约:未来数字经济的基石
  • 第十一届蓝桥杯大赛软件赛省赛C/C++ 大学 B 组
  • Lua语法(三)——元表与元方法
  • Lua语法(五)——垃圾回收
  • 已解决java.net.NoRouteToHostException: 无法到达主机异常的正确解决方法,亲测有效!!!
  • 代码随想录算法训练营第三十八天| 509. 斐波那契数,70. 爬楼梯,746. 使用最小花费爬楼梯
  • 视频中会动的进度条
  • C++高级特性:柯里化过程与std::bind(六)
  • vmware虚拟机补救
  • 数据结构(算法)
  • SpringCloud集成SkyWalking链路追踪并收集日志2
  • 纯小白蓝桥杯备赛笔记--DAY4(数学数据结构图论)
  • python 最简单的网页爬虫
  • 二叉树-数据结构
  • ansible使用shell模块的环境变量问题
  • ChatGPT论文写作指南:写出引人注目的论文
  • ARM64架构栈帧回溯
  • LangChain:大型语言模型(LLMs)-- 基础知识
  • 总分410+专业130+国防科技大学831信号与系统考研经验国防科大电子信息与通信工程,真题,大纲,参考书。
  • chatgpt Team 4.0共享合租账号的新方式
  • 类和对象二
  • GD32 HID键盘矩阵键盘发送数据时,一直发送数据问题处理
  • 小程序地理位置权限申请+uniapp调用uni.getLocation
  • 后台权限控制及动态路由
  • 云计算:Linux 部署 OVS 集群(控制端)实现OpenFlow