package cn.ey.biz.module.weaver.api.msg;

import cn.ey.biz.module.weaver.autoconfigure.FeignConfiguration;
import cn.ey.biz.module.weaver.common.Constants;
import lombok.Data;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 消息修改状态(删除)
 */
@FeignClient(name= Constants.WEAVER_NAME, url="${weaver.service.url}", configuration = FeignConfiguration.class)
public interface DeleteCustomMsgService {

    @RequestMapping(method= RequestMethod.POST, value="/api/ey/msgcenter/deleteCustomMsg",
            consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
            produces = MediaType.TEXT_PLAIN_VALUE)
    AlterCustomMsgResponse alterCustomMsg(@RequestBody AlterCustomMsgRequest request);

    @Data
    class  AlterCustomMsgRequest{
        String targetId;	  //发送消息接口中targetId，具体见发送消息接口
        String receiver;	  //接收人  多个，分割
    }

    @Data
    class AlterCustomMsgResponse{
        Boolean api_status;
        String api_msg;
    }

}
