2022年4月26日

摘要: 1.统计本月、上月数据 // 上月long lastMonth = new DeviceRepairs() .selectCount( Wrappers.lambdaQuery(DeviceRepairs.class) .apply( " PERIOD_DIFF( date_format( now( 阅读全文
posted @ 2022-04-26 15:28 咸鱼张 阅读(138) 评论(0) 推荐(0) 编辑

2021年11月9日

摘要: 这两天写了一个逻辑,需求大概是这样的, 客户有硬件下单与小程序下单,此时需要保证下单原子性和库存一致, 因为是个单体项目,所以简单处理直接在Service添加synchronized,这样的话每个设备下单都要等到其他设备下完单 才可以下单,效率很低,后面,在内部维护了一个静态map,存储设备序列号, 阅读全文
posted @ 2021-11-09 14:35 咸鱼张 阅读(623) 评论(0) 推荐(0) 编辑

2021年10月19日

摘要: https://blog.csdn.net/weixin_44730681/article/details/111055213 阅读全文
posted @ 2021-10-19 10:28 咸鱼张 阅读(52) 评论(0) 推荐(0) 编辑

2021年9月23日

摘要: 要求: 1.限制搜索历史的个数 2.大于三十天清除历史纪录 3.最多5条历史纪录 代码: 第一部分:查询接口 @PostMapping("/getAiResults") @SneakyThrows public AjaxResult uploadFile(@RequestParam("file") 阅读全文
posted @ 2021-09-23 09:52 咸鱼张 阅读(1072) 评论(0) 推荐(0) 编辑

2021年9月9日

摘要: 今天早上,无缘无故报以下错误,前端无法访问接口文档 Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Sep 09 阅读全文
posted @ 2021-09-09 10:27 咸鱼张 阅读(383) 评论(0) 推荐(0) 编辑

2021年9月7日

摘要: 一.实战需求:redis-key过期监听 二.问题:大量key会造成监听代码臃肿 三.解决方案:使用策略模式+工厂模式代替if-else 代码: 第一部分:redis-springboot配置 package com.htjx.common.redismonitor; import org.spri 阅读全文
posted @ 2021-09-07 18:39 咸鱼张 阅读(1306) 评论(0) 推荐(0) 编辑

2021年6月24日

摘要: OLD_BUILD_ID=$BUILD_ID echo $OLD_BUILD_ID BUILD_ID=dontKillMe \cp -rf /root/.jenkins/workspace/cloud-v2/safety-modules/safety-system/target/system/lib 阅读全文
posted @ 2021-06-24 09:51 咸鱼张 阅读(376) 评论(0) 推荐(0) 编辑

2021年6月10日

摘要: 1.pom添加 <build> <finalName>system-exam</finalName> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin 阅读全文
posted @ 2021-06-10 14:56 咸鱼张 阅读(233) 评论(0) 推荐(0) 编辑
 
摘要: 已经失效参考这个 https://www.cnblogs.com/sansui6/p/17043448.html 1.准备工作 idea插件市场安装如下插件 2.如果安装后重启报错,在报错路径删除就行。 3.激活jrebel 激活码获取地址:https://www.guidgen.com/ 服务器地 阅读全文
posted @ 2021-06-10 13:52 咸鱼张 阅读(448) 评论(0) 推荐(0) 编辑

2021年4月16日

摘要: package com.safety; import cn.hutool.http.HttpUtil; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CountDownLatch; impo 阅读全文
posted @ 2021-04-16 20:33 咸鱼张 阅读(292) 评论(0) 推荐(0) 编辑