cn.herodotus.stirrup.rest.servlet.message.controller.DialogueDetailController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-module-servlet-message Show documentation
Show all versions of rest-module-servlet-message Show documentation
Herodotus 软件生态组件库消息功能 Servlet 环境 REST 接口模块
The newest version!
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2020-2030 郑庚伟 ZHENGGENGWEI (码匠君), Licensed under the AGPL License
*
* This file is part of Herodotus Stirrup.
*
* Herodotus Stirrup is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Herodotus Stirrup is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package cn.herodotus.stirrup.rest.servlet.message.controller;
import cn.herodotus.stirrup.core.definition.domain.Result;
import cn.herodotus.stirrup.data.crud.service.JpaWriteableService;
import cn.herodotus.stirrup.logic.message.entity.DialogueDetail;
import cn.herodotus.stirrup.logic.message.service.DialogueDetailService;
import cn.herodotus.stirrup.web.api.servlet.AbstractJpaWriteableController;
import cn.herodotus.stirrup.web.core.annotation.Idempotent;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.tags.Tags;
import jakarta.validation.constraints.NotNull;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* Description: DialogueDetailController
*
* @author : gengwei.zheng
* @date : 2022/12/17 12:49
*/
@RestController
@RequestMapping("/message/dialogue/detail")
@Tags({
@Tag(name = "消息管理接口"),
@Tag(name = "私信管理接口"),
@Tag(name = "私信详情管理接口")
})
public class DialogueDetailController extends AbstractJpaWriteableController {
private final DialogueDetailService dialogueDetailService;
public DialogueDetailController(DialogueDetailService dialogueDetailService) {
this.dialogueDetailService = dialogueDetailService;
}
@Override
public JpaWriteableService getWriteableService() {
return dialogueDetailService;
}
@Operation(summary = "条件查询私信详情分页数据", description = "根据输入的字段条件查询详情信息",
responses = {@ApiResponse(description = "详情列表", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)))})
@Parameters({
@Parameter(name = "pageNumber", required = true, description = "当前页码", schema = @Schema(type = "integer")),
@Parameter(name = "pageSize", required = true, description = "每页显示数量", schema = @Schema(type = "integer")),
@Parameter(name = "dialogueId", required = true, description = "对话ID"),
})
@GetMapping("/condition")
public Result