mysql数据存在则更新、不存在插入
2026/7/16 19:26:25 网站建设 项目流程

数据库

controller层

@GetMapping("/updateDataByDate")publicvoidupdateDataByDate(){IntegernewUserCount=userService.newUserCount();IntegeractiveUserCount=userService.activeUserCount();LocalDatenow=LocalDate.now().minusDays(1);userDailyStaticService.saveOrUpdateDada(now,newUserCount,activeUserCount);}

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询