New file |
| | |
| | | package cn.huge.module.disp.controller.client; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.disp.utils.DispIdUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * @title: 公共参数-id工具接口api-disp服务专用 |
| | | * @description: 公共参数-id工具接口api-disp服务专用 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2022-04-29 10:12:39 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/client/dispUtils") |
| | | public class DispUtilsController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | |
| | | /** |
| | | * 公共id-获取时间Id,后四位常量 |
| | | * @url {ctx}/api/client/dispUtils/getNewTimeId |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getNewTimeId") |
| | | public Object getNewTimeId() { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(DispIdUtils.getNewTimeId()); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |