2025年4月1日

查看用户及设置全局用户

摘要: git全局设置用户git config --global user.name 'xxx' git config --global user.email 'xxxx@163.com' 查看当前用户$ git config --get user.namexxx$ git config --get use 阅读全文

posted @ 2025-04-01 09:46 nitianxiaozi 阅读(10) 评论(0) 推荐(0)

2024年3月14日

关于通过接口调用后,修改时间与本地时间不一致问题

摘要: characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai,url后面拼接这个就好了 阅读全文

posted @ 2024-03-14 16:16 nitianxiaozi 阅读(32) 评论(0) 推荐(0)

2023年12月18日

关于把long类型的参数直接传到xml中当sql查询的参数非常慢这件事

摘要: 起初,有一张表超级大想要将表复制下来 如果查出来list再去复制这将非常慢,听了同事的建议使用了insert into (select * from table)速度得到了显著改善。可是我写代码的时候,再调用接口的时候发现足足有15s,而navicat执行sql语句只有400ms,感觉哪里出了问题但 阅读全文

posted @ 2023-12-18 20:08 nitianxiaozi 阅读(53) 评论(0) 推荐(0)

2023年12月13日

简单使用

摘要: public class StateListener implements ApplicationListener<ContextRefreshedEvent> { @Resource private ConnectionFactory connectionFactory; @Bean public 阅读全文

posted @ 2023-12-13 17:35 nitianxiaozi 阅读(36) 评论(0) 推荐(0)

fegin接口异步调用token丢失问题

摘要: 先将请求头取出RequestContextHolder.getRequestAttributes()调用异步方法时再塞进去public void async(){ RequestContextHolder.setRequestAttributes(requestAttributes); } 阅读全文

posted @ 2023-12-13 16:22 nitianxiaozi 阅读(199) 评论(0) 推荐(0)

2023年12月12日

数据库存储数据时差问题

摘要: characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai 数据库后面加上这个可以解决 阅读全文

posted @ 2023-12-12 19:12 nitianxiaozi 阅读(12) 评论(0) 推荐(0)

2023年12月3日

数据过多时候,子查询改成left join减少笛卡尔积

摘要: 子查询 SELECT cn.portal_id AS portalId, count( id ) AS num FROM construction_package_wbs_node cn WHERE cn.delete_flag = 0 AND ( cn.node_type = '单位工程' OR 阅读全文

posted @ 2023-12-03 14:39 nitianxiaozi 阅读(103) 评论(0) 推荐(0)

查询不同种类最新的一条数据

摘要: 1. any_value()的使用 SELECT t.portal_id AS portalId, any_value(t.cumulative_comleted) AS completed FROM ( SELECT pfndo.portal_id, pfndo.milestones_node_d 阅读全文

posted @ 2023-12-03 10:55 nitianxiaozi 阅读(44) 评论(0) 推荐(0)

想要分页不是sql查询出的list

摘要: 1. PageInfo pageInfo = new PageInfo(progressFileNews); 2. pageInfo.setList(voList); 第一步,放入sql查询出的list 把total page size 信息拿到 第二步,将分页的list塞成自己想要分页的同源lis 阅读全文

posted @ 2023-12-03 10:18 nitianxiaozi 阅读(18) 评论(0) 推荐(0)

2023年11月30日

多数据源事务使用

摘要: 需要在注解上指明事务管理器: @Transactional(transactionManager = "fawkesTransactionManager")public void batchInsert(List list){ ....} 阅读全文

posted @ 2023-11-30 19:13 nitianxiaozi 阅读(14) 评论(0) 推荐(0)

导航