摘要: 直接上代码: 1、在vue中main.js中引入echarts import echarts from 'echarts' Vue.prototype.$echarts = echarts 2、折线图 drawLine(id, data) { const ct = this.$echarts.ini 阅读全文
posted @ 2020-04-01 11:02 御简 阅读(610) 评论(0) 推荐(0) 编辑
摘要: 需求说明: 前端某个折线图需要展示历史数据,时效性并不强,主要是看一个大体的趋势。但是数据量较大,为了提高查询速度,采用对数据稀释和引入Redis缓存。 1、首先是获取数据,我获取回来的是List<Map<String, Object>>类型 2、稀释数据,我把它稀释到不超过200条,这样对于一个展 阅读全文
posted @ 2020-04-01 10:29 御简 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 直接上代码: 1、定义静态方法 import com.alibaba.fastjson.JSON; public class MessageUtils implements Cloneable { private static final MessageUtils instance = new Me 阅读全文
posted @ 2020-04-01 09:57 御简 阅读(726) 评论(0) 推荐(0) 编辑
摘要: 直接上代码: 1、定义配置类 import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframe 阅读全文
posted @ 2020-04-01 09:40 御简 阅读(1379) 评论(0) 推荐(0) 编辑
摘要: 直接上代码: 1、定义一个配置类 import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframe 阅读全文
posted @ 2020-04-01 09:13 御简 阅读(2508) 评论(0) 推荐(0) 编辑