增加年/月查询接口
This commit is contained in:
parent
136875d6c0
commit
91984ff0ba
|
|
@ -1,11 +1,18 @@
|
||||||
package com.nu.modules.commonutils;
|
package com.nu.modules.commonutils;
|
||||||
|
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.modules.data.loader.DataSourceLoader;
|
import org.jeecg.modules.data.loader.DataSourceLoader;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统工具
|
* 系统工具
|
||||||
*/
|
*/
|
||||||
|
|
@ -21,4 +28,14 @@ public class SysUtilsApi {
|
||||||
dataSourceLoader.refreshDataSources();
|
dataSourceLoader.refreshDataSources();
|
||||||
return "数据源已刷新";
|
return "数据源已刷新";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取年/月
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryUpBizPrefix")
|
||||||
|
public Result<String> queryDate() {
|
||||||
|
return Result.ok(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy/MM")));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue