feat(channel): 新增 mci-channel-wecom 模块及 WeComChannelAdapter 桩实现

This commit is contained in:
2026-07-07 17:37:01 +08:00
parent 616f5fd2d3
commit a0db14fb2b
4 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
package com.sino.mci.channel.wecom;
import com.sino.mci.channel.common.dto.CallbackPayload;
import com.sino.mci.channel.common.dto.ChannelInitRequest;
import com.sino.mci.channel.common.dto.ChannelInitResult;
import com.sino.mci.channel.common.dto.SendMessageRequest;
import com.sino.mci.channel.common.dto.SendMessageResult;
import com.sino.mci.channel.common.model.ChannelType;
import com.sino.mci.channel.common.spi.ChannelAdapter;
import org.springframework.stereotype.Component;
@Component
public class WeComChannelAdapter implements ChannelAdapter {
@Override
public ChannelType getChannelType() {
return ChannelType.WECOM;
}
@Override
public ChannelInitResult initAccount(ChannelInitRequest request) {
ChannelInitResult result = new ChannelInitResult();
result.setSuccess(false);
result.setMessage("WeCom channel adapter is a stub and has not been implemented yet.");
return result;
}
@Override
public SendMessageResult sendMessage(SendMessageRequest request) {
SendMessageResult result = new SendMessageResult();
result.setSuccess(false);
result.setMessage("WeCom channel adapter is a stub and has not been implemented yet.");
return result;
}
@Override
public CallbackPayload parseCallback(String rawBody) {
CallbackPayload payload = new CallbackPayload();
payload.setChannelType(ChannelType.WECOM.name());
payload.setRawBody(rawBody);
return payload;
}
}