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

微乐校园pf

@TOC

springboot451微乐校园pf

绪论

1.1 研究背景

当前社会各行业领域竞争压力非常大,随着当前时代的信息化,科学化发展,让社会各行业领域都争相使用新的信息技术,对行业内的各种相关数据进行科学化,规范化管理。这样的大环境让那些止步不前,不接受信息改革带来的信息技术的企业随时面临被淘汰,被取代的风险。所以当今,各个行业领域,不管是传统的教育行业,餐饮行业,还是旅游行业,医疗行业等领域都将使用新的信息技术进行信息革命,改变传统的纸质化,需要人手工处理工作事务的办公环境。软件信息技术能够覆盖社会各行业领域是时代的发展要求,各种数据以及文件真正实现电子化是信息社会发展的不可逆转的必然趋势。本微乐校园也是紧跟科学技术的发展,运用当今一流的软件技术实现软件系统的开发,让考试信息完全通过管理系统实现科学化,规范化,程序化管理。从而帮助信息管理者节省事务处理的时间,降低数据处理的错误率,对于基础数据的管理水平可以起到促进作用,也从一定程度上对随意的业务管理工作进行了避免,同时,微乐校园的数据库里面存储的各种动态信息,也为上层管理人员作出重大决策提供了大量的事实依据。总之,微乐校园是一款可以真正提升管理者的办公效率的软件系统。

1.2 目的和意义

信息数据的处理完全依赖人工进行操作,会耗费大量的人工成本,特别是面对大量的数据信息时,传统人工操作不仅不能对数据的出错率进行保证,还容易出现各种信息资源的低利用率与低安全性问题。更有甚者,耽误大量的宝贵时间,尤其是对信息的更新,归纳与统计更是耗财耗力的过程。所以电子化信息管理的出现就能缓解以及改变传统人工方式面临的处境,一方面可以确保信息数据在短时间被高效处理,还能节省人力成本,另一方面可以确保信息数据的安全性,可靠性,并可以实现信息数据的快速检索与修改操作,这些优点是之前的旧操作模式无法比拟的。因此微乐校园为数据信息的管理模式的升级与改革提供了重要的窗口。

1.3 论文结构安排

为了帮助用户更好的了解和理解程序的开发流程与相关内容,本文将通过六个章节进行内容阐述。

第一章:描述了程序的开发背景,程序运用于现实生活的目的与意义,以及程序文档的结构安排信息;

第二章:描述了程序的开发环境,包括程序开发涉及到的技术,程序开发使用的数据存储工具等信息;

第三章:描述了程序着手进行开发时,会面临的可行性问题,并对程序功能以及性能要求进行描述;

第四章:描述了程序大功能模块下的功能细分信息,以及存储程序数据的数据库表文件结构的设计信息等;

第五章:描述了程序的功能实现界面的内容,也对程序操作人员操作的部分功能进行了描述;

第六章:描述了程序功能的测试内容,并介绍了系统测试的概念与方法。

2 相关技术

2.1 SSM框架介绍

本课题程序开发使用到的框架技术,英文名称缩写是SSM,在JavaWeb开发中使用的流行框架有SSH、SSM、SpringMVC等,作为一个课题程序采用SSH框架也可以,SSM框架也可以,SpringMVC也可以。SSH框架是属于重量级别的框架,配置繁琐,不够灵活,修改程序需要修改好多个文件,并且运行起来也占用内存较高,CPU使用率相对也高,SpringMVC是Spring开发的一套MVC架构,更灵活更好用,SSM框架取中间值,既没有SSH臃肿,也没有SpringMVC简化,属于中间级别的,在配置过程和使用过程中更能编写和理解。MyBatis框架取代Hibernate框架是因为它更灵活,不需要完全在框架里操作,它在数据操作上可以写出更灵活的代码,它的性能也比Hibernate框架更稳定。总的来说,使用SSM框架是通过综合考虑而使用的,网上有很多的使用教程和心得体会,而且SSM又是这么的流行,用SSM框架开发是顺其自然的。

2.2 VUE介绍

Vue (读音 /vjuː/,类似于 view) 是一套用于构建用户界面的渐进式框架。与其它大型框架不同的是,Vue 被设计为可以自底向上逐层应用。Vue 的核心库只关注视图层,不仅易于上手,还便于与第三方库或既有项目整合。另一方面,当与现代化的工具链以及各种支持类库结合使用时,Vue 也完全能够为复杂的单页应用提供驱动。

2.3 Mysql数据库介绍

开发的程序面向用户的只是程序的功能界面,让用户操作程序界面的各个功能,那么很多人就会问,用户使用程序功能生成的数据信息放在哪里的?这个就需要涉及到数据库的知识了,一般来说,程序开发通常就会对常用数据存储工具的特点进行分析比对,比如Mysql数据库的特点与优势,Access数据库的特点与优势,Sqlserver数据库的特点与优势等,最终看哪个数据库与需要开发的程序比较匹配,也符合程序功能运行需要的数据存储要求,比如,需要开发商业级别的程序,存储的数据对数据库要求较高,可以选用Oracle,如果只是比较简单的程序,对数据存储没有过多要求,可以选用微软旗下的Access,当开发程序要求数据库占用空间小,并能满足程序数据存储要求时,就可以考虑Oracle公司从瑞典MySQL AB公司在很早之前就收购过一个关系型数据库,它是现在的Mysql数据库。在数据库工具里面它是最受认可的其中一个应用软件。需要说明的信息就是,本程序的开发就运用到了此数据库。它将程序数据通过使用不同的数据表格进行保存,在增加了程序数据的存储速度的时候,也提高了数据库的灵活性。 图2.3展示的就是MySQL的架构图。

图2.3 MySQL数据库架构图

3 系统分析

当用户确定开发一款程序时,是需要遵循下面的顺序进行工作,概括为:系统分析-->系统设计-->系统开发-->系统测试,无论这个过程是否有变更或者迭代,都是按照这样的顺序开展工作的。系统分析就是分析系统需要做什么的问题,主要目的就是确定系统的功能,这也为接下来的工作做了一个好的开端。

3.1 系统可行性分析

开发一款程序软件不仅需要时间,也需要人力,物力资源。而进行可行性分析这个环节就是解决用户这方面的疑问,看看程序在当前的条件下是否可以进行开发。

3.1.1 技术可行性分析

此程序选用的开发语言是Java,这种编程语言有着丰富的数据类型,在指令控制语句上也比较完善,更重要的就是对类与对象的大力支持,这些优点为程序开发者提供了技术保障,尤其是现在代码都逐渐模块化,有关系统功能开发的源码在网络上都公开展示了,所以让具备一定计算机开发基础的开发人员独立开发系统在技术上也逐渐容易。

3.1.2 经济可行性分析

开发此程序最关键的设备就是一台电脑,无论是学校计算机室配备的电脑,还是自己入学以来购置的笔记本,都是可以符合开发要求的设备,另外在网络上,学校本已完全覆盖了校园网,所以在设备以及网络上无须考虑经济问题。

3.1.3 运行可行性分析

随着电脑软件以及配套硬件的完善升级,当下的计算机环境是一片大好,尤其是计算机已经广泛普及到家家户户,所以计算机设备现在是随处可见,由于本次开发的程序占有的资源耗费较小,在一般的电脑或笔记本上都能轻松运转起来。

通过上面的可行性描述,可以从经济,技术,运行方面解决程序开发是否可行的问题。因此可以认为该程序软件是可以进行开发的。

3.2 系统性能分析

系统性能分析也是比较重要的内容,进行系统性能分析就是为了确保系统的功能要能够在生活中运行使用时,达到规定的指标,因此一个完整的系统软件,是需要进行系统的性能分析这个步骤的。本次进行性能分析主要从易用性指标,可扩展性指标,系统健壮性指标,系统安全性指标这几个方面进行分析。

3.2.1 易用性指标

本次程序软件的开发的目的就是让使用者可以通过使用该软件提高信息数据的管理效率,同时该程序软件也需要针对不同的操作用户设置对应的功能,因此,此程序的操作流程应该尽量与用户日常操作软件的行为习惯相贴合,另外,程序软件的设计与开发也应考虑非计算机专业用户的计算机操作水平,要让大部分使用者都可以轻松操作程序提供的各个功能。

3.2.2 可扩展性指标

当前需要开发的程序软件是根据当下的用户需求进行设计开发的,但是随着时间的推移,社会大环境的改变,开发出的程序也是需要与时俱进的,需要根据用户不断变换的需求进行相应的功能内容的扩展,需要注意的就是,当对成型的程序进行功能模块新增时,仍然需要保证程序原有架构以及功能不能受到影响,新增的功能模块在系统中也能够运行正常,该指标达标也就可以保证此程序是可以在满足信息管理要求下,从容应对市场环境的变化。

3.2.3 健壮性指标

程序软件的开发就是为了投入使用时,可以一直稳定的处理各种数据信息,程序软件一旦不稳定,也会给使用者带来干扰。因此从性能分析的角度,就要要求程序软件在应对使用者的误操作,或者是使用者因为各种原因,填写有误的数据等情况时,程序要一直保持稳定,并能够正常让使用者进行使用。当程序的某个功能模块出现异常时,程序的其它功能模块也要能够确保正常使用。程序的健壮性指标达标可以让使用者产生良好的用户体验。

3.2.4 安全性指标

程序软件的安全问题是首要问题,毕竟程序对应数据库里面存放的数据信息是庞大的,里面也包括了许多重要的个人信息,这就对程序要具备一个完善的安全机制提出了要求。因此程序必须要设置登录功能用以进行用户身份的检查,以及身份和权限的匹配,通过对不同用户身份进行功能约束,绝不容忍用户越权操作程序。另外,也需要时刻防范计算机病毒,还有黑客,通过采取针对性的办法进行安全应对,确保程序时刻处于安全的环境,让使用者放心使用。

3.3 系统流程分析

3.3.1 操作流程分析

程序上交给用户进行使用时,需要提供程序的操作流程图(如图3.1所示),这样便于用户容易理解程序的具体工作步骤,现如今程序的操作流程都有一个大致的标准,即先通过登录页面提交登录数据,通过程序验证正确之后,用户才能在程序功能操作区页面操作对应的功能。

图3.1 程序操作流程图

3.3.2 登录流程分析

在这个部分,需要对程序的登录功能模块的运行流程(如图3.2所示),进行单独说明。程序设置登录模块也是为了安全起见,让用户使用放心,登录模块主要就是让用户提交登录信息,程序进行数据验证,验证通过的用户才能够成功登录程序。

图3.2 程序登录流程图

3.3.3 信息添加流程分析

程序的添加功能就是提供给操作者录入信息的功能,不管是涉及到用户信息添加,还是其它功能模块涉及到的信息添加,程序的信息添加流程(如图3.3所示)都是一致的。程序都是先对操作者录入的数据进行判定,这个判定规则是一段提前编写完成的程序代码,当程序判定数据符合要求时,才会把操作者录入的数据登记在数据表里面,比如添加的用户信息,就会把新添加的用户信息写入用户信息的数据表文件里面。

图3.3 信息添加流程图

3.3.4 信息删除流程分析

当从程序里面删除某种无效数据时,遵循程序的信息删除流程(如图3.4所示),先要选中操作者需要删除的数据,程序为了预防操作者误删信息,也会进行提示,当操作者真正确定要删选中的信息时,该信息就会从数据库中被永久删除。

图3.4 信息删除流程图

3.4 系统功能分析

程序功能需要花费一定时间进行分析与设计,需要从大量的参考资料或者是社会上同种类型的程序中吸收对此程序开发有用的知识,可以将其它同类型程序中的合理功能部分规划到此程序里面,另外程序功能也需要针对用户的需求进行分析与设计。

4 系统设计

4.1 总体功能

微乐校园是根据需求定制开发,开发软件选用idea平台配合MySQL数据库进行开发环境的搭建操作,网站采用为微信小程序结构进行开发,用户通过小程序访问项目,管理人员通过访问系统数据仅仅需要在客户端安装谷歌浏览器或者是当下常用浏览器就可以访问网站后台管理内容。

4.2 系统概要设计

本次拟开发的系统为了节约开发成本,也为了后期在维护和升级上的便利性,打算通过浏览器来实现系统功能界面的展示,让程序软件的主要事务集中在后台的服务器端处理,前端部分只用处理少量的事务逻辑。下面使用一张图(如图4.2所示)来说明程序的工作原理。

图4.2 程序工作的原理图

4.3 系统功能结构设计

在分析并得出使用者对程序的功能要求时,就可以进行程序设计了。如图4.3展示的就是管理员功能结构图,管理员在后台主要管理代跑管理、代跑收藏管理、代跑留言管理、代跑订单管理、字典管理、叫车管理、用户咨询管理、二手商品管理、二手商品评价管理、二手商品订单管理、失物招领管理、司机管理、用户管理、约战校园管理、约战校园留言管理、管理员管理等。

结构设计图

图4.3 管理员功能结构图

4.4 数据库设计

程序功能操作不管是添加,修改,还是删除等功能产生的数据都是经由数据库进行数据保存和更新的,所以一个数据库设计的好坏也是程序是否好坏的判定标准,因为程序的成功,有一半的功劳都是靠数据库的优秀设计。数据库一旦设计得良好是可以减轻开发人员的开发负担的。

4.4.1 数据库E-R图设计

这个部分的设计需要使用到E-R图绘制工具,常用的工具就是Visio工具来绘制E-R模型图,这款工具不仅可以快速创建需要的E-R模型图,而且该工具提供的操作界面很简单,可以短时间内修改绘图界面的图形或者是文字的属性。在绘制E-R模型图时,要分清楚各个图形代表的含义,以免绘制出错,E-R模型图由长方形(实体),椭圆形(属性),菱形(关系)这三部分图形符号组成,绘制期间要区分开来,用准确的图形符号代表相应的数据元素。

(1)下图是代跑订单实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\代跑订单.jpg

代跑订单实体属性图

(2)下图是用户实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\用户.jpg

用户实体属性图

(3)下图是代跑实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\代跑.jpg

代跑实体属性图

(4)下图是失物招领实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\失物招领.jpg

失物招领实体属性图

(5)下图是司机实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\司机.jpg

司机实体属性图

(6)下图是代跑留言实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\代跑留言.jpg

代跑留言实体属性图

(7)下图是二手商品实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\二手商品.jpg

二手商品实体属性图

(8)下图是叫车实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\叫车.jpg

叫车实体属性图

(9)下图是约战校园实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\约战校园.jpg

约战校园实体属性图

(10)下图是用户咨询实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\用户咨询.jpg

用户咨询实体属性图

(11)下图是二手商品评价实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\二手商品评价.jpg

二手商品评价实体属性图

(12)下图是二手商品订单实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\二手商品订单.jpg

二手商品订单实体属性图

(13)下图是代跑收藏实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\代跑收藏.jpg

代跑收藏实体属性图

(14)下图是约战校园留言实体和其具备的属性。

C:/Users/Administrator/Desktop/temp111\7.2\img\约战校园留言.jpg

约战校园留言实体属性图

4.4.2 数据库表结构设计

数据库系统一旦选定之后,需要根据程序要求在数据库中建立数据库文件,并在已经完成创建的数据库文件里面,为程序运行中产生的数据建立对应的数据表格,数据表结构设计就是对创建的数据表格进行字段设计,字段长度设计,字段类型设计等,当数据表格合理设计完成之后,才能正常存储相关程序运行产生的数据信息。

表4.1代跑表

序号列名数据类型说明允许空
1IdIntid
2yonghu_idInteger用户
3daipiao_nameString代跑标题
4daipiao_photoString代跑照片
5daipiao_addressString代跑地点
6daipiao_lianxirenString联系人
7daipiao_lianxifangshiString联系方式
8daipiao_typesInteger代跑类型
9daipiao_new_moneyBigDecimal代跑金额
10daipiao_timeDate代跑时间
11daipiao_contentString代跑内容
12daipiao_zhuangtai_typesInteger代跑状态
13insert_timeDate录入时间
14create_timeDate创建时间

表4.2代跑收藏表

序号列名数据类型说明允许空
1IdIntid
2daipiao_idInteger代跑
3yonghu_idInteger用户
4daipiao_collection_typesInteger类型
5insert_timeDate收藏时间
6create_timeDate创建时间

表4.3代跑留言表

序号列名数据类型说明允许空
1IdIntid
2daipiao_idInteger代跑
3yonghu_idInteger用户
4daipiao_liuyan_textString留言内容
5insert_timeDate留言时间
6reply_textString回复内容
7update_timeDate回复时间
8create_timeDate创建时间

表4.4代跑订单表

序号列名数据类型说明允许空
1IdIntid
2daipiao_order_uuid_numberString订单号
3daipiao_idInteger代跑
4yonghu_idInteger用户
5daipiao_order_true_priceBigDecimal实付价格
6daipiao_order_typesInteger订单类型
7daipiao_order_payment_typesInteger支付类型
8insert_timeDate订单创建时间
9create_timeDate创建时间

表4.5字典表

序号列名数据类型说明允许空
1IdIntid
2dic_codeString字段
3dic_nameString字段名
4code_indexInteger编码
5index_nameString编码名字
6super_idInteger父字段id
7beizhuString备注
8create_timeDate创建时间

表4.6叫车表

序号列名数据类型说明允许空
1IdIntid
2yonghu_idInteger用户
3siji_idInteger司机
4jiaoche_uuid_numberString叫车编号
5jiaoche_nameString叫车标题
6jiaoche_photoString叫车照片
7shangche_timeDate上车时间
8jiaoche_addressString上车地点
9jiaoche_quwang_addressString去往地点
10jiaoche_typesInteger叫车类型
11jiaoche_new_moneyBigDecimal出价
12jiaoche_contentString叫车详情
13insert_timeDate叫车时间
14jiaoche_zhuangtai_typesInteger叫车状态
15create_timeDate创建时间

表4.7用户咨询表

序号列名数据类型说明允许空
1IdIntid
2yonghu_idInteger提问人
3siji_idInteger回答人
4jiaoche_chat_issue_textString问题
5issue_timeDate问题时间
6jiaoche_chat_reply_textString回复
7reply_timeDate回复时间
8zhuangtai_typesInteger状态
9jiaoche_chat_typesInteger数据类型
10insert_timeDate提问时间
11create_timeDate创建时间

表4.8二手商品表

序号列名数据类型说明允许空
1IdIntid
2yonghu_idInteger用户
3shangpin_nameString二手商品名称
4shangpin_uuid_numberString二手商品编号
5shangpin_photoString二手商品照片
6shangpin_typesInteger商品类型
7shangpin_kucun_numberInteger二手数量
8shangpin_old_moneyBigDecimal二手商品原价
9shangpin_new_moneyBigDecimal现价/个
10shangpin_clicknumInteger二手商品热度
11shangpin_contentString二手商品介绍
12shangpin_deleteInteger逻辑删除
13insert_timeDate录入时间
14create_timeDate创建时间

表4.9二手商品评价表

序号列名数据类型说明允许空
1IdIntid
2shangpin_idInteger二手商品
3yonghu_idInteger用户
4shangpin_commentback_textString评价内容
5insert_timeDate评价时间
6reply_textString回复内容
7update_timeDate回复时间
8create_timeDate创建时间

表4.10二手商品订单表

序号列名数据类型说明允许空
1IdIntid
2shangpin_order_uuid_numberString订单号
3shangpin_idInteger二手商品
4yonghu_idInteger用户
5buy_numberInteger购买数量
6shangpin_order_true_priceBigDecimal实付价格
7shangpin_order_courier_nameString联系人
8shangpin_order_courier_numberString联系方式
9shangpin_order_typesInteger订单类型
10shangpin_order_payment_typesInteger支付类型
11insert_timeDate订单创建时间
12create_timeDate创建时间

表4.11失物招领表

序号列名数据类型说明允许空
1IdIntid
2yonghu_idInteger用户
3shiwuzhaoling_nameString物品名称
4shiwuzhaoling_uuid_numberString物品编号
5shiwuzhaoling_photoString物品照片
6shiwuzhaoling_addressString丢失地点/找到地点
7shiwuzhaoling_typesInteger物品类型
8jutishijian_timeDate具体时间
9shiwuzhaoling_clicknumInteger热度
10shiwuzhaoling_contentString详细描述
11shiwuzhaoling_zhuangtai_typesInteger状态
12insert_timeDate录入时间
13create_timeDate创建时间

表4.12司机表

序号列名数据类型说明允许空
1IdIntid
2siji_nameString司机姓名
3siji_phoneString司机手机号
4siji_id_numberString司机身份证号
5siji_photoString司机头像
6new_moneyBigDecimal余额
7siji_emailString电子邮箱
8create_timeDate创建时间

表4.13用户表

序号列名数据类型说明允许空
1IdIntid
2yonghu_nameString用户姓名
3yonghu_phoneString用户手机号
4yonghu_id_numberString用户身份证号
5yonghu_photoString用户头像
6yonghu_emailString电子邮箱
7new_moneyBigDecimal余额
8create_timeDate创建时间

表4.14约战校园表

序号列名数据类型说明允许空
1IdIntid
2yonghu_idInteger用户
3yuezhanxiaoyuan_nameString约战校园名称
4yuezhanxiaoyuan_photoString约战校园照片
5yuezhan_timeDate约战时间
6yuezhanxiaoyuan_addressString约战地点
7yuezhanxiaoyuan_typesInteger约战校园类型
8yuezhanxiaoyuan_clicknumInteger约战校园热度
9yuezhanxiaoyuan_contentString约战内容
10yuezhanxiaoyuan_deleteInteger逻辑删除
11insert_timeDate录入时间
12create_timeDate创建时间

表4.15约战校园留言表

序号列名数据类型说明允许空
1IdIntid
2yuezhanxiaoyuan_idInteger约战校园
3yonghu_idInteger用户
4yuezhanxiaoyuan_liuyan_textString留言内容
5insert_timeDate留言时间
6reply_textString回复内容
7update_timeDate回复时间
8create_timeDate创建时间

表4.16管理员表

序号列名数据类型说明允许空
1IdIntid
2usernameString学生名
3passwordString密码
4roleString角色
5addtimeDate新增时间

5 系统实现

系统实现部分就是将系统分析,系统设计部分的内容通过编码进行功能实现,以一个实际应用系统的形式展示系统分析与系统设计的结果。前面提到的系统分析,系统设计最主要还是进行功能,系统操作逻辑的设计,也包括了存储数据的数据库方面的设计等内容,系统实现就是一个最终的实施阶段,将前面的设计成果进行物理转化,最终出具可以运用于实际的软件系统。

5.1 管理员功能介绍

5.1.1 约战校园列表

如图5.1显示的就是约战校园列表页面,此页面提供给管理员的功能有:查看约战校园、新增约战校园、修改约战校园、删除约战校园等。

图5.1 约战校园列表页面

5.1.2 代跑信息管理

代跑信息管理页面提供的功能操作有:新增代跑,修改代跑,删除代跑操作。下图就是代跑信息管理页面。

图5.3 代跑信息管理页面

5.1.3代跑类型管理

代跑类型管理页面显示所有代跑类型,在此页面既可以让管理员添加新的代跑信息类型,也能对已有的代跑类型信息执行编辑更新,失效的代跑类型信息也能让管理员快速删除。下图就是代跑类型管理页面。

图5.4 代跑类型列表页面

系统

YonghuController.java

package com.controller;import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;/*** 用户* 后端接口* @author* @email
*/
@RestController
@Controller
@RequestMapping("/yonghu")
public class YonghuController {private static final Logger logger = LoggerFactory.getLogger(YonghuController.class);private static final String TABLE_NAME = "yonghu";@Autowiredprivate YonghuService yonghuService;@Autowiredprivate TokenService tokenService;@Autowiredprivate DictionaryService dictionaryService;//级联表非注册的service//注册表service@Autowiredprivate SijiService sijiService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永不会进入");else if("用户".equals(role))params.put("yonghuId",request.getSession().getAttribute("userId"));else if("司机".equals(role))params.put("sijiId",request.getSession().getAttribute("userId"));CommonUtil.checkMap(params);PageUtils page = yonghuService.queryPage(params);//字典表数据转换List<YonghuView> list =(List<YonghuView>)page.getList();for(YonghuView c:list){//修改对应字典表字段dictionaryService.dictionaryConvert(c, request);}return R.ok().put("data", page);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);YonghuEntity yonghu = yonghuService.selectById(id);if(yonghu !=null){//entity转viewYonghuView view = new YonghuView();BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>().eq("username", yonghu.getUsername()).or().eq("yonghu_phone", yonghu.getYonghuPhone()).or().eq("yonghu_id_number", yonghu.getYonghuIdNumber());logger.info("sql语句:"+queryWrapper.getSqlSegment());YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);if(yonghuEntity==null){yonghu.setCreateTime(new Date());yonghu.setPassword("123456");yonghuService.insert(yonghu);return R.ok();}else {return R.error(511,"账户或者用户手机号或者用户身份证号已经被使用");}}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {logger.debug("update方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());YonghuEntity oldYonghuEntity = yonghuService.selectById(yonghu.getId());//查询原先数据String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");if("".equals(yonghu.getYonghuPhoto()) || "null".equals(yonghu.getYonghuPhoto())){yonghu.setYonghuPhoto(null);}yonghuService.updateById(yonghu);//根据id更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Integer[] ids, HttpServletRequest request){logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());List<YonghuEntity> oldYonghuList =yonghuService.selectBatchIds(Arrays.asList(ids));//要删除的数据yonghuService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 批量上传*/@RequestMapping("/batchInsert")public R save( String fileName, HttpServletRequest request){logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");try {List<YonghuEntity> yonghuList = new ArrayList<>();//上传的东西Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段Date date = new Date();int lastIndexOf = fileName.lastIndexOf(".");if(lastIndexOf == -1){return R.error(511,"该文件没有后缀");}else{String suffix = fileName.substring(lastIndexOf);if(!".xls".equals(suffix)){return R.error(511,"只支持后缀为xls的excel文件");}else{URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径File file = new File(resource.getFile());if(!file.exists()){return R.error(511,"找不到上传文件,请联系管理员");}else{List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件dataList.remove(0);//删除第一行,因为第一行是提示for(List<String> data:dataList){//循环YonghuEntity yonghuEntity = new YonghuEntity();
//                            yonghuEntity.setUsername(data.get(0));                    //账户 要改的
//                            //yonghuEntity.setPassword("123456");//密码
//                            yonghuEntity.setYonghuName(data.get(0));                    //用户姓名 要改的
//                            yonghuEntity.setYonghuPhone(data.get(0));                    //用户手机号 要改的
//                            yonghuEntity.setYonghuIdNumber(data.get(0));                    //用户身份证号 要改的
//                            yonghuEntity.setYonghuPhoto("");//详情和图片
//                            yonghuEntity.setSexTypes(Integer.valueOf(data.get(0)));   //性别 要改的
//                            yonghuEntity.setYonghuEmail(data.get(0));                    //电子邮箱 要改的
//                            yonghuEntity.setNewMoney(data.get(0));                    //余额 要改的
//                            yonghuEntity.setCreateTime(date);//时间yonghuList.add(yonghuEntity);//把要查询是否重复的字段放入map中//账户if(seachFields.containsKey("username")){List<String> username = seachFields.get("username");username.add(data.get(0));//要改的}else{List<String> username = new ArrayList<>();username.add(data.get(0));//要改的seachFields.put("username",username);}//用户手机号if(seachFields.containsKey("yonghuPhone")){List<String> yonghuPhone = seachFields.get("yonghuPhone");yonghuPhone.add(data.get(0));//要改的}else{List<String> yonghuPhone = new ArrayList<>();yonghuPhone.add(data.get(0));//要改的seachFields.put("yonghuPhone",yonghuPhone);}//用户身份证号if(seachFields.containsKey("yonghuIdNumber")){List<String> yonghuIdNumber = seachFields.get("yonghuIdNumber");yonghuIdNumber.add(data.get(0));//要改的}else{List<String> yonghuIdNumber = new ArrayList<>();yonghuIdNumber.add(data.get(0));//要改的seachFields.put("yonghuIdNumber",yonghuIdNumber);}}//查询是否重复//账户List<YonghuEntity> yonghuEntities_username = yonghuService.selectList(new EntityWrapper<YonghuEntity>().in("username", seachFields.get("username")));if(yonghuEntities_username.size() >0 ){ArrayList<String> repeatFields = new ArrayList<>();for(YonghuEntity s:yonghuEntities_username){repeatFields.add(s.getUsername());}return R.error(511,"数据库的该表中的 [账户] 字段已经存在 存在数据为:"+repeatFields.toString());}//用户手机号List<YonghuEntity> yonghuEntities_yonghuPhone = yonghuService.selectList(new EntityWrapper<YonghuEntity>().in("yonghu_phone", seachFields.get("yonghuPhone")));if(yonghuEntities_yonghuPhone.size() >0 ){ArrayList<String> repeatFields = new ArrayList<>();for(YonghuEntity s:yonghuEntities_yonghuPhone){repeatFields.add(s.getYonghuPhone());}return R.error(511,"数据库的该表中的 [用户手机号] 字段已经存在 存在数据为:"+repeatFields.toString());}//用户身份证号List<YonghuEntity> yonghuEntities_yonghuIdNumber = yonghuService.selectList(new EntityWrapper<YonghuEntity>().in("yonghu_id_number", seachFields.get("yonghuIdNumber")));if(yonghuEntities_yonghuIdNumber.size() >0 ){ArrayList<String> repeatFields = new ArrayList<>();for(YonghuEntity s:yonghuEntities_yonghuIdNumber){repeatFields.add(s.getYonghuIdNumber());}return R.error(511,"数据库的该表中的 [用户身份证号] 字段已经存在 存在数据为:"+repeatFields.toString());}yonghuService.insertBatch(yonghuList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,"批量插入数据异常,请联系管理员");}}/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {YonghuEntity yonghu = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", username));if(yonghu==null || !yonghu.getPassword().equals(password))return R.error("账号或密码不正确");String token = tokenService.generateToken(yonghu.getId(),username, "yonghu", "用户");R r = R.ok();r.put("token", token);r.put("role","用户");r.put("username",yonghu.getYonghuName());r.put("tableName","yonghu");r.put("userId",yonghu.getId());return r;}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody YonghuEntity yonghu, HttpServletRequest request) {
//    	ValidatorUtils.validateEntity(user);Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>().eq("username", yonghu.getUsername()).or().eq("yonghu_phone", yonghu.getYonghuPhone()).or().eq("yonghu_id_number", yonghu.getYonghuIdNumber());YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);if(yonghuEntity != null)return R.error("账户或者用户手机号或者用户身份证号已经被使用");yonghu.setNewMoney(0.0);yonghu.setCreateTime(new Date());yonghuService.insert(yonghu);return R.ok();}/*** 重置密码*/@GetMapping(value = "/resetPassword")public R resetPassword(Integer  id, HttpServletRequest request) {YonghuEntity yonghu = yonghuService.selectById(id);yonghu.setPassword("123456");yonghuService.updateById(yonghu);return R.ok();}/*** 忘记密码*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request) {YonghuEntity yonghu = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", username));if(yonghu!=null){yonghu.setPassword("123456");boolean b = yonghuService.updateById(yonghu);if(!b){return R.error();}return R.ok();}else{return R.error("账号不存在");}}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrYonghu(HttpServletRequest request){Integer id = (Integer)request.getSession().getAttribute("userId");YonghuEntity yonghu = yonghuService.selectById(id);if(yonghu !=null){//entity转viewYonghuView view = new YonghuView();BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));CommonUtil.checkMap(params);PageUtils page = yonghuService.queryPage(params);//字典表数据转换List<YonghuView> list =(List<YonghuView>)page.getList();for(YonghuView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段return R.ok().put("data", page);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);YonghuEntity yonghu = yonghuService.selectById(id);if(yonghu !=null){//entity转viewYonghuView view = new YonghuView();BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){logger.debug("add方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>().eq("username", yonghu.getUsername()).or().eq("yonghu_phone", yonghu.getYonghuPhone()).or().eq("yonghu_id_number", yonghu.getYonghuIdNumber());logger.info("sql语句:"+queryWrapper.getSqlSegment());YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);if(yonghuEntity==null){yonghu.setCreateTime(new Date());yonghu.setPassword("123456");yonghuService.insert(yonghu);return R.ok();}else {return R.error(511,"账户或者用户手机号或者用户身份证号已经被使用");}}}
DictionaryServiceImpl.java
package com.service.impl;import com.utils.StringUtil;
import com.service.DictionaryService;
import com.utils.ClazzDiff;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.lang.reflect.Field;
import java.util.*;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import com.utils.PageUtils;
import com.utils.Query;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import com.dao.DictionaryDao;
import com.entity.DictionaryEntity;
import com.service.DictionaryService;
import com.entity.view.DictionaryView;/*** 字典 服务实现类*/
@Service("dictionaryService")
@Transactional
public class DictionaryServiceImpl extends ServiceImpl<DictionaryDao, DictionaryEntity> implements DictionaryService {@Overridepublic PageUtils queryPage(Map<String,Object> params) {Page<DictionaryView> page =new Query<DictionaryView>(params).getPage();page.setRecords(baseMapper.selectListView(page,params));return new PageUtils(page);}/*** 赋值给字典表* @param obj view对象*/public void dictionaryConvert(Object obj, HttpServletRequest request) {try {if (obj == null) return;//当前view和entity中的所有types的字段List<String> fieldNameList = new ArrayList<>();Class tempClass = obj.getClass();while (tempClass !=null) {Field[] declaredFields = tempClass.getDeclaredFields();for (Field f : declaredFields) {f.setAccessible(true);if (f.getType().getName().equals("java.lang.Integer") && f.getName().contains("Types")) {fieldNameList.add(f.getName());}}tempClass = tempClass.getSuperclass(); //得到父类,然后赋给自己}// 获取监听器中的字典表
//            ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();ServletContext servletContext = request.getServletContext();Map<String, Map<Integer, String>> dictionaryMap= (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");//通过Types的值给Value字段赋值for (String s : fieldNameList) {Field types = null;if(hasField(obj.getClass(),s)){//判断view中有没有这个字段,有就通过反射取出字段types= obj.getClass().getDeclaredField(s);//获取Types私有字段}else{//本表中没有这个字段,说明它是父表中的字段,也就是entity中的字段,从entity中取值types=obj.getClass().getSuperclass().getDeclaredField(s);}Field value = obj.getClass().getDeclaredField(s.replace("Types", "Value"));//获取value私有字段//设置权限types.setAccessible(true);value.setAccessible(true);//赋值if (StringUtil.isNotEmpty(String.valueOf(types.get(obj)))) { //types的值不为空int i = Integer.parseInt(String.valueOf(types.get(obj)));//type//把s1字符中的所有大写转小写,并在前面加 _char[] chars = s.toCharArray();StringBuffer sbf = new StringBuffer();for(int  b=0; b< chars.length; b++){char ch = chars[b];if(ch <= 90 && ch >= 65){sbf.append("_");ch += 32;}sbf.append(ch);}String s2 = dictionaryMap.get(sbf.toString()).get(i);value.set(obj, s2);} else {new Exception("字典表赋值出现问题::::"+value.getName());value.set(obj, "");}}} catch (IllegalAccessException e) {e.printStackTrace();} catch (NoSuchFieldException e) {e.printStackTrace();} catch (Exception e) {e.printStackTrace();}}/*** 判断本实体有没有这个字段* @param c* @param fieldName* @return*/public boolean hasField(Class c, String fieldName){Field[] fields = c.getDeclaredFields();for (Field f : fields) {if (fieldName.equals(f.getName())) {return true;}}return false;}}
list.vue
<template><div class="main-content"><!-- 列表页 --><div v-if="showFlag"><el-form :inline="true" :model="searchForm" class="form-content"><el-row :gutter="20" class="slt" :style="{justifyContent:contents.searchBoxPosition=='1'?'flex-start':contents.searchBoxPosition=='2'?'center':'flex-end'}"><el-form-item label="数据类型"><el-input prefix-icon="el-icon-search" v-model="searchForm.indexNameSearch" placeholder="数据类型" clearable></el-input></el-form-item><el-form-item><el-button icon="el-icon-search" type="success" @click="search()">查询</el-button></el-form-item></el-row><el-row class="ad" :style="{justifyContent:contents.btnAdAllBoxPosition=='1'?'flex-start':contents.btnAdAllBoxPosition=='2'?'center':'flex-end'}"><el-form-item><el-buttonv-if="isAuth('dictionaryJiaocheChat','新增')"type="success"icon="el-icon-plus"@click="addOrUpdateHandler()">新增</el-button><el-buttonv-if="isAuth('dictionaryJiaocheChat','删除')":disabled="dataListSelections.length <= 0"type="danger"icon="el-icon-delete"@click="deleteHandler()">删除</el-button></el-form-item></el-row></el-form><div class="table-content"><el-table class="tables" :size="contents.tableSize" :show-header="contents.tableShowHeader":header-row-style="headerRowStyle" :header-cell-style="headerCellStyle":border="contents.tableBorder":fit="contents.tableFit":stripe="contents.tableStripe":row-style="rowStyle":cell-style="cellStyle":style="{width: '100%',fontSize:contents.tableContentFontSize,color:contents.tableContentFontColor}"v-if="isAuth('dictionaryJiaocheChat','查看')":data="dataList"v-loading="dataListLoading"@selection-change="selectionChangeHandler"><el-table-column  v-if="contents.tableSelection"type="selection"header-align="center"align="center"width="50"></el-table-column><el-table-column label="索引" v-if="contents.tableIndex" type="index" width="50" /><el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign"prop="codeIndex"header-align="center"label="数据类型编码"><template slot-scope="scope">{{scope.row.codeIndex}}</template></el-table-column><el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign"prop="indexName"header-align="center"label="数据类型名称"><template slot-scope="scope">{{scope.row.indexName}}</template></el-table-column><!--<el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign"prop="beizhu"header-align="center"label="备注"><template slot-scope="scope">{{scope.row.beizhu}}</template></el-table-column>--><el-table-column width="300" :align="contents.tableAlign"header-align="center"label="操作"><template slot-scope="scope"><el-button v-if="isAuth('dictionaryJiaocheChat','查看')" type="success" icon="el-icon-tickets" size="mini" @click="addOrUpdateHandler(scope.row.id,'info')">详情</el-button><el-button v-if="isAuth('dictionaryJiaocheChat','修改')" type="primary" icon="el-icon-edit" size="mini" @click="addOrUpdateHandler(scope.row.id)">修改</el-button><el-button v-if="isAuth('dictionaryJiaocheChat','删除')" type="danger" icon="el-icon-delete" size="mini" @click="deleteHandler(scope.row.id)">删除</el-button></template></el-table-column></el-table><el-paginationclsss="pages":layout="layouts"@size-change="sizeChangeHandle"@current-change="currentChangeHandle":current-page="pageIndex":page-sizes="[10, 20, 50, 100]":page-size="Number(contents.pageEachNum)":total="totalPage":small="contents.pageStyle"class="pagination-content":background="contents.pageBtnBG":style="{textAlign:contents.pagePosition==1?'left':contents.pagePosition==2?'center':'right'}"></el-pagination></div></div><!-- 添加/修改页面  将父组件的search方法传递给子组件--><add-or-update v-if="addOrUpdateFlag" :parent="this" ref="addOrUpdate"></add-or-update></div>
</template>
<script>import AddOrUpdate from "./add-or-update";import styleJs from "../../../utils/style.js";export default {data() {return {searchForm: {key: ""},form:{},dataList: [],pageIndex: 1,pageSize: 10,totalPage: 0,dataListLoading: false,dataListSelections: [],showFlag: true,sfshVisiable: false,shForm: {},chartVisiable: false,addOrUpdateFlag:false,contents:null,layouts: '',};},created() {this.contents = styleJs.listStyle();this.init();this.getDataList();this.contentStyleChange()},mounted() {},filters: {htmlfilter: function (val) {return val.replace(/<[^>]*>/g).replace(/undefined/g,'');}},components: {AddOrUpdate,},methods: {contentStyleChange() {this.contentSearchStyleChange()this.contentBtnAdAllStyleChange()this.contentSearchBtnStyleChange()this.contentTableBtnStyleChange()this.contentPageStyleChange()},contentSearchStyleChange() {this.$nextTick(()=>{document.querySelectorAll('.form-content .slt .el-input__inner').forEach(el=>{let textAlign = 'left'if(this.contents.inputFontPosition == 2) textAlign = 'center'if(this.contents.inputFontPosition == 3) textAlign = 'right'el.style.textAlign = textAlignel.style.height = this.contents.inputHeightel.style.lineHeight = this.contents.inputHeightel.style.color = this.contents.inputFontColorel.style.fontSize = this.contents.inputFontSizeel.style.borderWidth = this.contents.inputBorderWidthel.style.borderStyle = this.contents.inputBorderStyleel.style.borderColor = this.contents.inputBorderColorel.style.borderRadius = this.contents.inputBorderRadiusel.style.backgroundColor = this.contents.inputBgColor})if(this.contents.inputTitle) {document.querySelectorAll('.form-content .slt .el-form-item__label').forEach(el=>{el.style.color = this.contents.inputTitleColorel.style.fontSize = this.contents.inputTitleSizeel.style.lineHeight = this.contents.inputHeight})}setTimeout(()=>{document.querySelectorAll('.form-content .slt .el-input__prefix').forEach(el=>{el.style.color = this.contents.inputIconColorel.style.lineHeight = this.contents.inputHeight})document.querySelectorAll('.form-content .slt .el-input__suffix').forEach(el=>{el.style.color = this.contents.inputIconColorel.style.lineHeight = this.contents.inputHeight})document.querySelectorAll('.form-content .slt .el-input__icon').forEach(el=>{el.style.lineHeight = this.contents.inputHeight})},10)})},// 搜索按钮contentSearchBtnStyleChange() {this.$nextTick(()=>{document.querySelectorAll('.form-content .slt .el-button--success').forEach(el=>{el.style.height = this.contents.searchBtnHeightel.style.color = this.contents.searchBtnFontColorel.style.fontSize = this.contents.searchBtnFontSizeel.style.borderWidth = this.contents.searchBtnBorderWidthel.style.borderStyle = this.contents.searchBtnBorderStyleel.style.borderColor = this.contents.searchBtnBorderColorel.style.borderRadius = this.contents.searchBtnBorderRadiusel.style.backgroundColor = this.contents.searchBtnBgColor})})},// 新增、批量删除contentBtnAdAllStyleChange() {this.$nextTick(()=>{document.querySelectorAll('.form-content .ad .el-button--success').forEach(el=>{el.style.height = this.contents.btnAdAllHeightel.style.color = this.contents.btnAdAllAddFontColorel.style.fontSize = this.contents.btnAdAllFontSizeel.style.borderWidth = this.contents.btnAdAllBorderWidthel.style.borderStyle = this.contents.btnAdAllBorderStyleel.style.borderColor = this.contents.btnAdAllBorderColorel.style.borderRadius = this.contents.btnAdAllBorderRadiusel.style.backgroundColor = this.contents.btnAdAllAddBgColor})document.querySelectorAll('.form-content .ad .el-button--danger').forEach(el=>{el.style.height = this.contents.btnAdAllHeightel.style.color = this.contents.btnAdAllDelFontColorel.style.fontSize = this.contents.btnAdAllFontSizeel.style.borderWidth = this.contents.btnAdAllBorderWidthel.style.borderStyle = this.contents.btnAdAllBorderStyleel.style.borderColor = this.contents.btnAdAllBorderColorel.style.borderRadius = this.contents.btnAdAllBorderRadiusel.style.backgroundColor = this.contents.btnAdAllDelBgColor})document.querySelectorAll('.form-content .ad .el-button--warning').forEach(el=>{el.style.height = this.contents.btnAdAllHeightel.style.color = this.contents.btnAdAllWarnFontColorel.style.fontSize = this.contents.btnAdAllFontSizeel.style.borderWidth = this.contents.btnAdAllBorderWidthel.style.borderStyle = this.contents.btnAdAllBorderStyleel.style.borderColor = this.contents.btnAdAllBorderColorel.style.borderRadius = this.contents.btnAdAllBorderRadiusel.style.backgroundColor = this.contents.btnAdAllWarnBgColor})})},// 表格rowStyle({ row, rowIndex}) {if (rowIndex % 2 == 1) {if(this.contents.tableStripe) {return {color:this.contents.tableStripeFontColor}}} else {return ''}},cellStyle({ row, rowIndex}){if (rowIndex % 2 == 1) {if(this.contents.tableStripe) {return {backgroundColor:this.contents.tableStripeBgColor}}} else {return ''}},headerRowStyle({ row, rowIndex}){return {color: this.contents.tableHeaderFontColor}},headerCellStyle({ row, rowIndex}){return {backgroundColor: this.contents.tableHeaderBgColor}},// 表格按钮contentTableBtnStyleChange(){},// 分页contentPageStyleChange(){let arr = []if(this.contents.pageTotal) arr.push('total')if(this.contents.pageSizes) arr.push('sizes')if(this.contents.pagePrevNext){arr.push('prev')if(this.contents.pagePager) arr.push('pager')arr.push('next')}if(this.contents.pageJumper) arr.push('jumper')this.layouts = arr.join()this.contents.pageEachNum = 10},init () {},search() {this.pageIndex = 1;this.getDataList();},// 获取数据列表getDataList() {this.dataListLoading = true;let params = {page: this.pageIndex,limit: this.pageSize,sort: 'id',}if(this.searchForm.indexNameSearch!='' && this.searchForm.indexNameSearch!=undefined){params['indexName'] = this.searchForm.indexNameSearch}//本表的params['dicCode'] = "jiaoche_chat_types"//编码名字params['dicName'] = "数据类型",//汉字名字this.$http({url: "dictionary/page",method: "get",params: params}).then(({ data }) => {if (data && data.code === 0) {this.dataList = data.data.list;this.totalPage = data.data.total;} else {this.dataList = [];this.totalPage = 0;}this.dataListLoading = false;});},// 每页数sizeChangeHandle(val) {this.pageSize = val;this.pageIndex = 1;this.getDataList();},// 当前页currentChangeHandle(val) {this.pageIndex = val;this.getDataList();},// 多选selectionChangeHandler(val) {this.dataListSelections = val;},// 添加/修改addOrUpdateHandler(id,type) {this.showFlag = false;this.addOrUpdateFlag = true;this.crossAddOrUpdateFlag = false;if(type!='info'){type = 'else';}this.$nextTick(() => {this.$refs.addOrUpdate.init(id,type);});},// 删除deleteHandler(id) {var ids = id? [Number(id)]: this.dataListSelections.map(item => {return Number(item.id);});this.$confirm(`确定进行[${id ? "删除" : "批量删除"}]操作?`, "提示", {confirmButtonText: "确定",cancelButtonText: "取消",type: "warning"}).then(() => {this.$http({url: "dictionary/delete",method: "post",data: ids}).then(({ data }) => {if (data && data.code === 0) {this.$message({message: "操作成功",type: "success",duration: 1500,onClose: () => {this.search();}});} else {this.$message.error(data.msg);}});});},}};
</script>
<style lang="scss" scoped>
.slt {margin: 0 !important;display: flex;}.ad {margin: 0 !important;display: flex;}.pages {& /deep/ el-pagination__sizes{& /deep/ el-input__inner {height: 22px;line-height: 22px;}}}.el-button+.el-button {margin:0;}.tables {& /deep/ .el-button--success {height: 40px;color: rgba(23, 109, 71, 1);font-size: 14px;border-width: 4px;border-style: double;border-color: rgba(45, 132, 94, 1);border-radius: 0px;background-color: #fff;}& /deep/ .el-button--primary {height: 40px;color: rgba(23, 109, 71, 1);font-size: 14px;border-width: 4px;border-style: double;border-color: rgba(45, 132, 94, 1);border-radius: 0px;background-color: #fff;}& /deep/ .el-button--danger {height: 40px;color: rgba(23, 109, 71, 1);font-size: 14px;border-width: 4px;border-style: double;border-color: rgba(45, 132, 94, 1);border-radius: 0px;background-color: #fff;}& /deep/ .el-button {margin: 4px;}}.form-content {background: transparent;}.table-content {background: transparent;}.tables /deep/ .el-table__body tr {background-color: rgba(255, 255, 255, 1) !important;color: rgba(58, 58, 58, 1) !important;}.tables /deep/ .el-table__body tr.el-table__row--striped td {background: transparent;}.tables /deep/ .el-table__body tr.el-table__row--striped {background-color: #F5F7FA !important;color: #606266 !important;}.tables /deep/ .el-table__body tr:hover>td {background-color: rgba(234, 234, 234, 0.51) !important;color: #333 !important;}</style>

声明

本博客适用于广泛的学术和教育用途,包括但不限于个人学习、开发设计,产品设计。仅供学习参考,旨在为读者提供深入理解和学术研究的材料。

相关文章:

微乐校园pf

TOC springboot451微乐校园pf 绪论 1.1 研究背景 当前社会各行业领域竞争压力非常大&#xff0c;随着当前时代的信息化&#xff0c;科学化发展&#xff0c;让社会各行业领域都争相使用新的信息技术&#xff0c;对行业内的各种相关数据进行科学化&#xff0c;规范化管理。这…...

文件其他相关函数

symlink 链接文件: file.txt -> hello.c 软链接文件、符号链接文件 硬链接文件 命令行&#xff1a;ln -s 123 softlink 快捷方式 int symlink(const char *oldpath, const char *newpath); 功能: 创建一个链接向oldpath文件的新符号链接文件 参数: oldpath:被链接向…...

SQLALchemy ORM 的关联关系之 ORM 中的多对多

SQLALchemy ORM 的关联关系之 ORM 中的多对多 场景示例实现多对多关系定义模型插入和查询数据总结在 SQLAlchemy ORM 中,多对多(Many-to-Many)关联关系是一种常见的关系类型,它表示两个表中的行可以相互关联,即一个表中的多行可以与另一个表中的多行相关联。为了实现这种关…...

sdkman install慢,采用squid代理

(1)A机器,IP:yy.yy.yy.yy 安装squid yum install squidvi /etc/squid/squid.confacl allowed_ip src xx.xx.xx.xx http_access allow allowed_ip http_access deny allsystemctl restart squid 开放3128端口 (2)B机器&#xff0c;IP:xx.xx.xx.xx, export http_proxyhttp://y…...

实时监控Windows服务器:使用Prometheus和Grafana的终极方案

视频指南 【1】快速上手&#xff1a;在Windows系统上部署Prometheus与Grafana&#xff0c;实时监控性能指标 【2】快速上手&#xff1a;在Windows系统上部署Prometheus与Grafana&#xff0c;实时监控性能指标 1. 下载并安装 Prometheus 下载 Prometheus&#xff1a; 访问 Pro…...

【文科生能看懂的】牛顿二项式定理

牛顿二项式定理 简单的二项式整数次幂展开的结果中的规律结果中各项的指数结果中各项的系数 二项式定理 牛顿二项式定理就是用来求某个二项式的整数次幂的展开式的。 简单的二项式整数次幂 我们可以先从简单的情况开始&#xff0c;比如二项式 ( a b ) (ab) (ab)的整数次幂&a…...

Fly Catcher:通过监测恶意信号来检测飞机欺骗

Fly Catcher 的开发者 Angelina Tsuboi 是一名飞行员、网络安全研究员和发明家。 她决定着手一个将这三个不同兴趣结合起来的项目&#xff0c;以解决航空雷达系统的一个重大问题。 ADS-B 系统最初用于基本的飞机定位和跟踪&#xff0c;Tsuboi 对该系统的网络安全方面进行了深…...

计算机网络——HTTP协议详解(上)

一、HTTP协议简单介绍 1.1 什么是HTTP协议 HTTP&#xff08;超文本传输协议&#xff09;是一种用于在Web浏览器和Web服务器之间传输数据的应用层协议。它是一种无状态协议&#xff0c;即服务器不会保留与客户端的任何连接状态信息&#xff0c;每个请求都被视为一个独立的事务。…...

十九、中介者模式

文章目录 1 基本介绍2 案例2.1 Developer 抽象类2.2 FrontendDeveloper 类2.3 BackendDeveloper 类2.4 Mediator 接口2.5 ProjectManager 类2.6 Client 类2.7 Client 类的运行结果2.8 总结 3 各角色之间的关系3.1 角色3.1.1 Colleague ( 同事 )3.1.2 ConcreteColleague ( 具体的…...

编程参考 - 头文件中使用static inline

在Linux kernel的头文件中&#xff0c;经常使用static inline来声明一个函数。 比如include/linux/delay.h中&#xff0c; static inline void ssleep(unsigned int seconds) { msleep(seconds * 1000); } static Keyword * 范围限制&#xff1a; 当应用于函数或变量时&#…...

Uniapp使用antd组件库

组件库官网 https://www.antdv.com/docs/vue/introduce-cn 安装 在命令行终端输入 npm uni --save ant-design-vue配置 我这里用的是uniapp的vue3版本模板 在main.js里面引入 只要改下面带序号的地方即可 import App from ./App// #ifndef VUE3 import Vue from vue im…...

计算机毕业设计选题推荐-高校实验室管理系统-Java/Python项目实战

✨作者主页&#xff1a;IT研究室✨ 个人简介&#xff1a;曾从事计算机专业培训教学&#xff0c;擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。 ☑文末获取源码☑ 精彩专栏推荐⬇⬇⬇ Java项目 Python…...

nest定义响应码message文本

需求 需要对接口的异常响应码&#xff0c;手动设置message文本&#xff01;&#xff01;&#xff01; 例如&#xff1a;项目中使用multer中间件实现文件上传&#xff0c;multer设置了文件大小限制&#xff0c;该中间件校验文件时错误&#xff08;文件超出&#xff09;会自动响…...

Java | Leetcode Java题解之第342题4的幂

题目: 题解&#xff1a; class Solution {public boolean isPowerOfFour(int n) {return n > 0 && (n & (n - 1)) 0 && n % 3 1;} }...

【日常开发】java中一个list对象集合 将字段a为 大豆 小麦 玉米等元素放在最前面 并组成新集合

&#x1f388;边走、边悟&#x1f388;迟早会好 在Java中实现这个功能&#xff0c;可以使用Stream来筛选出符合条件的元素&#xff0c;将它们放在新集合的前面&#xff0c;同时保留其他元素在新集合的后面。以下是如何实现的代码示例&#xff1a; 代码示例&#xff1a; impo…...

C++ 设计模式——原型模式

原型模式 原型模式主要组成部分原型模式的使用步骤原型模式的 UML 图原型模式 UML 图解析优点和缺点适用场景总结 原型模式 原型(Prototype)模式是一种创建型模式。原型模式通过(原型对象)克隆出对个一模一样的对象。实际上&#xff0c;该模式与其说是一种设计模式&#xff0c…...

【Harmony OS 4.0】待办列表案例

src/main/ets/example1/Models.ets // 定义class类数据模型 export class TaskDataModel {// private 私有属性&#xff0c;在类对象外不允许随意更改数据&#xff0c;必须本地初始化。private tasks: Array<string> [早起晨练, 准备早餐, 阅读名著, 学习ArkTs, 玩游戏…...

快速把文件名统计到excel表的方法

文件名统计到EXCEL表&#xff0c;这似乎很多人都没听说过&#xff0c;因为它与EXCEL表格不沾边&#xff0c;那么这个需求如何实现&#xff0c;用到什么方法&#xff0c;今天给大家介绍一个比较实用的方法&#xff0c;它可以把文件名或文件夹的名快速提取并统计到EXCEL表格上去。…...

开源通用验证码识别OCR —— DdddOcr 源码赏析(一)

文章目录 [toc] 前言DdddOcr环境准备安装DdddOcr使用示例 源码分析实例化DdddOcr实例化过程 分类识别分类识别过程 未完待续 前言 DdddOcr 源码赏析 DdddOcr DdddOcr是开源的通用验证码识别OCR 官方传送门 环境准备 安装DdddOcr pip install ddddocr使用示例 示例图片如…...

上升ECMAScript性能优化技巧与陷阱(下)

4. 深拷贝和浅拷贝的选择不当 在JavaScript中&#xff0c;对象是通过引用传递的&#xff0c;这意味着当你将一个对象赋值给另一个变量时&#xff0c;你实际上是在传递对象的引用&#xff0c;而不是对象本身。这导致了一个常见的问题&#xff1a;当你修改一个对象的属性时&…...

用7EPhone云手机进行TikTok的矩阵运营

“根据市局机构Statista发布的报告显示&#xff0c;截至2024年4月&#xff0c;TikTok全球下载量超过49.2亿次&#xff0c;月度活跃用户数超过15.82亿。TikTok的流量受欢迎程度可想而知&#xff0c;也一跃成为了全球第五大最受欢迎的社交APP。” 人群密集的地方社区也是适合推广…...

谷歌浏览器下载文件被阻止怎么解除

在工作生活中&#xff0c;我们会使用谷歌浏览器下载各种各样的文件&#xff0c;不过偶尔会遇到文件下载被阻止的情况。为了解决这一问题&#xff0c;本文为大家分享了实用的措施建议&#xff0c;一起来了解一下吧。&#xff08;本文由https://chrome.cmrrs.com/站点的作者进行编…...

apt E: 无法定位软件包 winehq-stable

执行了 添加wine源 wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources还需要执行 更新源 apt update...

P2460[SDOI2007] 科比的比赛

第一次做洛谷系列&#xff0c;紧张&#xff0c;请多关照哦 题目传送门&#xff1a;[SDOI2007] 科比的比赛 - 洛谷 思路分析 这道题大概题意是给定我们的主人公 Kobe Bryant 的 mm 个对手&#xff0c;nn 场比赛相对应的获胜概率。求 Kobe Bryant 最大全部获胜概率和打败对手能…...

linux学习--第二天

--Linux文件系统 -显示文件命令 cat 1. cat -b 文件&#xff1a;从1开始对非空输出行编号 2. cat -n 文件&#xff1a;从1开始对所有行编号 3. cat -s 文件&#xff1a;将连续多行空白行合并 more&#xff08;显示一屏文本内容&#xff09; 1. more -num 文件&#xff…...

使用 Flask、Celery 和 Python 实现每月定时任务

为了创建一个使用 Flask、Celery 和 Python 实现的每月定时任务&#xff0c;我们需要按照以下步骤进行&#xff1a; 1.安装必要的库 我们需要安装 Flask、Celery 和 Redis&#xff08;作为消息代理&#xff09;。我们可以使用 pip 来安装它们&#xff1a; bash复制代码 ​ p…...

【c语言】整数在内存中的储存(大小端字节序)

整数在内存中的储存&#xff08;大小端字节序&#xff09; 1.整数在内存中的储存 2.大小端字节序 3.整数在内存中储存例子 4.字节序判断 5.死循环现象 文章目录 整数在内存中的储存&#xff08;大小端字节序&#xff09;整数在内存中的储存大小端字节序什么是大小端为什么会有…...

浅谈SIMD、向量化处理及其在StarRocks中的应用

前言 单指令流多数据流(SIMD)及其衍生出来的向量化处理技术已经有了相当的历史&#xff0c;并且也是高性能数据库、计算引擎、多媒体库等组件的标配利器。笔者在两年多前曾经做过一次有关该主题的内部Geek分享&#xff0c;但可能是由于这个topic离实际研发场景比较远&#xff0…...

【ML】Image Augmentation)的作用、使用方法及其分类

图像增强&#xff08;Image Augmentation&#xff09;的作用、使用方法及其分类 1. 图像增强的定义2. 图像增强的作用3. 什么时候使用图像增强&#xff1f;4. 图像增强详细方法分类梳理4.1 图像增强方法列表4.2 边界框增强方法5. 参考资料 yolov3&#xff08;一&#xff1a;模型…...

设计模式六大原则(一)--单一职责原则

1. 简介 1.1. 概述 一个类或模块应该只负责完成一项任务或承担一个责任。如果一个类或模块承担了多个职责,那么当需要修改其中一个职责的功能时,就可能会对其他职责产生影响,从而导致代码耦合度增加,维护起来更加困难。 1.2. 主要特点 单一职责原则(Single Responsibi…...

c语言学习,malloc()函数分析

1&#xff1a;malloc() 函数说明&#xff1a; 申请配置size大小内存空间 2&#xff1a;函数原型&#xff1a; void *malloc(size_t size) 3&#xff1a;函数参数&#xff1a; 参数size&#xff0c;为申请内存大小 4&#xff1a;返回值&#xff1a; 配置成功则返回指针&#…...

【运维项目经历|041】上云项目-物理机迁移到阿里云

🍁博主简介: 🏅云计算领域优质创作者 🏅2022年CSDN新星计划python赛道第一名 🏅2022年CSDN原力计划优质作者 ​ 🏅阿里云ACE认证高级工程师 ​ 🏅阿里云开发者社区专家博主 💊交流社区:CSDN云计算交流社区欢迎您的加入! 目录 项目名称 项目背景 项目目标 项…...

分组并合并其它列的非空值 --Excel难题#83

Excel第1列是分类&#xff0c;第2-42列是平行的多个数据项列&#xff0c;下表用部分列示例。数据有X或null两种情况&#xff0c;同一个分类的同一列数据偶尔有重复。 ABCDE1IDCriteria1Criteria2Criteria3Criteria42FirstValueX3FirstValueX4FirstValueX5FirstValueX6SecondVa…...

VM相关配置及docker

NAT——VMnet8网卡 桥接——WLAN/网线 仅主机——VMnet1网卡 docker与虚拟机的区别 启动docker服务 systemctl start docker 重启 systemctl start docker关闭docker服务 systemctl stop docker.servicedocker的两大概念 镜像&#xff1a;images&#xff0c;应用程序的静态文…...

Redis中Set数据类型常用命令

目录 1. 添加元素 2. 移除元素 3. 检查成员是否存在 4. 获取集合成员 5. 获取集合成员数量 6. 随机获取集合中的一个成员 7. 集合运算 8. 集合的移值 9. 提供集合的随机元素 在Redis中&#xff0c;Set是一种无序且不重复的字符串集合。 1. 添加元素 SADD key member [member ..…...

mysql误删数据恢复记录

背景 1、数据库版本 5.7.36&#xff0c;由于误操作删掉了表的所有数据&#xff0c;但是数据库备份每天凌晨进行、只能从备份恢复昨日的全量数据&#xff0c;当日的数据将会丢失 查看binlog配置 binlog配置 [mysqld] #设置日志三种格式&#xff1a;STATEMENT、ROW、MIXED 。 bi…...

论文阅读:Real-time Controllable Denoising for Image and Video

这篇文章是 CVPR 2023 的一篇文章&#xff0c;探讨了在图像与视频降噪中&#xff0c;如何实时控制降噪强度的问题。 Abstract 图像或者视频降噪&#xff0c;是在细节与平滑度之间的一个微妙的平衡&#xff0c;因为噪声与细节都属于高频信息&#xff0c;降噪在去除噪声的同时&…...

【Kubernetes】虚拟 IP 与 Service 的代理模式

虚拟 IP 与 Service 的代理模式 1.userspace 代理模式2.iptables 代理模式3.IPVS 代理模式 由于 Service 的默认发布类型是 ClusterlP&#xff0c;因此也可以把 ClusterIP 地址叫作 虚拟 IP 地址。在 Kubernetes 创建 Service 时&#xff0c;每个节点上运行的 kube-proxy 会自动…...

深度学习·Pytorch

以下代码源自李沐 自定义模块类 继承module类 继承nn.Module重写构造函数前向传播 class MLP(nn.Module):# 用模型参数声明层。这里&#xff0c;我们声明两个全连接的层def __init__(self):# 调用MLP的父类Module的构造函数来执行必要的初始化。# 这样&#xff0c;在类实例…...

fastzdp_sqlmodel新增get_first和is_exitsts方法

说明 经过fastzdp_login的整合&#xff0c;我们发现&#xff0c;fastzdp_sqlmodel还可以继续封装两个便捷的方法。 get_first&#xff1a;获取查询结果集中的第一条数据is_exitsts&#xff1a;判断数据是否已存在 封装get_first方法 def get_first(engine, model, query_di…...

嵌入式软件--数电基础 DAY 3

一、二进制 &#xff08;1&#xff09;文字表述 二进制数只能取0&#xff0c;1两个数字&#xff0c;逢二进一。 通过二进制表达文字。如战争时代的电报。 通过电灯泡的亮灭传递出信息。可以对灯亮和灯灭富裕一些含义&#xff0c;就能传达出想要的消息。 这就是编码和解码两…...

【生成式人工智能-十五-经典的影像生成方法-GAN】

经典的影像生成方法-GAN GANDiscriminatorGenerator还需要加入额外信息么 GAN可以加在其他模型上面我们可以用影像生成模型做什么&#xff1f; 前面讲过VAE和Flow-based以及diffusion Model &#xff0c;今天讲最后一种经典的生成方法GAN。 GAN 前面讲的几种模型都是用加入额外…...

python 已知x+y=8 求x*y*(x-y)的最大值

先用导数求解 已知xy8 求xy(x-y)的最大值 令y8-x 则 f(x)x⋅(8−x)⋅(x−(8−x))x⋅(8−x)⋅(2x−8) 导数方程为 f(x)-3x^2 24x - 32 求方程 − 3 x 2 24 x − 32 0 -3x^2 24x - 32 0 −3x224x−320 的根。 首先&#xff0c;我们可以尝试对方程进行因式分解。观察…...

windows平台的postgresql主从数据库流备份

主: 操作系统:windows10 数据库版本&#xff1a;postgresql-16.2 ip&#xff1a;192.168.3.254 从: 操作系统&#xff1a;windows10 数据库版本&#xff1a;postgresql-16.2 ip&#xff1a;192.168.3.253 配置主库 配置 pg_hba.conf 文件 在 pg 的安装目录下&#xff0c;找到 …...

Spring 常见设计模式

什么是设计模式&#xff1f; 设计模式&#xff08;Design pattern&#xff09;是为解决软件设计中通用问题而被提出的一套指导性思想。它是一种被反复验证、经过实践证明并被广泛应用的代码设计经验和思想总结&#xff0c;可以帮助开发者通过一定的模式来快速的开发高质量、可维…...

优化大量数据导出到Excel的内存消耗(二):如果数据超出Excel单表上限,则进行分表

优化前&#xff1a;优化大量数据导出到Excel的内存消耗_大文件异步导出 内存占用高-CSDN博客 写Excel文件报错&#xff1a;Invalid row number (1048576) outside allowable range (0..1048575) 写入Excel时遇到IllegalArgumentException&#xff0c;原因是超出允许的最大行数…...

rustrover打开会报Error: Invalid toolchain

如果 cargo --version 正常输出&#xff0c;但在使用 RustRover 时出现“Invalid toolchain”错误&#xff0c;可能是由于 RustRover 工具链配置有问题或路径指向错误。 解决步骤&#xff1a; 1. 检查 RustRover 的工具链配置 打开 RustRover&#xff0c;进入 Preferences 或…...

docker-compose 安装canal

创建 Canal 配置文件 /conf/canal.properties mkdir -p conf/ touch /conf/canal.properties # canal.properties# tcp bind ip canal.ip 0.0.0.0 canal.port 11111 canal.metrics.pull.port 11112# zookeeper 集群配置 canal.zkServers canal.zookeeper.sessionTimeout…...

Unity动画模块 之 3D Rig页签

​本文仅作笔记学习和分享&#xff0c;不用做任何商业用途本文包括但不限于unity官方手册&#xff0c;unity唐老狮等教程知识&#xff0c;如有不足还请斧正​​ 1.Rig页签 Rig 选项卡 - Unity 手册&#xff0c;rig是设置骨骼与替身系统的&#xff0c;工作流程如下 Avatar是什么…...

【蓝桥杯冲刺省一,省一看这些就够了-Java版本】蓝桥杯日期问题相关模板以及练习题

蓝桥杯历年省赛真题 点击链接免费加入题单 日期问题 java.time Java 中用于处理日期和时间的主要类位于 java.time 包中。以下是一些常用的类和其功能的简要介绍&#xff1a; LocalDate&#xff1a;表示日期。它提供了获取年、月、日以及日期之间比较的方法。 LocalDate to…...