package com.lantone.message.web;

import com.lantone.common.api.CommonResult;
import com.lantone.message.component.MessageSender;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @Description: redis刷新处理API
 * @author: rengb
 * @time: 2021/1/5 18:27
 */
@ApiIgnore
@RestController
@Api(value = "redis刷新处理API", tags = { "redis刷新处理API" })
public class RedisRefreshController {

    @Autowired
    private MessageSender messageSender;

    @ApiOperation(value = "redis刷新处理")
    @PostMapping("/redisRefresh")
    public CommonResult redisRefresh(@RequestBody String type) {
        messageSender.sendRedisCacheRefreshMessage(type);
        return CommonResult.success(null);
    }

}