refactor(cms): 调整站点统计接口和模型
- 移除了 CmsStatisticsController 中的 @PreAuthorize 注解 - 修改了 CmsWebsiteServiceImplHelper 中的时间格式化逻辑 - 将 CmsVO 中的 createTime 字段类型从 LocalDateTime 改为 String
This commit is contained in:
@@ -31,7 +31,6 @@ public class CmsStatisticsController extends BaseController {
|
||||
@Resource
|
||||
private CmsStatisticsService cmsStatisticsService;
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsStatistics:list')")
|
||||
@Operation(summary = "分页查询站点统计信息表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsStatistics>> page(CmsStatisticsParam param) {
|
||||
@@ -47,7 +46,6 @@ public class CmsStatisticsController extends BaseController {
|
||||
return success(cmsStatisticsService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsStatistics:list')")
|
||||
@Operation(summary = "根据id查询站点统计信息表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsStatistics> get(@PathVariable("id") Integer id) {
|
||||
|
||||
@@ -52,7 +52,7 @@ public class CmsWebsiteServiceImplHelper {
|
||||
public static CmsVO convertToVO(CmsWebsite website) {
|
||||
CmsVO vo = new CmsVO();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
System.out.println("website_tenantName = " + website.getTenantName());
|
||||
|
||||
// 基本信息
|
||||
vo.setAppId(website.getTenantId());
|
||||
vo.setAppName(website.getTenantName());
|
||||
@@ -64,7 +64,7 @@ public class CmsWebsiteServiceImplHelper {
|
||||
vo.setDomain(website.getDomain());
|
||||
vo.setRunning(website.getRunning());
|
||||
vo.setVersion(website.getVersion());
|
||||
vo.setCreateTime(website.getCreateTime());
|
||||
vo.setCreateTime(String.valueOf(website.getCreateTime()));
|
||||
|
||||
// 时间字段 - 格式化为字符串
|
||||
if (website.getExpirationTime() != null) {
|
||||
|
||||
@@ -59,7 +59,7 @@ public class CmsVO implements Serializable {
|
||||
private String expirationTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
private String createTime;
|
||||
|
||||
@Schema(description = "是否到期 -1已过期 1未过期")
|
||||
private Integer expired;
|
||||
|
||||
Reference in New Issue
Block a user