每日Bug汇总--Day05

Bug汇总---Day05

一、项目运行报错

二、项目运行Bug

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

原因分析:

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

代码实现

js 复制代码
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].xingming
          d.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.data
        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].xiangmumingcheng
            d.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")

实现代码:

java 复制代码
List<JishinianyejitongjiEntity> selectJiShixiaofeixinxis(@Param("jishiNames") List<String> jishiNames);
相关推荐
SimonKing3 分钟前
颠覆传统IO:零拷贝技术如何重塑Java高性能编程?
java·后端·程序员
sniper_fandc14 分钟前
SpringBoot系列—MyBatis(xml使用)
java·spring boot·mybatis
梦想CAD控件23 分钟前
WEB CAD与Mapbox结合实现在线地图和CAD编辑(CGCS2000)
前端·javascript·vue.js
胚芽鞘68142 分钟前
查询依赖冲突工具maven Helper
java·数据库·maven
Charlie__ZS1 小时前
若依框架去掉Redis
java·redis·mybatis
screenCui1 小时前
macOS运行python程序遇libiomp5.dylib库冲突错误解决方案
开发语言·python·macos
bitbitDown1 小时前
我用Playwright爬了掘金热榜,发现了这些有趣的秘密... 🕵️‍♂️
前端·javascript·vue.js
markyankee1011 小时前
Vue 表单输入绑定终极指南:从基础到企业级实践
vue.js
借月1 小时前
🎯 用 Vue + SVG 实现一个「蛇形时间轴」组件,打造高颜值事件流程图
vue.js
tianchang1 小时前
SSR 深度解析:从原理到实践的完整指南
前端·vue.js·设计模式