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 AlterCustomMsgService {

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

    @Data
    class SendCustomMsgRequest {
        String targetId;	//发送消息接口中targetId，具体见发送消息接口
        String receiver;	//接收人  多个，分割
        String bizState;	//业务状态 待处理 0 已处理 1 已同意 2 已拒绝 3 已删除 27 已暂停 34 已撤销 35
    }

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