摘要: 1、添加flyway依赖 <!--flyway 依赖--> <dependency> <groupId>org.flywaydb</groupId> <artifactId>flyway-core</artifactId> <version>5.2.4</version> </dependency> 阅读全文
posted @ 2022-03-28 16:48 wangt1 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 该文件位于 /etc/my.cnf,在[mysqld] 下面添加,sql-mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION 阅读全文
posted @ 2021-09-17 15:49 wangt1 阅读(52) 评论(0) 推荐(0) 编辑
摘要: @JsonFormat(shape = JsonFormat.Shape.STRING)private BigDecimal realPrice;需要加注解这样就可以了,基本原理就是在把数据给前端的时候,把数据转换成string类型,这样就不会丢失小数点后面的(.00)数据。需要注意的是,前端接收到 阅读全文
posted @ 2021-08-23 13:56 wangt1 阅读(1566) 评论(0) 推荐(0) 编辑
摘要: 1、设置静态IP sudo vim /etc/netplan/*.yaml 假设IP地址修改为192.168.9.122,子网掩码24位即255.255.255.0,网关设置为192.168.9.1,DNS1:223.5.5.5,DNS2:223.6.6.6 2、 应用新配置 sudo netpla 阅读全文
posted @ 2021-01-22 10:08 wangt1 阅读(204) 评论(0) 推荐(0) 编辑
摘要: ew = new EntityWrapper<>(); ew.in("c_type", ids); if (name != null) { ew.like("c_name", name); } if (code != null) { ew.like("c_code", code); } if (st 阅读全文
posted @ 2020-10-15 09:20 wangt1 阅读(205) 评论(0) 推荐(0) 编辑
摘要: <if test="list!=null and list.size>0"> and create_by in <foreach collection="list" item="item" separator="," open="(" close=")" > #{item} </foreach> < 阅读全文
posted @ 2020-09-30 17:02 wangt1 阅读(108) 评论(0) 推荐(0) 编辑
摘要: <resultMap id="myMap" type="com.student.demo.domain.Student"> <id property="id1" column="id"/> <result property="names" column="name"/> <result proper 阅读全文
posted @ 2020-09-23 13:51 wangt1 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 需求,数据正序排列 目前数据为倒序排列,使用jkd1.8新特性进行排序 未排序之前 ↓ List<DataCockpitSalesXSE> collect = dataCockpitSalesXSES.stream().sorted(Comparator.comparing(DataCockpitS 阅读全文
posted @ 2020-09-23 09:44 wangt1 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 查询去年1-12月所有的月份,粘贴即可运行 SELECTCASE WHEN length( mon ) = 1 THEN concat( LEFT ( CURRENT_DATE, 5)-1, '-0', mon ) ELSE concat( LEFT ( CURRENT_DATE, 5 )-1,'- 阅读全文
posted @ 2020-09-18 17:12 wangt1 阅读(5532) 评论(0) 推荐(0) 编辑
摘要: 获取dtos集合中total=500.00的salesman的集合。List<String> collect = dtos.stream().filter(d -> d.getTotal().equals("500.00")).map(ReportDTO::getSalesman).collect( 阅读全文
posted @ 2020-09-02 16:18 wangt1 阅读(616) 评论(0) 推荐(0) 编辑