修改Response 的date响应字段

This commit is contained in:
禾几海
2020-05-26 13:59:36 +08:00
parent 4035c7e024
commit 450978ecd9
14 changed files with 92 additions and 166 deletions

View File

@@ -2,7 +2,6 @@ package cn.celess.blog.controller;
import cn.celess.blog.entity.Response;
import cn.celess.blog.service.WebUpdateInfoService;
import cn.celess.blog.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -17,31 +16,32 @@ public class WebUpdateInfoController {
@PostMapping("/admin/webUpdate/create")
public Response create(@RequestParam("info") String info) {
return ResponseUtil.success(webUpdateInfoService.create(info));
return Response.success(webUpdateInfoService.create(info));
}
@DeleteMapping("/admin/webUpdate/del/{id}")
public Response del(@PathVariable("id") long id) {
return ResponseUtil.success(webUpdateInfoService.del(id));
return Response.success(webUpdateInfoService.del(id));
}
@PutMapping("/admin/webUpdate/update")
public Response update(@RequestParam("id") long id, @RequestParam("info") String info) {
return ResponseUtil.success(webUpdateInfoService.update(id, info));
return Response.success(webUpdateInfoService.update(id, info));
}
@GetMapping("/webUpdate")
public Response findAll() {
return ResponseUtil.success(webUpdateInfoService.findAll());
return Response.success(webUpdateInfoService.findAll());
}
@GetMapping("/webUpdate/pages")
public Response page(@RequestParam("page") int page, @RequestParam("count") int count) {
return ResponseUtil.success(webUpdateInfoService.pages(count, page));
return Response.success(webUpdateInfoService.pages(count, page));
}
@GetMapping("/lastestUpdate")
public Response lastestUpdateTime() {
return ResponseUtil.success(webUpdateInfoService.getLastestUpdateTime());
return Response.success(webUpdateInfoService.getLastestUpdateTime());
}