Commit c37d3471 by liushuangwu

LoveChatController

1 parent 1880ee07
package com.pipihelper.project.controller; package com.pipihelper.project.controller;
import com.pipihelper.project.feishu.bo.LoveChatVO; import com.pipihelper.project.core.Result;
import com.pipihelper.project.core.ResultGenerator;
import com.pipihelper.project.feishu.service.LoveChatService; import com.pipihelper.project.feishu.service.LoveChatService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -8,8 +9,6 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -8,8 +9,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController @RestController
@RequestMapping("/api/v1/love-chat") @RequestMapping("/api/v1/love-chat")
public class LoveChatController { public class LoveChatController {
...@@ -18,9 +17,9 @@ public class LoveChatController { ...@@ -18,9 +17,9 @@ public class LoveChatController {
private LoveChatService loveChatService; private LoveChatService loveChatService;
@PostMapping(value = "list") @PostMapping(value = "list")
public List<LoveChatVO> list(@RequestParam(value = "title", required = false) String title, public Result list(@RequestParam(value = "title", required = false) String title,
@RequestParam("pageNum") Integer pageNum, @RequestParam("pageNum") Integer pageNum,
@RequestParam("pageSize") Integer pageSize) { @RequestParam("pageSize") Integer pageSize) {
return loveChatService.list(title, pageNum, pageSize); return ResultGenerator.genSuccessResult(loveChatService.list(title, pageNum, pageSize));
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!