每日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].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”)

实现代码:

List<JishinianyejitongjiEntity> selectJiShixiaofeixinxis(@Param("jishiNames") List<String> jishiNames);

相关推荐

  1. Bug汇总

    2024-04-13 05:36:04       24 阅读
  2. PX4 Bug汇总

    2024-04-13 05:36:04       58 阅读
  3. python遇到bug问题汇总

    2024-04-13 05:36:04       54 阅读
  4. <span style='color:red;'>day</span><span style='color:red;'>05</span>

    day05

    2024-04-13 05:36:04      46 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-13 05:36:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-13 05:36:04       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-13 05:36:04       82 阅读
  4. Python语言-面向对象

    2024-04-13 05:36:04       91 阅读

热门阅读

  1. 链表题(哑结点的使用)

    2024-04-13 05:36:04       36 阅读
  2. Photoshop小记

    2024-04-13 05:36:04       39 阅读
  3. CentOS版本不同大小的各个版本区别

    2024-04-13 05:36:04       39 阅读
  4. Igh related:Small Bug And Notes Record.

    2024-04-13 05:36:04       43 阅读
  5. OpenCV C++ 学习笔记(一)

    2024-04-13 05:36:04       40 阅读