CommUtil 放到 util模块 ,增加 status http 接口

This commit is contained in:
2025-02-14 17:07:53 +08:00
parent e87eab5460
commit 9d034fb303
3 changed files with 50 additions and 4 deletions

View File

@@ -0,0 +1,41 @@
package com.fibo.ddp.manager.web.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fibo.ddp.common.model.common.ResponseEntityBuilder;
import com.fibo.ddp.common.model.common.ResponseEntityDto;
import com.fibo.ddp.common.model.common.message.template.entity.AppTemplate;
import com.fibo.ddp.common.model.common.message.template.vo.AppTemplateReqVo;
import com.fibo.ddp.common.service.common.SessionManager;
import com.fibo.ddp.common.service.common.message.template.AppTemplateService;
import com.fibo.ddp.common.utils.util.CommUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("info")
public class InfoController {
@Autowired
private AppTemplateService appTemplateService;
@RequestMapping("status")
public Object status(HttpServletRequest request){
Map map = new HashMap();
map.put("version", CommUtil.getVersion());
map.put("now", LocalDateTime.now().toString());
return map;
}
}