LoveChatController.java 1019 Bytes
package com.pipihelper.project.controller;

import com.pipihelper.project.core.Result;
import com.pipihelper.project.core.ResultGenerator;
import com.pipihelper.project.feishu.service.LoveChatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/love-chat")
public class LoveChatController {

    @Autowired
    private LoveChatService loveChatService;

    @PostMapping(value = "list")
    public Result list(@RequestParam(value = "title", required = false) String title,
                       @RequestParam("pageNum") Integer pageNum,
                       @RequestParam("pageSize") Integer pageSize) {
        return ResultGenerator.genSuccessResult(loveChatService.list(title, pageNum, pageSize));
    }
}