【功能新增】MALL:新增 mall 客服

This commit is contained in:
YunaiV
2024-07-13 12:24:49 +08:00
parent ce1940e4f3
commit 03e07a2902
23 changed files with 108 additions and 96 deletions

View File

@@ -4,7 +4,8 @@ import cn.iocoder.yudao.module.system.api.social.dto.SocialWxJsapiSignatureRespD
import cn.iocoder.yudao.module.system.api.social.dto.SocialWxPhoneNumberInfoRespDTO;
import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO;
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
import jakarta.validation.Valid;
import javax.validation.Valid;
/**
* 社交应用的 API 接口

View File

@@ -4,8 +4,8 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO;
import cn.iocoder.yudao.module.system.api.social.dto.SocialUserRespDTO;
import cn.iocoder.yudao.module.system.api.social.dto.SocialUserUnbindReqDTO;
import cn.iocoder.yudao.module.system.api.social.dto.SocialWxQrcodeReqDTO;
import jakarta.validation.Valid;
import javax.validation.Valid;
/**
* 社交用户的 API 接口

View File

@@ -1,8 +1,9 @@
package cn.iocoder.yudao.module.system.api.social.dto;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
/**
* 获取小程序码 Request DTO
*

View File

@@ -24,6 +24,7 @@ import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
@@ -142,7 +143,7 @@ public class HuaweiSmsClient extends AbstractSmsClient {
}
static String buildRequestBody(String sender, String receiver, String templateId, List<String> templateParas,
String statusCallBack, @SuppressWarnings("SameParameterValue") String signature) {
String statusCallBack, @SuppressWarnings("SameParameterValue") String signature) throws UnsupportedEncodingException {
// TODO @scholar参数不满足是不是抛出异常更好哈通过 hutool 的 Assert 去断言
if (null == sender || null == receiver || null == templateId || sender.isEmpty() || receiver.isEmpty()
|| templateId.isEmpty()) {
@@ -161,10 +162,10 @@ public class HuaweiSmsClient extends AbstractSmsClient {
return body.toString();
}
private static void appendToBody(StringBuilder body, String key, String val) {
private static void appendToBody(StringBuilder body, String key, String val) throws UnsupportedEncodingException {
// TODO @scholarStrUtils.isNotEmpty(val),是不是更简洁哈
if (null != val && !val.isEmpty()) {
body.append(key).append(URLEncoder.encode(val, StandardCharsets.UTF_8));
body.append(key).append(URLEncoder.encode(val, StandardCharsets.UTF_8.name()));
}
}

View File

@@ -8,9 +8,10 @@ import cn.iocoder.yudao.module.system.controller.admin.socail.vo.client.SocialCl
import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialClientDO;
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
import com.xingyuv.jushauth.model.AuthUser;
import jakarta.validation.Valid;
import me.chanjar.weixin.common.bean.WxJsapiSignature;
import javax.validation.Valid;
/**
* 社交应用 Service 接口
*

View File

@@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.system.framework.sms.core.client.impl;
import cn.hutool.core.collection.ListUtil;
import cn.iocoder.yudao.framework.common.core.KeyValue;
import cn.iocoder.yudao.module.system.framework.sms.core.client.dto.SmsSendRespDTO;
import cn.iocoder.yudao.module.system.framework.sms.core.property.SmsChannelProperties;
@@ -26,7 +27,7 @@ public class SmsClientTests {
Long sendLogId = System.currentTimeMillis();
String mobile = "15601691323";
String apiTemplateId = "xx test01";
List<KeyValue<String, Object>> templateParams = List.of(new KeyValue<>("code", "1024"));
List<KeyValue<String, Object>> templateParams = ListUtil.of(new KeyValue<>("code", "1024"));
// 调用
SmsSendRespDTO smsSendRespDTO = client.sendSms(sendLogId, mobile, apiTemplateId, templateParams);
// 打印结果