Commit 5ba7dbad by 林冲

feat(wechat): 新增群名称及群活码相关字段

- 在AddJoinWayRequest中添加chatName字段用于群名称
- 在AddJoinWayResponse中添加groupCodeUrl、businessType、success和errorMessage字段
- 在GetJoinWayResponse中添加groupCodeUrl、configId、businessType、success和errorMessage字段
- 修改OssUtils工具类,调整convertDownloadUrlToPreviewUrl为静态方法并添加示例main方法调用
1 parent ff23b86d
...@@ -42,6 +42,12 @@ public class AddJoinWayRequest implements Serializable { ...@@ -42,6 +42,12 @@ public class AddJoinWayRequest implements Serializable {
private java.util.List<String> chatIdList; private java.util.List<String> chatIdList;
/** /**
* 群名称
*/
@Schema(description = "群名称")
private String chatName;
/**
* 企业自定义的state参数,用于区分不同的应用等,最多30个字符 * 企业自定义的state参数,用于区分不同的应用等,最多30个字符
*/ */
@Schema(description = "企业自定义的state参数,用于回调溯源") @Schema(description = "企业自定义的state参数,用于回调溯源")
......
...@@ -26,4 +26,28 @@ public class AddJoinWayResponse implements Serializable { ...@@ -26,4 +26,28 @@ public class AddJoinWayResponse implements Serializable {
@Schema(description = "新增的进群方式配置ID") @Schema(description = "新增的进群方式配置ID")
private String configId; private String configId;
/**
* 群活码链接
*/
@Schema(description = "群活码链接")
private String groupCodeUrl;
/**
* 业务类型
*/
@Schema(description = "业务类型")
private String businessType;
/**
* 是否成功
*/
@Schema(description = "是否成功")
private Boolean success;
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
} }
...@@ -25,6 +25,34 @@ public class GetJoinWayResponse implements Serializable { ...@@ -25,6 +25,34 @@ public class GetJoinWayResponse implements Serializable {
*/ */
@Schema(description = "联系二维码的URL") @Schema(description = "联系二维码的URL")
private String qrCode; private String qrCode;
// 可能包含详细的 config 信息,视业务需要 /**
* 进群方式(二维码链接)
*/
@Schema(description = "群活码链接")
private String groupCodeUrl;
/**
* 配置ID
*/
@Schema(description = "配置ID")
private String configId;
/**
* 业务类型
*/
@Schema(description = "业务类型")
private String businessType;
/**
* 是否成功
*/
@Schema(description = "是否成功")
private Boolean success;
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
} }
package com.gsc4cloud.gsc.vpc.api.util; package com.gsc4cloud.gsc.vpc.api.util;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class OssUtils { public class OssUtils {
@Value("${oss.preview}") public static String convertDownloadUrlToPreviewUrl(String downloadUrl, String previewUrl) {
private String previewUrl;
public String convertDownloadUrlToPreviewUrl(String downloadUrl) {
int i = downloadUrl.indexOf("://"); int i = downloadUrl.indexOf("://");
if (i < 0) return downloadUrl; if (i < 0) return downloadUrl;
i += 3; i += 3;
...@@ -17,9 +11,9 @@ public class OssUtils { ...@@ -17,9 +11,9 @@ public class OssUtils {
return j < 0 ? previewUrl : previewUrl + downloadUrl.substring(j); return j < 0 ? previewUrl : previewUrl + downloadUrl.substring(j);
} }
// public static void main(String[] args) { public static void main(String[] args) {
// System.out.println(convertDownloadUrlToPreviewUrl( System.out.println(convertDownloadUrlToPreviewUrl(
// "https://jinrong-huidan-test.oss-cn-shenzhen.aliyuncs.com/livecode/qrcode_4729FB_1774526596476.png", "https://jinrong-huidan-test.oss-cn-shenzhen.aliyuncs.com/webmirror/report_1767578351203.html",
// "https://jinrong-huidan-test.glsx.com.cn")); "https://jinrong-huidan-test.glsx.com.cn"));
// } }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!