增加年/月查询接口

This commit is contained in:
1378012178@qq.com 2025-11-25 09:50:32 +08:00
parent b192b1743e
commit a38354d978
1 changed files with 14 additions and 0 deletions

View File

@ -1,11 +1,16 @@
package com.nu.modules.common;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.data.loader.DataSourceLoader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
/**
* 系统工具
*/
@ -21,4 +26,13 @@ public class SysUtilsApi {
dataSourceLoader.refreshDataSources();
return "数据源已刷新";
}
/**
* 获取年/
* @return
*/
@GetMapping("/queryUpBizPrefix")
public Result<String> queryDate() {
return Result.ok(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy/MM")));
}
}