package com.repair.api;

import com.repair.model.pojo.RepairSystemMessages;
import com.repair.model.result.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/api/repairSystemMessages")
@Api(tags = {"repairSystemMessagesController"}, value = "系统信息")
public interface RepairSystemMessagesControllerAPI {

    @PostMapping(value = "/insertRepairSystemMessages")
    @ApiOperation(value = "添加系统信息", notes = "添加系统信息数据", httpMethod = "POST")
    CommonResult insertRepairSystemMessages(@Validated @RequestBody RepairSystemMessages rc, BindingResult bindingResult);

    @PostMapping(value = "/updateRepairSystemMessagesById")
    @ApiOperation(value = "编辑系统信息数据", notes = "编辑系统信息数据", httpMethod = "POST")
    CommonResult updateRepairSystemMessagesById(@Validated @RequestBody RepairSystemMessages rc, BindingResult bindingResult);

    @GetMapping(value = "/queryPageRepairSystemMessages")
    @ApiOperation(value = "系统信息分页数据", notes = "系统信息分页数据", httpMethod = "GET")
    CommonResult queryPageRepairSystemMessagess(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteRepairSystemMessagesById")
    @ApiOperation(value = "根据ID删除指定系统信息", notes = "根据ID删除指定系统信息", httpMethod = "GET")
    CommonResult deleteRepairSystemMessagesById(@RequestParam int id);

    @GetMapping(value = "/querySystemMessagePage")
    @ApiOperation(value = "消息中心", notes = "消息中心", httpMethod = "GET")
    CommonResult querySystemMessagePage(@RequestParam int currentPage, @RequestParam int pageCount, @RequestParam int userId);

    @GetMapping(value = "/readSystemMessage")
    @ApiOperation(value = "已读操作", notes = "已读操作", httpMethod = "GET")
    CommonResult readSystemMessage(@RequestParam int id);

    @GetMapping(value = "/queryManageMessagePage")
    @ApiOperation(value = "管理端消息中心", notes = "管理端消息中心", httpMethod = "GET")
    CommonResult queryManageMessagePage(@RequestParam int currentPage, @RequestParam int pageCount, String createTime, @RequestParam int statu, @RequestHeader("user_head") String userhead);

    @GetMapping(value = "/readAllManageMessage")
    @ApiOperation(value = "管理端批量已读操作", notes = "管理端批量已读操作", httpMethod = "GET")
    CommonResult readAllManageMessage(@RequestHeader("user_head") String userhead);

    @GetMapping(value = "/queryMessageUnreadCount")
    @ApiOperation(value = "获取未读数量", notes = "获取未读数量", httpMethod = "GET")
    CommonResult queryMessageUnreadCount(int userId);

    @GetMapping(value = "/queryPCMessageUnreadCount")
    @ApiOperation(value = "获取管理端未读数量", notes = "获取管理端未读数量", httpMethod = "GET")
    CommonResult queryPCMessageUnreadCount(@RequestHeader("user_head") String userhead);
}
