| | |
| | | package com.terra.collect.controller; |
| | | |
| | | import com.terra.collect.controller.all.BaseController; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.terra.common.controller.all.BaseController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.terra.collect.entity.all.ResponseMsg; |
| | | import com.terra.common.entity.all.ResponseMsg; |
| | | import java.util.Date; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | |
| | | @Api(tags = "数据汇集\\测试服务") |
| | | @RestController |
| | | @RequestMapping("/test") |
| | | public class TestController extends BaseController { |
| | | public static final SimpleDateFormat YMDHMS_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | @ApiOperation(value = "Test") |
| | | @GetMapping(value = "/test") |
| | | public ResponseMsg<Object> test() { |
| | | try { |
| | | String date = YMDHMS_FORMAT.format(new Date()); |
| | | |
| | | return success(date); |
| | | return success("Collect", date); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |