diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java
index e12da0078..901c7cbd0 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java
@@ -22,7 +22,7 @@ import java.util.List;
@Api(tags = "RPC 服务 - 错误码")
public interface ErrorCodeApi {
- String PREFIX = ApiConstants.PREFIX + "/oauth2/token";
+ String PREFIX = ApiConstants.PREFIX + "/error-code";
@PostMapping(PREFIX + "/auto-generate")
@ApiOperation("自动创建错误码")
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml
index 8c4c25faa..5598ef1a5 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml
+++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/application.yaml
@@ -78,6 +78,7 @@ yudao:
- /admin-api/system/captcha/get-image # 获取图片验证码,和租户无关
- /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号
- /rpc-api/system/tenant/valid # 防止递归。避免调用 /rpc-api/system/tenant/valid 接口时,又去触发 /rpc-api/system/tenant/valid 去校验
+ - /rpc-api/system/error-code/* # 错误码的自动创建与下载的接口,无法带上租户编号
ignore-tables:
- system_tenant
- system_tenant_package
diff --git a/归档/common/mall-spring-boot-starter-system-error-code/src/main/resources/META-INF/spring.factories b/归档/common/mall-spring-boot-starter-system-error-code/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index 760e604d3..000000000
--- a/归档/common/mall-spring-boot-starter-system-error-code/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,2 +0,0 @@
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
- cn.iocoder.mall.system.errorcode.config.ErrorCodeAutoConfiguration
diff --git a/归档/moved/system/system-biz/pom.xml b/归档/moved/system/system-biz/pom.xml
deleted file mode 100644
index 6f2ee0145..000000000
--- a/归档/moved/system/system-biz/pom.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- system
- cn.iocoder.mall
- 1.0-SNAPSHOT
-
- 4.0.0
-
- system-biz
-
-
-
-
- cn.iocoder.mall
- system-biz-api
- 1.0-SNAPSHOT
-
-
-
-
- org.springframework.boot
- spring-boot-starter
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
- org.springframework
- spring-tx
-
-
- org.springframework
- spring-jdbc
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
- cn.iocoder.mall
- mall-spring-boot-starter-mybatis
- 1.0-SNAPSHOT
-
-
-
-
- com.yunpian.sdk
- yunpian-java-sdk
-
-
- com.aliyun
- aliyun-java-sdk-core
-
-
-
-
- com.qiniu
- qiniu-java-sdk
-
-
-
-
- org.mapstruct
- mapstruct
-
-
- org.mapstruct
- mapstruct-jdk8
-
-
- org.projectlombok
- lombok
-
-
-
- com.alibaba
- fastjson
-
-
-
-
- org.springframework.boot
- spring-boot-starter-aop
-
-
- org.springframework
- spring-webmvc
- compile
-
-
- javax.servlet
- servlet-api
- compile
-
-
-
-
-
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsSign/ListSmsSignBO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsSign/ListSmsSignBO.java
deleted file mode 100644
index bc3a3db8d..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsSign/ListSmsSignBO.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cn.iocoder.mall.system.biz.bo.smsSign;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.util.Date;
-
-/**
- * sms page
- *
- * @author Sin
- * @time 2019/5/19 4:23 PM
- */
-@Data
-@Accessors(chain = true)
-public class ListSmsSignBO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 短信平台
- */
- private Integer platform;
- /**
- * 签名名称
- */
- private String sign;
- /**
- * 审核状态
- *
- * - 1、审核中
- * - 2、审核成功
- * - 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
- /**
- * 更新时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date updateTime;
- /**
- * 创建时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date createTime;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsSign/SmsSignBO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsSign/SmsSignBO.java
deleted file mode 100644
index e14e3f38e..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsSign/SmsSignBO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cn.iocoder.mall.system.biz.bo.smsSign;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信签名
- *
- * @author Sin
- * @time 2019/5/16 6:30 PM
- */
-@Data
-@Accessors(chain = true)
-public class SmsSignBO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 签名id 这个是第三方的
- */
- private Integer signId;
- /**
- * 签名名称
- */
- private String sign;
- /**
- * 审核状态
- *
- * - 1、审核中
- * - 2、审核成功
- * - 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsTemplate/ListSmsTemplateBO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsTemplate/ListSmsTemplateBO.java
deleted file mode 100644
index 0cbf83d58..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsTemplate/ListSmsTemplateBO.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package cn.iocoder.mall.system.biz.bo.smsTemplate;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.util.Date;
-
-/**
- * sms page
- *
- * @author Sin
- * @time 2019/5/19 4:23 PM
- */
-@Data
-@Accessors(chain = true)
-public class ListSmsTemplateBO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 模板编号 (第三方的)
- */
- private Integer smsSignId;
- /**
- * 短信签名 id
- */
- private String platform;
- /**
- * 短信模板 Code
- */
- private String templateCode;
- /**
- * 短信模板
- */
- private String template;
- /**
- * 短信类型
- */
- private Integer smsType;
- /**
- * 审核状态
- *
- * 1、审核中
- * 2、审核成功
- * 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
- /**
- * 更新时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date updateTime;
- /**
- * 创建时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date createTime;
-
- ///
- /// 关联字段
-
- /**
- * 签名信息
- */
- private Sign sign;
-
-
- @Data
- @Accessors(chain = true)
- public static class Sign {
- /**
- * 编号
- */
- private Integer id;
- /**
- * 签名id 这个是第三方的
- */
- private String platformId;
- /**
- * 签名名称
- */
- private String sign;
- /**
- * 审核状态
- *
- * - 1、审核中
- * - 2、审核成功
- * - 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsTemplate/SmsTemplateBO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsTemplate/SmsTemplateBO.java
deleted file mode 100644
index d19aab797..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/smsTemplate/SmsTemplateBO.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package cn.iocoder.mall.system.biz.bo.smsTemplate;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信 template
- *
- * @author Sin
- * @time 2019/5/16 7:41 PM
- */
-@Data
-@Accessors(chain = true)
-public class SmsTemplateBO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 模板编号 (第三方的)
- */
- private Integer smsSignId;
- /**
- * 短信签名 id
- */
- private String platformId;
- /**
- * 短信模板
- */
- private String template;
- /**
- * 审核状态
- *
- * 1、审核中
- * 2、审核成功
- * 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/QiniuConfiguration.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/QiniuConfiguration.java
deleted file mode 100644
index 7e5519d00..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/config/QiniuConfiguration.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cn.iocoder.mall.system.biz.config;
-
-import com.qiniu.util.Auth;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class QiniuConfiguration {
-
- @Value("${qiniu.access-key}")
- private String accessKey;
- @Value("${qiniu.secret-key}")
- private String secretKey;
-
- @Bean
- public Auth auth() {
- return Auth.create(accessKey, secretKey);
- }
-
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/SmsSignConvert.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/SmsSignConvert.java
deleted file mode 100644
index 8bf1df19b..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/SmsSignConvert.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package cn.iocoder.mall.system.biz.convert;
-
-import cn.iocoder.mall.system.biz.bo.smsSign.ListSmsSignBO;
-import cn.iocoder.mall.system.biz.bo.smsSign.SmsSignBO;
-import cn.iocoder.mall.system.biz.dataobject.sms.SmsSignDO;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-
-/**
- * 短信 签名
- *
- * @author Sin
- * @time 2019/5/16 6:31 PM
- */
-@Mapper
-public interface SmsSignConvert {
-
- SmsSignConvert INSTANCE = Mappers.getMapper(SmsSignConvert.class);
-
- @Mappings({})
- SmsSignBO convert(SmsSignDO bean);
-
- @Mappings({})
- List convert(List beans);
-
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/SmsTemplateConvert.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/SmsTemplateConvert.java
deleted file mode 100644
index 586fcc389..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/convert/SmsTemplateConvert.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cn.iocoder.mall.system.biz.convert;
-
-import cn.iocoder.mall.system.biz.bo.smsTemplate.ListSmsTemplateBO;
-import cn.iocoder.mall.system.biz.bo.smsTemplate.SmsTemplateBO;
-import cn.iocoder.mall.system.biz.dataobject.sms.SmsSignDO;
-import cn.iocoder.mall.system.biz.dataobject.sms.SmsTemplateDO;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-
-/**
- * 短信 template
- *
- * @author Sin
- * @time 2019/5/16 7:43 PM
- */
-@Mapper
-public interface SmsTemplateConvert {
-
- SmsTemplateConvert INSTANCE = Mappers.getMapper(SmsTemplateConvert.class);
-
- @Mappings({})
- SmsTemplateBO convert(SmsTemplateDO smsTemplateDO);
-
- @Mappings({})
- List convert(List smsTemplateDOList);
-
- @Mappings({})
- List convertTemplateSign(List smsSignDOList);
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/sms/SmsSendMapper.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/sms/SmsSendMapper.java
deleted file mode 100644
index 88475fab0..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/sms/SmsSendMapper.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cn.iocoder.mall.system.biz.dao.sms;
-
-import cn.iocoder.mall.system.biz.dataobject.sms.SmsSendLogDO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springframework.stereotype.Repository;
-
-/**
- * 短信
- *
- * @author Sin
- * @time 2019/5/16 6:18 PM
- */
-@Repository
-public interface SmsSendMapper extends BaseMapper {
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/sms/SmsSignMapper.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/sms/SmsSignMapper.java
deleted file mode 100644
index 6aa05f8dd..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/sms/SmsSignMapper.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package cn.iocoder.mall.system.biz.dao.sms;
-
-import cn.iocoder.mall.system.biz.dataobject.sms.SmsSignDO;
-import cn.iocoder.mall.system.biz.dto.smsSign.ListSmsSignDTO;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.springframework.stereotype.Repository;
-import org.springframework.util.StringUtils;
-
-/**
- * 短信
- *
- * @author Sin
- * @time 2019/5/16 6:18 PM
- */
-@Repository
-public interface SmsSignMapper extends BaseMapper {
-
- default IPage listSmsSign(ListSmsSignDTO queryDTO) {
- LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
- if (queryDTO.getApplyStatus() != null) {
- queryWrapper.eq(SmsSignDO::getApplyStatus, queryDTO.getApplyStatus());
- }
- if (!StringUtils.isEmpty(queryDTO.getSign())) {
- queryWrapper.like(SmsSignDO::getSign, queryDTO.getSign());
- }
- if (!StringUtils.isEmpty(queryDTO.getId())) {
- queryWrapper.eq(SmsSignDO::getId, queryDTO.getId());
- }
-
- Page page = new Page()
- .setSize(queryDTO.getPageSize())
- .setCurrent(queryDTO.getPageNo())
- .setDesc("create_time");
- return selectPage(page, queryWrapper);
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/sms/SmsTemplateMapper.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/sms/SmsTemplateMapper.java
deleted file mode 100644
index effa88f88..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/sms/SmsTemplateMapper.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package cn.iocoder.mall.system.biz.dao.sms;
-
-import cn.iocoder.mall.system.biz.dataobject.sms.SmsTemplateDO;
-import cn.iocoder.mall.system.biz.dto.smsTemplate.ListSmsTemplateDTO;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.springframework.stereotype.Repository;
-import org.springframework.util.StringUtils;
-
-/**
- * 短信 template
- *
- * @author Sin
- * @time 2019/5/16 6:18 PM
- */
-@Repository
-public interface SmsTemplateMapper extends BaseMapper {
-
- default IPage listSmsTemplate(ListSmsTemplateDTO listSmsTemplateDTO) {
- QueryWrapper queryWrapper = new QueryWrapper<>();
- if (listSmsTemplateDTO.getApplyStatus() != null) {
- queryWrapper.eq("apply_status", listSmsTemplateDTO.getApplyStatus());
- }
- if (listSmsTemplateDTO.getSmsSignId() != null) {
- queryWrapper.eq("sms_sign_id", listSmsTemplateDTO.getSmsSignId());
- }
- if (!StringUtils.isEmpty(listSmsTemplateDTO.getTemplate())) {
- queryWrapper.like("template", listSmsTemplateDTO.getTemplate());
- }
- if (!StringUtils.isEmpty(listSmsTemplateDTO.getId())) {
- queryWrapper.eq("id", listSmsTemplateDTO.getId());
- }
-
- Page page = new Page()
- .setSize(listSmsTemplateDTO.getPageSize())
- .setCurrent(listSmsTemplateDTO.getPageNo())
- .setDesc("create_time");
- return selectPage(page, queryWrapper);
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/sms/SmsSendLogDO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/sms/SmsSendLogDO.java
deleted file mode 100644
index 2d9c7c33d..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/sms/SmsSendLogDO.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package cn.iocoder.mall.system.biz.dataobject.sms;
-
-import cn.iocoder.mall.mybatis.core.dataobject.BaseDO;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信 client log
- *
- * @author Sin
- * @time 2019/5/25 12:36 PM
- */
-@Data
-@Accessors(chain = true)
-public class SmsSendLogDO extends BaseDO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 短信模板
- */
- private Integer templateId;
- /**
- * 短信
- */
- private String template;
- /**
- * 参数
- */
- private String params;
- /**
- * 发送信息
- */
- private String message;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/sms/SmsSignDO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/sms/SmsSignDO.java
deleted file mode 100644
index de5310868..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/sms/SmsSignDO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cn.iocoder.mall.system.biz.dataobject.sms;
-
-import cn.iocoder.mall.mybatis.core.dataobject.DeletableDO;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信签名
- *
- * 签名是短信发送前缀 如:【阿里云】、【小红书】
- *
- * @author Sin
- * @time 2019/5/16 12:28 PM
- */
-@Data
-@Accessors(chain = true)
-@TableName("sms_sign")
-public class SmsSignDO extends DeletableDO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 签名名称
- */
- private String sign;
- /**
- * 平台
- *
- * 1、云片
- * 2、阿里云
- */
- private Integer platform;
- /**
- * 审核状态
- *
- * - 1、审核中
- * - 2、审核成功
- * - 10、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/sms/SmsTemplateDO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/sms/SmsTemplateDO.java
deleted file mode 100644
index d0dfaeae8..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dataobject/sms/SmsTemplateDO.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package cn.iocoder.mall.system.biz.dataobject.sms;
-
-import cn.iocoder.mall.mybatis.core.dataobject.DeletableDO;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信 模板
- *
- * @author Sin
- * @time 2019/5/16 12:31 PM
- */
-@Data
-@Accessors(chain = true)
-@TableName("sms_template")
-public class SmsTemplateDO extends DeletableDO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 模板编号 (第三方的)
- */
- private Integer smsSignId;
- /**
- * 模板 code(第三方平台 code)
- */
- private String templateCode;
- /**
- * 短信签名 id
- */
- private Integer platform;
- /**
- * 短信模板
- */
- private String template;
- /**
- * 短信类型
- *
- * - 验证码类
- * - 通知类
- * - 营销类
- */
- private Integer smsType;
- /**
- * 审核状态
- *
- * 1、审核中
- * 2、审核成功
- * 10、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsSign/AddSignDTO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsSign/AddSignDTO.java
deleted file mode 100644
index 01fc7bfcb..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsSign/AddSignDTO.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cn.iocoder.mall.system.biz.dto.smsSign;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-/**
- * 添加 sign
- *
- * author: sin
- * time: 2020/4/20 11:10 上午
- */
-@Data
-@Accessors(chain = true)
-public class AddSignDTO implements Serializable {
-
- private String sign;
-
- private Integer platform;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsSign/ListSmsSignDTO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsSign/ListSmsSignDTO.java
deleted file mode 100644
index 0ed8bb8bb..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsSign/ListSmsSignDTO.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package cn.iocoder.mall.system.biz.dto.smsSign;
-
-import cn.iocoder.common.framework.vo.PageParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * page 短信模板 query
- *
- * @author Sin
- * @time 2019/5/19 4:32 PM
- */
-@Data
-@Accessors(chain = true)
-@ApiModel("短信服务查询")
-public class ListSmsSignDTO extends PageParam {
-
- @ApiModelProperty("编号")
- private Integer id;
-
- @ApiModelProperty("签名")
- private String sign;
-
- @ApiModelProperty("申请状态")
- private Integer applyStatus;
-
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsSign/UpdateSignDTO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsSign/UpdateSignDTO.java
deleted file mode 100644
index 8e45514f4..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsSign/UpdateSignDTO.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package cn.iocoder.mall.system.biz.dto.smsSign;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-/**
- * 更新签名
- *
- * author: sin
- * time: 2020/4/20 11:05 上午
- */
-@Data
-@Accessors(chain = true)
-public class UpdateSignDTO implements Serializable {
-
- private Integer id;
-
- private String sign;
-
- private Integer platform;
-
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsTemplate/ListSmsTemplateDTO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsTemplate/ListSmsTemplateDTO.java
deleted file mode 100644
index 86eaecb50..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/smsTemplate/ListSmsTemplateDTO.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.iocoder.mall.system.biz.dto.smsTemplate;
-
-import cn.iocoder.common.framework.vo.PageParam;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * page 短信模板 query
- *
- * @author Sin
- * @time 2019/5/19 4:32 PM
- */
-@Data
-@Accessors(chain = true)
-public class ListSmsTemplateDTO extends PageParam {
-
- @NotNull
- private String id;
-
- @NotNull
- private Integer smsSignId;
-
- @NotNull
- private String template;
-
- @NotNull
- private String applyStatus;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/enums/sms/SmsApplyStatusEnum.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/enums/sms/SmsApplyStatusEnum.java
deleted file mode 100644
index 80ce41876..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/enums/sms/SmsApplyStatusEnum.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package cn.iocoder.mall.system.biz.enums.sms;
-
-/**
- * 短信审核状态
- *
- * @author Sin
- * @time 2019/5/16 12:48 PM
- */
-public enum SmsApplyStatusEnum {
-
- CHECKING(1, "审核中"),
- SUCCESS(2, "审核成功"),
- FAIL(10, "审核失败"),
- ;
-
- private final Integer value;
- private final String name;
-
- SmsApplyStatusEnum(int code, String message) {
- this.value = code;
- this.name = message;
- }
-
- public int getValue() {
- return value;
- }
-
- public String getName() {
- return name;
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/enums/sms/SmsPlatformEnum.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/enums/sms/SmsPlatformEnum.java
deleted file mode 100644
index ce125e1ba..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/enums/sms/SmsPlatformEnum.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package cn.iocoder.mall.system.biz.enums.sms;
-
-import cn.iocoder.common.framework.core.IntArrayValuable;
-
-import java.util.Arrays;
-
-/**
- * 短信审核状态
- *
- * @author Sin
- * @time 2019/5/16 12:48 PM
- */
-public enum SmsPlatformEnum implements IntArrayValuable {
-
- YunPian(1, "云片"),
- AliYun(2, "阿里云"),
- ;
-
- public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsPlatformEnum::getValue).toArray();
-
- private final Integer value;
- private final String name;
-
- SmsPlatformEnum(Integer code, String message) {
- this.value = code;
- this.name = message;
- }
-
- public Integer getValue() {
- return value;
- }
-
- public String getName() {
- return name;
- }
-
- @Override
- public int[] array() {
- return ARRAYS;
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/enums/sms/SmsTypeEnum.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/enums/sms/SmsTypeEnum.java
deleted file mode 100644
index 29fafc9e8..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/enums/sms/SmsTypeEnum.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package cn.iocoder.mall.system.biz.enums.sms;
-
-import cn.iocoder.common.framework.core.IntArrayValuable;
-
-import java.util.Arrays;
-
-/**
- * 短信审核状态
- *
- * @author Sin
- * @time 2019/5/16 12:48 PM
- */
-public enum SmsTypeEnum implements IntArrayValuable {
-
- VERIFICATION_CODE(1, "验证码"),
- NOTICE(2, "通知"),
- MARKETING(3, "营销"),
- ;
-
- public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsTypeEnum::getValue).toArray();
-
- private final Integer value;
- private final String name;
-
- SmsTypeEnum(Integer code, String message) {
- this.value = code;
- this.name = message;
- }
-
- public Integer getValue() {
- return value;
- }
-
- public String getName() {
- return name;
- }
-
- @Override
- public int[] array() {
- return ARRAYS;
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/annotation/OperationLogging.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/annotation/OperationLogging.java
deleted file mode 100644
index db597757f..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/annotation/OperationLogging.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cn.iocoder.mall.system.biz.log.operation.annotation;
-
-import java.lang.annotation.*;
-
-/**
- * @author Hccake
- * @version 1.0
- * @date 2019/10/15 18:09
- */
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface OperationLogging {
-
- /**
- * 日志信息
- * @return
- */
- String value();
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/aspect/OperationLogAspect.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/aspect/OperationLogAspect.java
deleted file mode 100644
index ff79f7d11..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/aspect/OperationLogAspect.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package cn.iocoder.mall.system.biz.log.operation.aspect;
-
-import cn.hutool.core.util.ArrayUtil;
-import cn.hutool.core.util.URLUtil;
-import cn.hutool.json.JSONUtil;
-import cn.iocoder.common.framework.util.HttpUtil;
-import cn.iocoder.common.framework.util.MallUtils;
-import cn.iocoder.mall.system.biz.log.operation.annotation.OperationLogging;
-import cn.iocoder.mall.system.biz.log.operation.enums.LogStatus;
-import cn.iocoder.mall.system.biz.log.operation.event.OperationLogEvent;
-import cn.iocoder.mall.system.biz.log.operation.model.dto.OperationLogDTO;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.Signature;
-import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.springframework.context.ApplicationEventPublisher;
-import org.springframework.core.annotation.Order;
-import org.springframework.web.context.request.RequestContextHolder;
-import org.springframework.web.context.request.ServletRequestAttributes;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * @author Hccake
- * @version 1.0
- * @date 2019/10/15 18:16
- */
-@Slf4j
-@Aspect
-@Order(0)
-@RequiredArgsConstructor
-public class OperationLogAspect {
- private final ApplicationEventPublisher publisher;
-
- @Around("@annotation(operationLogging)")
- public Object around(ProceedingJoinPoint joinPoint, OperationLogging operationLogging) throws Throwable {
- Signature signature = joinPoint.getSignature();
- String strClassName = joinPoint.getTarget().getClass().getName();
- String strMethodName = signature.getName();
- log.debug("[类名]:{},[方法]:{}", strClassName, strMethodName);
-
- // 获取日志
- OperationLogDTO operationLogDTO = prodOperationLog();
- operationLogDTO.setMsg(operationLogging.value());
- // 记录参数
- MethodSignature methodSignature = (MethodSignature) signature;
- operationLogDTO.setParams(getParams(joinPoint, methodSignature));
- // 开始时间
- long startTime = System.currentTimeMillis();
- Object result;
- try {
- result = joinPoint.proceed();
- } catch (Throwable throwable) {
- operationLogDTO.setStatus(LogStatus.FAIL.getValue());
- throw throwable;
- }
- // 结束时间
- operationLogDTO.setResponseTime((int) (System.currentTimeMillis() - startTime));
- // 发布事件
- publisher.publishEvent(new OperationLogEvent(operationLogDTO));
-
- return result;
- }
-
-
- /**
- * 获取方法参数
- * @param joinPoint joinPoint
- * @param methodSignature 方法签名
- * @return 方法参数的Json字符串形式
- */
- private String getParams(ProceedingJoinPoint joinPoint, MethodSignature methodSignature) {
- String[] parameterNames = methodSignature.getParameterNames();
- Object[] args = joinPoint.getArgs();
- if(ArrayUtil.isEmpty(parameterNames)){
- return null;
- }
- Map paramsMap = new HashMap<>();
- for (int i = 0; i < parameterNames.length; i++) {
- paramsMap.put(parameterNames[i], args[i]);
- }
- return JSONUtil.toJsonStr(paramsMap);
- }
-
-
- /**
- * 根据请求生成操作日志
- * @return 操作日志DTO
- */
- private OperationLogDTO prodOperationLog() {
- HttpServletRequest request = ((ServletRequestAttributes) Objects
- .requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
-
- return new OperationLogDTO()
- .setTraceId(MallUtils.getTraceId())
- .setUri(URLUtil.getPath(request.getRequestURI()))
- .setUserAgent(HttpUtil.getUserAgent(request))
- .setIp(HttpUtil.getIp(request))
- .setMethod(request.getMethod())
- // TODO 获取管理员用户名 或者 用户ID
- // .setOperator(Objects.requireNonNull(LogUtils.getUsername()))
- .setStatus(LogStatus.SUCCESS.getValue());
- }
-
-
-
-
-
-
-
-
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/enums/LogStatus.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/enums/LogStatus.java
deleted file mode 100644
index c6a6ae5d9..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/enums/LogStatus.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package cn.iocoder.mall.system.biz.log.operation.enums;
-
-/**
- * @author Hccake
- * @version 1.0
- * @date 2020/5/15 14:47
- */
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * 操作状态
- */
-@Getter
-@AllArgsConstructor
-public enum LogStatus {
- /**
- * 成功
- */
- SUCCESS(1),
- /**
- * 失败
- */
- FAIL(0);
-
- private final int value;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/event/OperationLogEvent.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/event/OperationLogEvent.java
deleted file mode 100644
index 40051f3a6..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/event/OperationLogEvent.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cn.iocoder.mall.system.biz.log.operation.event;
-
-import cn.iocoder.mall.system.biz.log.operation.model.dto.OperationLogDTO;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * @author
- * 系统日志事件
- */
-@Getter
-@AllArgsConstructor
-public class OperationLogEvent {
- private final OperationLogDTO operationLogDTO;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/event/OperationLogListener.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/event/OperationLogListener.java
deleted file mode 100644
index 2a41ef616..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/event/OperationLogListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package cn.iocoder.mall.system.biz.log.operation.event;
-
-import cn.iocoder.mall.system.biz.log.operation.service.OperationLogSaveService;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.event.EventListener;
-import org.springframework.core.annotation.Order;
-import org.springframework.scheduling.annotation.Async;
-
-/**
- * @author
- * 异步监听日志事件
- */
-@Slf4j
-public class OperationLogListener {
-
- @Autowired
- private OperationLogSaveService operationLogSaveService;
-
- @Async
- @Order
- @EventListener(OperationLogEvent.class)
- public void saveSysLog(OperationLogEvent event) {
- operationLogSaveService.saveLog(event.getOperationLogDTO());
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/model/dto/OperationLogDTO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/model/dto/OperationLogDTO.java
deleted file mode 100644
index dd675d12c..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/model/dto/OperationLogDTO.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package cn.iocoder.mall.system.biz.log.operation.model.dto;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.time.LocalDateTime;
-
-/**
- * 操作日志
- *
- * @author hccake
- * @date 2020-05-15 15:12:53
- */
-@Data
-@Accessors(chain = true)
-@ApiModel(value = "操作日志")
-public class OperationLogDTO{
- private static final long serialVersionUID = 1L;
-
- /**
- * 链路追踪编号
- */
- @ApiModelProperty(value = "链路追踪编号")
- private String traceId;
- /**
- * 账号编号
- */
- @ApiModelProperty(value = "账号编号")
- private Integer accountId;
- /**
- * 应用名
- */
- @ApiModelProperty(value = "应用名")
- private String applicationName;
- /**
- * 访问地址
- */
- @ApiModelProperty(value = "访问地址")
- private String uri;
- /**
- * 参数
- */
- @ApiModelProperty(value = "参数")
- private String params;
- /**
- * http 方法
- */
- @ApiModelProperty(value = "http 方法")
- private String method;
- /**
- * userAgent
- */
- @ApiModelProperty(value = "userAgent")
- private String userAgent;
- /**
- * ip
- */
- @ApiModelProperty(value = "ip")
- private String ip;
- /**
- * 请求时间
- */
- @ApiModelProperty(value = "请求时间")
- private LocalDateTime startTime;
- /**
- * 响应时长 -- 毫秒级
- */
- @ApiModelProperty(value = "响应时长 -- 毫秒级")
- private Integer responseTime;
- /**
- * 日志消息
- */
- @ApiModelProperty(value = "日志消息")
- private String msg;
- /**
- * 操作状态
- */
- @ApiModelProperty(value = "操作状态")
- private Integer status;
- /**
- * 创建者
- */
- @ApiModelProperty(value = "创建者")
- private String operator;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/model/po/OperationLogPO.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/model/po/OperationLogPO.java
deleted file mode 100644
index a6e348630..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/model/po/OperationLogPO.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package cn.iocoder.mall.system.biz.log.operation.model.po;
-
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.time.LocalDateTime;
-
-/**
- * 操作日志
- *
- * @author hccake
- * @date 2020-05-15 15:12:53
- */
-@Data
-@TableName("operation_log")
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "操作日志")
-public class OperationLogPO extends Model {
- private static final long serialVersionUID = 1L;
-
- /**
- * 编号
- */
- @TableId
- private Integer id;
- /**
- * 链路追踪编号
- */
- private String traceId;
- /**
- * 账号编号
- */
- private Integer accountId;
- /**
- * 应用名
- */
- private String applicationName;
- /**
- * 访问地址
- */
- private String uri;
- /**
- * 参数
- */
- private String params;
- /**
- * http 方法
- */
- private String method;
- /**
- * userAgent
- */
- private String userAgent;
- /**
- * ip
- */
- private String ip;
- /**
- * 请求时间
- */
- private LocalDateTime startTime;
- /**
- * 响应时长 -- 毫秒级
- */
- private Integer responseTime;
- /**
- * 日志消息
- */
- private String msg;
- /**
- * 操作状态
- */
- private Integer status;
- /**
- * 创建者
- */
- private String operator;
- /**
- * 创建时间
- */
- @TableField(fill = FieldFill.INSERT)
- private LocalDateTime createTime;
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/service/OperationLogSaveService.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/service/OperationLogSaveService.java
deleted file mode 100644
index 159d85691..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/log/operation/service/OperationLogSaveService.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cn.iocoder.mall.system.biz.log.operation.service;
-
-
-import cn.iocoder.mall.system.biz.log.operation.model.dto.OperationLogDTO;
-
-/**
- * 操作日志业务类
- * @author Hccake
- * @version 1.0
- * @date 2019/10/15 19:57
- */
-public interface OperationLogSaveService {
-
- /**
- * 保存操作日志
- * @param operationLogDTO
- * @return true/false
- */
- boolean saveLog(OperationLogDTO operationLogDTO);
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/AliYunSmsClient.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/AliYunSmsClient.java
deleted file mode 100644
index 81a932cbc..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/AliYunSmsClient.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package cn.iocoder.mall.system.biz.service.sms;
-
-import com.alibaba.fastjson.JSON;
-import com.aliyuncs.CommonRequest;
-import com.aliyuncs.CommonResponse;
-import com.aliyuncs.DefaultAcsClient;
-import com.aliyuncs.IAcsClient;
-import com.aliyuncs.exceptions.ClientException;
-import com.aliyuncs.http.MethodType;
-import com.aliyuncs.profile.DefaultProfile;
-import lombok.Data;
-import lombok.experimental.Accessors;
-import org.apache.commons.lang3.exception.ExceptionUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 短信 AliYun client
- *
- * @author Sin
- * @time 2019/5/25 12:28 PM
- */
-@Component // TODO DOME FROM 芋艿 to 小范:建议类名改成 AliYunSmsClient
-public class AliYunSmsClient implements SmsClient {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(AliYunSmsClient.class);
-
- private static final String DOMAIN = "dysmsapi.aliyuncs.com";
- private static final String SUCCESS_CODE = "OK";
- private static final String SUCCESS_MESSAGE = "OK";
- /**
- * 阿里云短信 - 批量推送最大数 500,支持 1000
- */
- private static final int MAX_BATCH_SIZE = 500;
-
- @Value("${sms.aliYun.accessKeyId?:'default_value'}")
- private String accessKeyId;
- @Value("${sms.aliYun.accessSecret?:'default_value'}")
- private String accessSecret;
-
- @Data
- @Accessors(chain = true)
- public static class Result {
- /**
- * 发送回执ID,可根据该ID在接口QuerySendDetails中查询具体的发送状态。
- */
- private String BizId;
- /**
- * 请求状态码。
- *
- * - OK 蔡成功
- */
- private String Code;
- /**
- * 状态码的描述。
- */
- private String Message;
- /**
- * 请求ID。
- */
- private String RequestId;
- }
-
- @Override
- public SendResult singleSend(String mobile, String sign, String templateCode,
- String template, Map templateParams) {
- // params
- CommonRequest request = new CommonRequest();
- request.setMethod(MethodType.POST);
- request.setDomain(DOMAIN);
- request.setVersion("2017-05-25");
- request.setAction("SendSms");
- request.putQueryParameter("PhoneNumbers", mobile);
- request.putQueryParameter("SignName", sign);
- request.putQueryParameter("TemplateCode", templateCode);
- request.putQueryParameter("TemplateParam", JSON.toJSONString(templateParams));
- // 发送请求
- return doSend(request);
- }
-
- @Override
- public SendResult batchSend(List mobileList, String sign, String templateCode,
- String template, Map templateParams) {
- // 最大发送数为 1000,我们设置为 500 个, 分段发送
- int maxSendSize = MAX_BATCH_SIZE;
- int maxSendSizeCount = mobileList.size() % maxSendSize == 0
- ? mobileList.size() / maxSendSize
- : mobileList.size() / maxSendSize + 1;
- // 处理批量
- SendResult sendResult = null;
- for (int i = 0; i < maxSendSizeCount; i++) {
- // 分批发送
- List batchSendMobile = mobileList
- .subList(i * maxSendSize, (i + 1) * maxSendSize);
- // params
- CommonRequest request = new CommonRequest();
- request.setMethod(MethodType.POST);
- request.setDomain(DOMAIN);
- request.setVersion("2017-05-25");
- request.setAction("SendBatchSms");
- request.putQueryParameter("PhoneNumberJson", JSON.toJSONString(batchSendMobile));
- request.putQueryParameter("SignNameJson", JSON.toJSONString(Collections.singletonList(sign)));
- request.putQueryParameter("TemplateCode", templateCode);
- request.putQueryParameter("TemplateParamJson", JSON.toJSONString(Collections.singletonList(templateParams)));
- // 发送请求
- sendResult = doSend(request);
- }
- return sendResult;
- }
-
- private SendResult doSend(CommonRequest request) {
- // 获取 client
- IAcsClient client = getClient();
- try {
- CommonResponse response = client.getCommonResponse(request);
- Result result = JSON.parseObject(response.getData(), Result.class);
- if (!SUCCESS_CODE.equals(result.getCode())) {
- LOGGER.info("发送验证码失败 params {} res {}", JSON.toJSON(request), JSON.toJSON(result));
- // 错误发送失败
- return new SendResult()
- .setIsSuccess(false)
- .setCode(SendResult.ERROR_CODE)
- .setMessage(result.getMessage());
- } else {
- LOGGER.info("发送验证码失败 params {} res", JSON.toJSON(request), JSON.toJSON(result));
- // 发送成功
- return new SendResult()
- .setIsSuccess(true)
- .setCode(SendResult.SUCCESS_CODE)
- .setMessage(result.getMessage());
- }
- } catch (ClientException e) {
- LOGGER.error("发送验证码异常 {}", ExceptionUtils.getMessage(e));
- return new SendResult()
- .setIsSuccess(false)
- .setCode(SendResult.ERROR_CODE)
- .setMessage(ExceptionUtils.getMessage(e));
- }
- }
-
- /**
- * 获取 client
- *
- * @return
- */
- private IAcsClient getClient() {
- return new DefaultAcsClient(DefaultProfile.getProfile("default", accessKeyId, accessSecret));
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/SmsClient.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/SmsClient.java
deleted file mode 100644
index bb1eecaab..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/SmsClient.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package cn.iocoder.mall.system.biz.service.sms;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 短信平台
- *
- * @author Sin
- * @time 2019/5/16 6:33 PM
- */
-public interface SmsClient {
-
- /**
- * 短信发送 - 单个
- *
- * @param mobile 手机号
- * @param sign 签名
- * @param templateCode 短信模板code
- * @param template 短信模板
- * @param templateParams 短信模板 params
- * @return 发送后信息
- */
- SendResult singleSend(String mobile, String sign, String templateCode,
- String template, Map templateParams);
-
- /**
- * 短信发送 - 批量
- *
- * @param mobileList 手机号
- * @param sign 签名
- * @param templateCode 短信模板 code
- * @param template 短信模板
- * @param templateParams 短信模板params
- * @return 发送后信息
- */
- SendResult batchSend(List mobileList, String sign, String templateCode,
- String template, Map templateParams);
-
- @Data
- @Accessors(chain = true)
- class SendResult {
-
- public static final int SUCCESS_CODE = 0;
- public static final int ERROR_CODE = 1;
- public static final String SUCCESS_MESSAGE = "SUCCESS";
-
- /**
- * 错误码
- */
- private Integer code;
- /**
- * 错误信息
- */
- private String message;
- /**
- * 是否成功
- */
- private Boolean isSuccess;
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/SmsService.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/SmsService.java
deleted file mode 100644
index 69c3f698e..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/SmsService.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package cn.iocoder.mall.system.biz.service.sms;
-
-import cn.iocoder.common.framework.vo.PageResult;
-import cn.iocoder.mall.system.biz.bo.smsSign.ListSmsSignBO;
-import cn.iocoder.mall.system.biz.bo.smsTemplate.ListSmsTemplateBO;
-import cn.iocoder.mall.system.biz.bo.smsSign.SmsSignBO;
-import cn.iocoder.mall.system.biz.bo.smsTemplate.SmsTemplateBO;
-import cn.iocoder.mall.system.biz.dto.smsSign.AddSignDTO;
-import cn.iocoder.mall.system.biz.dto.smsSign.ListSmsSignDTO;
-import cn.iocoder.mall.system.biz.dto.smsTemplate.ListSmsTemplateDTO;
-import cn.iocoder.mall.system.biz.dto.smsSign.UpdateSignDTO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 短信服务
- *
- * @author Sin
- * @time 2019/5/16 9:54 AM
- */
-public interface SmsService {
-
- /**
- * 短信模板 - 分页
- *
- * @param listSmsSignDTO
- * @return
- */
- PageResult listSmsSign(ListSmsSignDTO listSmsSignDTO);
-
- /**
- * 短信模板 - 分页
- *
- * @param listSmsTemplateDTO
- * @return
- */
- PageResult listSmsTemplate(ListSmsTemplateDTO listSmsTemplateDTO);
-
- /**
- * 签名 - 创建
- *
- * @param addSignDTO
- */
- void addSign(AddSignDTO addSignDTO);
-
- /**
- * 签名 - 获取
- *
- * @param id
- */
- SmsSignBO getSign(Integer id);
-
- /**
- * 签名 - 更新
- *
- * @param updateSignDTO
- */
- void updateSign(UpdateSignDTO updateSignDTO);
-
- /**
- * 签名 - 更新
- *
- * @param id
- */
- void deleteSign(Integer id);
-
- /**
- * 模板 - 创建
- *
- * @param smsSignId 选用的哪个签名
- * @param templateCode 模板code
- * @param template 模板内容
- * @param platform 平台
- */
- void addTemplate(Integer smsSignId, String templateCode,
- String template, Integer platform, Integer smsType);
-
- /**
- * 模板 - 获取
- *
- * @param id
- */
- SmsTemplateBO getTemplate(Integer id, Integer platform);
-
- /**
- * 模板 - 更新
- *
- * @param id 模板id
- * @param smsSignId 短期签名
- * @param template 模板内容
- * @param platform 短信平台
- */
- void updateTemplate(Integer id, Integer smsSignId, String templateCode,
- String template, Integer platform, Integer smsType);
-
- /**
- * 模板 - 删除
- *
- * @param id
- */
- void deleteTemplate(Integer id);
-
- /**
- * 短信发送 - 单个
- *
- * @return
- */
- void singleSend(String mobile, Integer smsTemplateId, Map params);
-
- /**
- * 短信发送 - 批量
- *
- * @return
- */
- void batchSend(List mobileList, Integer smsTemplateId, Map params);
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/SmsServiceImpl.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/SmsServiceImpl.java
deleted file mode 100644
index 56cddb602..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/SmsServiceImpl.java
+++ /dev/null
@@ -1,364 +0,0 @@
-package cn.iocoder.mall.system.biz.service.sms;
-
-import cn.iocoder.common.framework.exception.ServiceException;
-import cn.iocoder.common.framework.util.ServiceExceptionUtil;
-import cn.iocoder.common.framework.vo.PageResult;
-import cn.iocoder.mall.mybatis.core.enums.DeletedStatusEnum;
-import cn.iocoder.mall.system.biz.bo.smsSign.ListSmsSignBO;
-import cn.iocoder.mall.system.biz.bo.smsSign.SmsSignBO;
-import cn.iocoder.mall.system.biz.bo.smsTemplate.ListSmsTemplateBO;
-import cn.iocoder.mall.system.biz.bo.smsTemplate.SmsTemplateBO;
-import cn.iocoder.mall.system.biz.convert.SmsSignConvert;
-import cn.iocoder.mall.system.biz.convert.SmsTemplateConvert;
-import cn.iocoder.mall.system.biz.dao.sms.SmsSendMapper;
-import cn.iocoder.mall.system.biz.dao.sms.SmsSignMapper;
-import cn.iocoder.mall.system.biz.dao.sms.SmsTemplateMapper;
-import cn.iocoder.mall.system.biz.dataobject.sms.SmsSendLogDO;
-import cn.iocoder.mall.system.biz.dataobject.sms.SmsSignDO;
-import cn.iocoder.mall.system.biz.dataobject.sms.SmsTemplateDO;
-import cn.iocoder.mall.system.biz.dto.smsSign.AddSignDTO;
-import cn.iocoder.mall.system.biz.dto.smsSign.ListSmsSignDTO;
-import cn.iocoder.mall.system.biz.dto.smsSign.UpdateSignDTO;
-import cn.iocoder.mall.system.biz.dto.smsTemplate.ListSmsTemplateDTO;
-import cn.iocoder.mall.system.biz.enums.SystemErrorCodeEnum;
-import cn.iocoder.mall.system.biz.enums.sms.SmsApplyStatusEnum;
-import cn.iocoder.mall.system.biz.enums.sms.SmsPlatformEnum;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * 短信
- *
- * @author Sin
- * @time 2019/5/16 10:30 AM
- */
-@Service
-public class SmsServiceImpl implements SmsService {
-
- @Autowired
- private SmsSignMapper smsSignMapper;
- @Autowired
- private SmsTemplateMapper smsTemplateMapper;
- @Autowired
- private SmsSendMapper smsSendMapper;
-
- @Autowired
- @Qualifier("yunPianSmsClient")
- private SmsClient smsYunPianClient;
- @Autowired
- @Qualifier("aliYunSmsClient")
- private SmsClient smsAliYunClient;
-
- @Override
- public PageResult listSmsSign(ListSmsSignDTO queryDTO) {
- // TODO DOME FROM 芋艿 to 小范:mybatis-plus 的 QueryWrapper 不要到 Service 层,可以抽 Dao 方法里哈。其它的类似可以瞅瞅噢
- IPage signPage = smsSignMapper.listSmsSign(queryDTO);
- List signList = SmsSignConvert.INSTANCE.convert(signPage.getRecords());
- return new PageResult().setList(signList).setTotal(signPage.getTotal());
- }
-
- @Override
- public PageResult listSmsTemplate(ListSmsTemplateDTO listSmsTemplateDTO) {
- // 获取 template
- IPage signPage = smsTemplateMapper.listSmsTemplate(listSmsTemplateDTO);
- if (CollectionUtils.isEmpty(signPage.getRecords())) {
- // TODO DOME FROM 芋艿 to 小范,Collections.EMPTY_LIST =》Collections.emptyList();另外,可以考虑直接 Convert 哈
- return new PageResult().setList(Collections.emptyList()).setTotal(signPage.getTotal());
- }
- // 转换bo
- List templateList = SmsTemplateConvert.INSTANCE.convert(signPage.getRecords());
- // 获取 sign
- Set smsSignIds = templateList.stream().map(
- ListSmsTemplateBO::getSmsSignId).collect(Collectors.toSet());
-
- List smsSignDOList = smsSignMapper.selectList(
- new QueryWrapper().in("id", smsSignIds));
-
- List signList = SmsTemplateConvert.INSTANCE.convertTemplateSign(smsSignDOList);
- // sign 转换为 map
- Map smsSignDOMap = signList
- .stream().collect(Collectors.toMap(ListSmsTemplateBO.Sign::getId, o -> o));
- // 设置 sign
- templateList.forEach(template -> {
- if (smsSignDOMap.containsKey(template.getSmsSignId())) {
- template.setSign(smsSignDOMap.get(template.getSmsSignId()));
- }
- });
- return new PageResult().setList(templateList).setTotal(signPage.getTotal());
- }
-
- @Override
- @Transactional
- public void addSign(AddSignDTO addSignDTO) {
- // 避免重复
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper()
- .eq("platform", addSignDTO.getPlatform())
- .eq("sign", addSignDTO.getSign())
- );
- // 处理 null 情况
- if (smsSignDO != null) {
- // TODO DOME FROM 芋艿 to 小范:可以使用 ServiceExceptionUtil.exception(SystemErrorCodeEnum.SMS_SIGN_IS_EXISTENT);
- throw ServiceExceptionUtil.exception(SystemErrorCodeEnum.SMS_SIGN_IS_EXISTENT);
- }
- // 保存数据库
- smsSignMapper.insert(
- (SmsSignDO) new SmsSignDO()
- .setSign(addSignDTO.getSign())
- .setPlatform(addSignDTO.getPlatform())
- .setApplyStatus(SmsApplyStatusEnum.SUCCESS.getValue())
- .setDeleted(DeletedStatusEnum.DELETED_NO.getValue())
- .setUpdateTime(new Date())
- .setCreateTime(new Date())
- );
- }
-
- @Override
- public SmsSignBO getSign(Integer signId) {
- // 查询数据库
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper()
- .eq("id", signId)
- .eq("deleted", DeletedStatusEnum.DELETED_NO.getValue()));
- // 处理 null
- if (smsSignDO == null) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
- // 转换vo返回
- return SmsSignConvert.INSTANCE.convert(smsSignDO);
- }
-
- @Override
- @Transactional
- public void updateSign(UpdateSignDTO updateSignDTO) {
- // 避免重复
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper()
- .eq("sign", updateSignDTO.getSign())
- .eq("platform", updateSignDTO.getPlatform()));
- // 处理 null
- if (smsSignDO != null) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getMessage());
- }
- // 更新
- smsSignMapper.update(
- (SmsSignDO) new SmsSignDO()
- .setSign(updateSignDTO.getSign())
- .setPlatform(updateSignDTO.getPlatform())
- .setUpdateTime(new Date()),
- new QueryWrapper().eq("id", updateSignDTO.getId())
- );
- }
-
- @Override
- public void deleteSign(Integer id) {
- // 根据id查询
- SmsSignDO smsSignDO = smsSignMapper.selectById(id);
- // 处理 null
- if (smsSignDO == null) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
- // 更新 deleted 为 YES
- smsSignMapper.delete(new UpdateWrapper()
- .set("deleted", DeletedStatusEnum.DELETED_YES.getName())
- .eq("id", id)
- );
- }
-
- @Override
- @Transactional
- public void addTemplate(Integer smsSignId, String templateCode,
- String template, Integer platform, Integer smsType) {
- // 根据id查询
- SmsSignDO smsSignDO = smsSignMapper.selectById(smsSignId);
- // 处理 null
- if (smsSignDO == null) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
- // 保存数据库
- smsTemplateMapper.insert(
- (SmsTemplateDO) new SmsTemplateDO()
- .setId(null)
- .setSmsSignId(smsSignId)
- .setTemplateCode(templateCode)
- .setTemplate(template)
- .setPlatform(platform)
- .setSmsType(smsType)
- .setApplyStatus(SmsApplyStatusEnum.SUCCESS.getValue())
- .setApplyMessage("")
- .setDeleted(DeletedStatusEnum.DELETED_NO.getValue())
- .setCreateTime(new Date())
- );
- }
-
- @Override
- public SmsTemplateBO getTemplate(Integer id, Integer platform) {
- // 获取数据
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectOne(
- new QueryWrapper()
- .eq("platform", platform)
- .eq("id", id));
- // 处理 null
- if (smsTemplateDO == null) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
- // 转换bo返回
- return SmsTemplateConvert.INSTANCE.convert(smsTemplateDO);
- }
-
- @Override
- @Transactional
- public void updateTemplate(Integer id, Integer smsSignId, String templateCode,
- String template, Integer platform, Integer smsType) {
- // 获取 template
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectById(id);
- if (smsTemplateDO == null) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
- // 获取 sign
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper().eq("id", smsTemplateDO.getSmsSignId()));
- if (smsSignDO == null) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
- // 更新数据库
- smsTemplateMapper.update(
- (SmsTemplateDO) new SmsTemplateDO()
- .setSmsSignId(smsSignId)
- .setTemplateCode(templateCode)
- .setTemplate(template)
- .setPlatform(platform)
- .setSmsType(smsType)
- .setUpdateTime(new Date()),
- new QueryWrapper().eq("id", id)
- );
- }
-
- @Override
- @Transactional
- public void deleteTemplate(Integer id) {
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectOne(
- new QueryWrapper().eq("id", id));
- // 处理不存在情况
- if (smsTemplateDO == null
- || smsTemplateDO.getDeleted().equals(DeletedStatusEnum.DELETED_YES.getValue())) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
- // 删除 数据库模板
- SmsTemplateDO updateTemplate =new SmsTemplateDO();
- updateTemplate.setDeleted(DeletedStatusEnum.DELETED_YES.getValue());
- smsTemplateMapper.delete(
- new UpdateWrapper()
- .set("deleted", DeletedStatusEnum.DELETED_YES)
- .eq("id", id));
- }
-
- @Override
- public void singleSend(String mobile, Integer smsTemplateId, Map params) {
- // 获取 template
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectById(smsTemplateId);
- if (smsTemplateDO == null
- || smsTemplateDO.getDeleted().equals(DeletedStatusEnum.DELETED_YES.getValue())) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
- // 获取 sign
- SmsSignDO smsSignDO = smsSignMapper.selectById(smsTemplateDO.getSmsSignId());
- if (smsSignDO == null) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
- // 获取 client
- SmsClient smsClient = getSmsClient(smsTemplateDO.getPlatform());
- // 发送短信
- SmsClient.SendResult sendResult = smsClient.singleSend(mobile, smsSignDO.getSign(),
- smsTemplateDO.getTemplateCode(), smsTemplateDO.getTemplate(), params);
- // 添加日志
- smsSendMapper.insert(
- (SmsSendLogDO) new SmsSendLogDO()
- .setTemplateId(smsTemplateDO.getId())
- .setTemplate(smsTemplateDO.getTemplate())
- .setMessage(sendResult.getMessage())
- .setCreateTime(new Date())
- );
- }
-
- @Override
- public void batchSend(List mobileList, Integer smsTemplateId, Map params) {
- // 获取 template
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectById(smsTemplateId);
- if (smsTemplateDO == null
- || smsTemplateDO.getDeleted().equals(DeletedStatusEnum.DELETED_YES.getValue())) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
- // 获取 sign
- SmsSignDO smsSignDO = smsSignMapper.selectById(smsTemplateDO.getSmsSignId());
- if (smsSignDO == null) {
- // 添加日志
- smsSendMapper.insert(
- (SmsSendLogDO) new SmsSendLogDO()
- .setTemplateId(smsTemplateDO.getId())
- .setTemplate(smsTemplateDO.getTemplate())
- .setMessage("发送成功!")
- .setCreateTime(new Date())
- );
-
- throw new ServiceException(SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- SystemErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
- // 获取 client
- SmsClient smsClient = getSmsClient(smsTemplateDO.getPlatform());
- // 发送短信
- SmsClient.SendResult sendResult = smsClient.batchSend(mobileList, smsSignDO.getSign(),
- smsTemplateDO.getTemplateCode(), smsTemplateDO.getTemplate(), params);
- // 添加日志
- smsSendMapper.insert(
- (SmsSendLogDO) new SmsSendLogDO()
- .setTemplateId(smsTemplateDO.getId())
- .setTemplate(smsTemplateDO.getTemplate())
- .setMessage(sendResult.getMessage())
- .setCreateTime(new Date())
- );
- }
-
- /**
- * 获取 sms 对于的 client
- *
- * @param platform
- * @return
- */
- private SmsClient getSmsClient(Integer platform) {
- SmsClient smsClient = null;
- // 阿里云和云片
- if (SmsPlatformEnum.YunPian.getValue().equals(platform)) {
- smsClient = smsYunPianClient;
- } else if (SmsPlatformEnum.AliYun.getValue().equals(platform)) {
- smsClient = smsAliYunClient;
- }
- // 没有支持的平台
- if (smsClient == null) {
- throw new ServiceException(
- SystemErrorCodeEnum.SMS_NOT_SEND_CLIENT.getCode(),
- SystemErrorCodeEnum.SMS_NOT_SEND_CLIENT.getMessage());
- }
- return smsClient;
- }
-}
diff --git a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/YunPianSmsClient.java b/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/YunPianSmsClient.java
deleted file mode 100644
index 749264bb2..000000000
--- a/归档/moved/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/sms/YunPianSmsClient.java
+++ /dev/null
@@ -1,232 +0,0 @@
-package cn.iocoder.mall.system.biz.service.sms;
-
-import cn.iocoder.common.framework.exception.ServiceException;
-import cn.iocoder.mall.system.biz.enums.SystemErrorCodeEnum;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import org.apache.http.HttpEntity;
-import org.apache.http.NameValuePair;
-import org.apache.http.client.entity.UrlEncodedFormEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.message.BasicNameValuePair;
-import org.apache.http.util.EntityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-import org.springframework.util.CollectionUtils;
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 云片 短信平台
- *
- * @author Sin
- * @time 2019/5/16 6:34 PM
- */
-@Component
-public class YunPianSmsClient implements SmsClient {
-
- protected static final Logger LOGGER = LoggerFactory.getLogger(YunPianSmsClient.class);
-
- private static final int SUCCESS_CODE = 0;
- private static final String SUCCESS_MESSAGE = "SUCCESS";
-
- /**
- * 云片短信 - 批量推送最大数 500,支持 1000
- */
- private static final int MAX_BATCH_SIZE = 500;
- /**
- * 模板 - 参数拼接
- */
- private static final String PARAM_TEMPLATE = "#%s#";
- /**
- * 模板 - 签名拼接
- */
- private static final String SIGN_TEMPLATE = "【%s】%s";
-
- /**
- * 签名 - 添加
- */
- private static final String URL_SIGN_ADD = "https://sms.yunpian.com/v2/sign/add.json";
- /**
- * 签名 - 获取
- */
- private static final String URL_SIGN_GET = "https://sms.yunpian.com/v2/sign/get.json";
- /**
- * 签名 - 更新
- */
- private static final String URL_SIGN_UPDATE = "https://sms.yunpian.com/v2/sign/update.json";
- /**
- * 模板 - 添加
- */
- private static final String URL_TEMPLATE_ADD = "https://sms.yunpian.com/v2/tpl/add.json";
- /**
- * 模板 - 获取
- */
- private static final String URL_TEMPLATE_GET = "https://sms.yunpian.com/v2/tpl/get.json";
- /**
- * 模板 - 更新
- */
- private static final String URL_TEMPLATE_UPDATE = "https://sms.yunpian.com/v2/tpl/update.json";
- /**
- * 模板 - 删除
- */
- private static final String URL_TEMPLATE_DELETE = "https://sms.yunpian.com/v2/tpl/del.json";
- /**
- * 短信发送 - 单个
- */
- private static final String URL_SEND_SINGLE = "https://sms.yunpian.com/v2/sms/single_send.json";
- /**
- * 短信发送 - 批量
- */
- private static final String URL_SEND_BATCH = "https://sms.yunpian.com/v2/sms/batch_send.json";
-
- //编码格式。发送编码格式统一用UTF-8
- private static String ENCODING = "UTF-8";
-
- @Value("${sms.yunPian.apiKey?:'default_value'}")
- private String apiKey;
-
- @Override
- public SendResult singleSend(String mobile, String sign, String templateCode, String template, Map templateParams) {
- // build 模板
- template = buildTemplate(sign, template, templateParams);
- // 请求参数
- Map params = new LinkedHashMap<>();
- params.put("apikey", apiKey);
- params.put("mobile", mobile);
- params.put("text", template);
- // TODO: 2019/5/19 sin 运营商发送报告 回调
- // params.put("callback_url", template);
- String result = post(URL_SEND_SINGLE, params);
- JSONObject jsonObject = JSON.parseObject(result);
- if (jsonObject.containsKey("code")
- && !(jsonObject.getInteger("code") == SUCCESS_CODE)) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_PLATFORM_FAIL.getCode(),
- jsonObject.getString("detail"));
- }
- // 转换 result
- return new SendResult()
- .setIsSuccess(SUCCESS_CODE == jsonObject.getInteger("code"))
- .setCode(jsonObject.getInteger("code"))
- .setMessage(jsonObject.getString("detail"));
- }
-
- @Override
- public SendResult batchSend(List mobileList, String sign,
- String templateCode, String template,
- Map templateParams) {
- // build 模板
- template = buildTemplate(sign, template, templateParams);
- // 最大发送数为 1000,我们设置为 500 个, 分段发送
- int maxSendSize = MAX_BATCH_SIZE;
- int maxSendSizeCount = mobileList.size() % maxSendSize == 0
- ? mobileList.size() / maxSendSize
- : mobileList.size() / maxSendSize + 1;
- int j = 0;
- int j2 = mobileList.size();
-
- for (int i = 0; i < maxSendSizeCount; i++) {
- StringBuffer sendMobileStr = new StringBuffer();
- for (int k = j; k < j2; k++) {
- sendMobileStr.append(",");
- sendMobileStr.append(mobileList.get(k));
- }
- String dividedMobile = sendMobileStr.toString().substring(1);
- // 发送手机号
- Map params = new LinkedHashMap<>();
- params.put("apikey", apiKey);
- params.put("mobile", dividedMobile);
- params.put("text", template);
- // TODO: 2019/5/19 sin 运营商发送报告 回调
- // params.put("callback_url", template);
- String result = post(URL_SEND_BATCH, params);
- JSONObject jsonObject = JSON.parseObject(result);
- if (jsonObject.containsKey("code")
- && !(jsonObject.getInteger("code") == SUCCESS_CODE)) {
- throw new ServiceException(SystemErrorCodeEnum.SMS_PLATFORM_FAIL.getCode(),
- jsonObject.getString("detail"));
- }
- // 用于递增 maxSendSize
- j = j2;
- j2 = j + maxSendSize;
- }
- return new SendResult()
- .setIsSuccess(true)
- .setCode(SUCCESS_CODE)
- .setMessage(SUCCESS_MESSAGE);
- }
-
- /**
- * 构建模板
- *
- * @param sign
- * @param template
- * @param templateParams
- * @return
- */
- private static String buildTemplate(String sign, String template,
- Map templateParams) {
- // 不处理 empty 数据
- if (CollectionUtils.isEmpty(templateParams)) {
- return template;
- }
- // 处理template参数
- for (Map.Entry entry : templateParams.entrySet()) {
- String paramsKey = entry.getKey();
- String value = entry.getValue();
- String paramPlace = String.format(PARAM_TEMPLATE, paramsKey);
- template = template.replaceAll(paramPlace, value);
- }
- template = String.format(SIGN_TEMPLATE, sign, template);
- return template;
- }
-
- /**
- * 基于HttpClient 4.3的通用POST方法
- *
- * @param url 提交的URL
- * @param paramsMap 提交<参数,值>Map
- * @return 提交响应
- */
-
- public static String post(String url, Map paramsMap) {
- CloseableHttpClient client = HttpClients.createDefault();
- String responseText = "";
- CloseableHttpResponse response = null;
- try {
- HttpPost method = new HttpPost(url);
- if (paramsMap != null) {
- List paramList = new ArrayList<>();
- for (Map.Entry param : paramsMap.entrySet()) {
- NameValuePair pair = new BasicNameValuePair(param.getKey(),
- param.getValue());
- paramList.add(pair);
- }
- method.setEntity(new UrlEncodedFormEntity(paramList, ENCODING));
- }
- response = client.execute(method);
- HttpEntity entity = response.getEntity();
- if (entity != null) {
- responseText = EntityUtils.toString(entity, ENCODING);
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- response.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- LOGGER.debug("云片短信平台 res: {}", responseText);
- return responseText;
- }
-}
diff --git a/归档/moved/system/system-rest/pom.xml b/归档/moved/system/system-rest/pom.xml
deleted file mode 100644
index 9e232f904..000000000
--- a/归档/moved/system/system-rest/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
- system
- cn.iocoder.mall
- 1.0-SNAPSHOT
-
- 4.0.0
-
- system-rest
- 提供 system 服务的 Rest 接口的实现,提供对外调用
-
-
-
-
- cn.iocoder.mall
- system-biz
- 1.0-SNAPSHOT
-
-
-
-
- cn.iocoder.mall
- mall-spring-boot-starter-web
- 1.0-SNAPSHOT
-
-
- cn.iocoder.mall
- mall-spring-boot-starter-security
- 1.0-SNAPSHOT
-
-
- cn.iocoder.mall
- mall-spring-boot-starter-swagger
- 1.0-SNAPSHOT
-
-
-
-
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/file/AdminsFileController.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/file/AdminsFileController.java
deleted file mode 100644
index 63709079c..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/file/AdminsFileController.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cn.iocoder.mall.system.rest.controller.file;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import com.qiniu.util.Auth;
-import io.swagger.annotations.Api;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * 文件模块(Admins API)
- *
- * author: sin
- * time: 2020/4/20 9:41 上午
- */
-@RestController
-@RequestMapping("admins/file")
-@Api(tags = "文件模块")
-public class AdminsFileController {
-
- private Logger logger = LoggerFactory.getLogger(getClass());
-
- @Autowired
- private Auth auth;
- @Value("${qiniu.bucket}")
- private String bucket;
-
- @GetMapping("/get-qiniu-token")
- public CommonResult getQiniuToken() {
- String token = auth.uploadToken(bucket);
- logger.info("[qiniu_token][token({}) get]", token);
- return CommonResult.success(token);
- }
-}
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/sms/AdminsSmsSignController.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/sms/AdminsSmsSignController.java
deleted file mode 100644
index fc435ba13..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/sms/AdminsSmsSignController.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package cn.iocoder.mall.system.rest.controller.sms;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.common.framework.vo.PageResult;
-import cn.iocoder.mall.system.biz.bo.smsSign.ListSmsSignBO;
-import cn.iocoder.mall.system.biz.dto.smsSign.ListSmsSignDTO;
-import cn.iocoder.mall.system.biz.service.sms.SmsService;
-import cn.iocoder.mall.system.rest.convert.sms.AdminsSmsConvert;
-import cn.iocoder.mall.system.rest.request.sms.AddSignRequest;
-import cn.iocoder.mall.system.rest.request.sms.UpdateSignRequest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 短信服务
- *
- * @author Sin
- * @time 2019/5/26 12:26 PM
- */
-@RestController
-@RequestMapping("admins/sms/sign")
-@Api("短信服务(签名)")
-public class AdminsSmsSignController {
-
- @Autowired
- private SmsService smsService;
-
- @GetMapping("page")
- @ApiOperation("签名-page")
- public CommonResult> pageSign(@Validated ListSmsSignDTO listSmsSignDTO) {
- return CommonResult.success(smsService.listSmsSign(listSmsSignDTO));
- }
-
- @PostMapping("add")
- @ApiOperation("签名-添加")
- public CommonResult> addSign(@RequestBody AddSignRequest addSignRequest) {
- smsService.addSign(AdminsSmsConvert.INSTANCE.convert(addSignRequest));
- return CommonResult.success(null);
- }
-
- @PutMapping("update")
- @ApiOperation("签名-更新")
- public CommonResult> updateSign(@RequestBody UpdateSignRequest updateSignRequest) {
- smsService.updateSign(AdminsSmsConvert.INSTANCE.convert(updateSignRequest));
- return CommonResult.success(null);
- }
-
- @DeleteMapping("deleted")
- @ApiOperation("签名-删除")
- public CommonResult> deletedSign(@RequestParam("id") Integer id) {
- smsService.deleteSign(id);
- return CommonResult.success(null);
- }
-}
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/sms/AdminsSmsTemplateController.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/sms/AdminsSmsTemplateController.java
deleted file mode 100644
index 373246676..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/sms/AdminsSmsTemplateController.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package cn.iocoder.mall.system.rest.controller.sms;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.common.framework.vo.PageResult;
-import cn.iocoder.mall.system.biz.bo.smsTemplate.ListSmsTemplateBO;
-import cn.iocoder.mall.system.biz.service.sms.SmsService;
-import cn.iocoder.mall.system.rest.convert.sms.AdminsSmsConvert;
-import cn.iocoder.mall.system.rest.request.sms.AddSmsTemplateRequest;
-import cn.iocoder.mall.system.rest.request.sms.ListSmsTemplateRequest;
-import cn.iocoder.mall.system.rest.request.sms.UpdateSmsTemplateRequest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 短信服务
- *
- * @author Sin
- * @time 2019/5/26 12:26 PM
- */
-@RestController
-@RequestMapping("admins/sms/template")
-@Api("短信服务(短信模板)")
-public class AdminsSmsTemplateController {
-
- @Autowired
- private SmsService smsService;
-
- @PostMapping("page")
- @ApiOperation("短信模板-page")
- public CommonResult> pageSign(@RequestBody ListSmsTemplateRequest request) {
- return CommonResult.success(smsService.listSmsTemplate(AdminsSmsConvert.INSTANCE.convert(request)));
- }
-
- @PostMapping("add")
- @ApiOperation("短信模板-添加")
- public CommonResult addSign(@RequestBody AddSmsTemplateRequest smsTemplateAddPO) {
- smsService.addTemplate(
- smsTemplateAddPO.getSmsSignId(),
- smsTemplateAddPO.getTemplateCode(),
- smsTemplateAddPO.getTemplate(),
- smsTemplateAddPO.getPlatform(),
- smsTemplateAddPO.getSmsType());
- return CommonResult.success(null);
- }
-
- @PutMapping("update")
- @ApiOperation("短信模板-更新")
- public CommonResult updateSign(@RequestBody UpdateSmsTemplateRequest smsTemplateUpdatePO) {
- smsService.updateTemplate(
- smsTemplateUpdatePO.getId(),
- smsTemplateUpdatePO.getSmsSignId(),
- smsTemplateUpdatePO.getTemplateCode(),
- smsTemplateUpdatePO.getTemplate(),
- smsTemplateUpdatePO.getPlatform(),
- smsTemplateUpdatePO.getSmsType());
- return CommonResult.success(null);
- }
-
- @DeleteMapping("deleted")
- @ApiOperation("短信模板-删除")
- public CommonResult deletedSign(@RequestParam("id") Integer id) {
- smsService.deleteTemplate(id);
- return CommonResult.success(null);
- }
-}
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/sms/AdminsSmsConvert.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/sms/AdminsSmsConvert.java
deleted file mode 100644
index b6dc4cac9..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/sms/AdminsSmsConvert.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cn.iocoder.mall.system.rest.convert.sms;
-
-import cn.iocoder.mall.system.biz.dto.smsSign.AddSignDTO;
-import cn.iocoder.mall.system.biz.dto.smsSign.UpdateSignDTO;
-import cn.iocoder.mall.system.biz.dto.smsTemplate.ListSmsTemplateDTO;
-import cn.iocoder.mall.system.rest.request.sms.AddSignRequest;
-import cn.iocoder.mall.system.rest.request.sms.UpdateSignRequest;
-import cn.iocoder.mall.system.rest.request.sms.ListSmsTemplateRequest;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-/**
- * sms admins convert
- *
- * author: sin
- * time: 2020/4/20 11:07 上午
- */
-@Mapper
-public interface AdminsSmsConvert {
-
- AdminsSmsConvert INSTANCE = Mappers.getMapper(AdminsSmsConvert.class);
-
- @Mappings({})
- AddSignDTO convert(AddSignRequest bean);
-
- @Mappings({})
- UpdateSignDTO convert(UpdateSignRequest bean);
-
- @Mappings({})
- ListSmsTemplateDTO convert(ListSmsTemplateRequest bean);
-}
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/admin/AdminsUserUpdateRequest.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/admin/AdminsUserUpdateRequest.java
deleted file mode 100644
index da63719e2..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/admin/AdminsUserUpdateRequest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package cn.iocoder.mall.system.rest.request.admin;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * @Author: jiangweifan
- * @Date: 2020/5/12
- * @Description: 管理员 - 用户信息 - 更新用户信息
- */
-@ApiModel("更新用户信息Request")
-@Data
-@Accessors(chain = true)
-public class AdminsUserUpdateRequest {
-
- @ApiModelProperty(name = "id", value = "用户编号", required = true, example = "1")
- @NotNull(message = "用户编号不能为空")
- private Integer id;
-
- @ApiModelProperty(name = "nickname", value = "昵称", required = true, example = "小王")
- private String nickname;
-
- @ApiModelProperty(name = "avatar", value = "头像", required = true, example = "http://www.iocoder.cn/xxx.jpg")
- private String avatar;
-}
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/AddSignRequest.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/AddSignRequest.java
deleted file mode 100644
index 55be319db..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/AddSignRequest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package cn.iocoder.mall.system.rest.request.sms;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-/**
- * 添加 sign
- *
- * author: sin
- * time: 2020/4/20 11:10 上午
- */
-@Data
-@Accessors(chain = true)
-public class AddSignRequest implements Serializable {
-
- private String sign;
-
- private Integer platform;
-}
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/AddSmsTemplateRequest.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/AddSmsTemplateRequest.java
deleted file mode 100644
index 6357f9aa3..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/AddSmsTemplateRequest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package cn.iocoder.mall.system.rest.request.sms;
-
-import cn.iocoder.common.framework.validator.InEnum;
-import cn.iocoder.mall.system.biz.enums.sms.SmsPlatformEnum;
-import cn.iocoder.mall.system.biz.enums.sms.SmsTypeEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import java.io.Serializable;
-
-/**
- * 短信模板 add
- *
- * @author Sin
- * @time 2019/5/26 12:37 PM
- */
-@ApiModel("短信模板-添加")
-@Data
-@Accessors(chain = true)
-public class AddSmsTemplateRequest implements Serializable {
-
- @ApiModelProperty("短信签名id")
- @NotNull(message = "短信短信签名id不能为空!")
- private Integer smsSignId;
-
- @ApiModelProperty("短信模板code")
- @NotNull
- @Size(min = 3, max = 50, message = "短信code在 3-50 之间")
- private String templateCode;
-
- @ApiModelProperty("短信模板")
- @NotNull
- @Size(min = 3, max = 255, message = "短信在 3-255 之间")
- private String template;
-
- @ApiModelProperty("短信模板-平台")
- @NotNull
- @InEnum(value = SmsPlatformEnum.class)
- private Integer platform;
-
- @ApiModelProperty("短信模板-平台")
- @NotNull
- @InEnum(value = SmsTypeEnum.class)
- private Integer smsType;
-}
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/ListSmsTemplateRequest.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/ListSmsTemplateRequest.java
deleted file mode 100644
index 7c26646d1..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/ListSmsTemplateRequest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package cn.iocoder.mall.system.rest.request.sms;
-
-import cn.iocoder.common.framework.vo.PageParam;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-
-/**
- * page 短信模板 query
- *
- * @author Sin
- * @time 2019/5/19 4:32 PM
- */
-@Data
-@Accessors(chain = true)
-public class ListSmsTemplateRequest extends PageParam {
-
- @NotNull
- private String id;
-
- @NotNull
- private Integer smsSignId;
-
- @NotNull
- private String template;
-
- @NotNull
- private String applyStatus;
-}
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/UpdateSignRequest.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/UpdateSignRequest.java
deleted file mode 100644
index cbde8ea4a..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/UpdateSignRequest.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cn.iocoder.mall.system.rest.request.sms;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-
-/**
- * 更新签名
- *
- * author: sin
- * time: 2020/4/20 11:02 上午
- */
-@Data
-@Accessors(chain = true)
-public class UpdateSignRequest implements Serializable {
-
- private Integer id;
-
- private String sign;
-
- private Integer platform;
-}
diff --git a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/UpdateSmsTemplateRequest.java b/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/UpdateSmsTemplateRequest.java
deleted file mode 100644
index 1a45de2e3..000000000
--- a/归档/moved/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/request/sms/UpdateSmsTemplateRequest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cn.iocoder.mall.system.rest.request.sms;
-
-import cn.iocoder.common.framework.validator.InEnum;
-import cn.iocoder.mall.system.biz.enums.sms.SmsPlatformEnum;
-import cn.iocoder.mall.system.biz.enums.sms.SmsTypeEnum;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import java.io.Serializable;
-
-/**
- * 短信模板 add
- *
- * @author Sin
- * @time 2019/5/26 12:37 PM
- */
-@ApiModel("短信模板-添加")
-@Data
-@Accessors(chain = true)
-public class UpdateSmsTemplateRequest implements Serializable {
-
- @ApiModelProperty("短信模板id")
- @NotNull(message = "短信模板不能为空!")
- private Integer id;
-
- @ApiModelProperty("短信签名id")
- @NotNull(message = "短信短信签名id不能为空!")
- private Integer smsSignId;
-
- @ApiModelProperty("短信模板code")
- @NotNull
- @Size(min = 3, max = 50, message = "短信code在 3-50 之间")
- private String templateCode;
-
- @ApiModelProperty("短信模板")
- @NotNull
- @Size(min = 3, max = 255, message = "短信在 3-255 之间")
- private String template;
-
- @ApiModelProperty("短信模板-平台")
- @NotNull
- @InEnum(value = SmsPlatformEnum.class)
- private Integer platform;
-
- @ApiModelProperty("短信模板-平台")
- @NotNull
- @InEnum(value = SmsTypeEnum.class)
- private Integer smsType;
-}
diff --git a/归档/moved/system/system-rest/src/main/resources/rest.yaml b/归档/moved/system/system-rest/src/main/resources/rest.yaml
deleted file mode 100644
index a41390b41..000000000
--- a/归档/moved/system/system-rest/src/main/resources/rest.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-# 服务器的配置项
-server:
- port: 18083
- servlet:
- context-path: /system-api/
-
-# Swagger 配置项
-swagger:
- title: 管理员子系统
- description: 管理员子系统
- version: 1.0.0
- base-package: cn.iocoder.mall.system.rest.controller
diff --git a/归档/moved/system/system-service-api/pom.xml b/归档/moved/system/system-service-api/pom.xml
deleted file mode 100644
index 3b77e0d06..000000000
--- a/归档/moved/system/system-service-api/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
- system
- cn.iocoder.mall
- 1.0-SNAPSHOT
-
- 4.0.0
- jar
-
- system-service-api
-
-
-
- cn.iocoder.mall
- common-framework
- 1.0-SNAPSHOT
-
-
-
-
- io.swagger
- swagger-annotations
-
-
-
-
- org.mapstruct
- mapstruct
-
-
- org.mapstruct
- mapstruct-jdk8
-
-
-
- org.projectlombok
- lombok
-
-
-
-
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/DataDictService.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/DataDictService.java
deleted file mode 100644
index ab7d60d61..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/DataDictService.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package cn.iocoder.mall.system.api;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.mall.system.api.bo.datadict.DataDictBO;
-import cn.iocoder.mall.system.api.dto.datadict.DataDictAddDTO;
-import cn.iocoder.mall.system.api.dto.datadict.DataDictUpdateDTO;
-
-import java.util.Collection;
-import java.util.List;
-
-public interface DataDictService {
-
- List selectDataDictList();
-
- DataDictBO addDataDict(Integer adminId, DataDictAddDTO dataDictAddDTO);
-
- Boolean updateDataDict(Integer adminId, DataDictUpdateDTO dataDictUpdateDTO);
-
- Boolean deleteDataDict(Integer adminId, Integer dataDictId);
-
- /**
- * 获取字典值 - 单个
- *
- * 注意: dictValue:Object 为了方便调用,会自动转换为 dictValue:String
- *
- * @param dictKey
- * @param dictValue
- * @return
- */
- CommonResult getDataDict(String dictKey, Object dictValue);
-
- CommonResult> getDataDict(String dictKey);
-
- /**
- * 获取字典值 - 多个
- *
- * 注意:dictValueList:? 为了方便调用,会自动转换为 Set:String
- *
- * @param dictKey
- * @param dictValueList
- * @return
- */
- CommonResult> getDataDictList(String dictKey, Collection> dictValueList);
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/SmsService.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/SmsService.java
deleted file mode 100644
index fe15355c7..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/SmsService.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package cn.iocoder.mall.system.api;
-
-import cn.iocoder.mall.system.api.bo.sms.SmsSignBO;
-import cn.iocoder.mall.system.api.bo.sms.PageSmsSignBO;
-import cn.iocoder.mall.system.api.bo.sms.SmsTemplateBO;
-import cn.iocoder.mall.system.api.bo.sms.PageSmsTemplateBO;
-import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsSignDTO;
-import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsTemplateDTO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 短信服务
- *
- * @author Sin
- * @time 2019/5/16 9:54 AM
- */
-public interface SmsService {
-
- /**
- * 短信模板 - 分页
- *
- * @param queryDTO
- * @return
- */
- PageSmsSignBO pageSmsSign(PageQuerySmsSignDTO queryDTO);
-
- /**
- * 短信模板 - 分页
- *
- * @param queryDTO
- * @return
- */
- PageSmsTemplateBO pageSmsTemplate(PageQuerySmsTemplateDTO queryDTO);
-
- /**
- * 签名 - 创建
- *
- * @param sign
- */
- void addSign(String sign, Integer platform);
-
- /**
- * 签名 - 获取
- *
- * @param id
- */
- SmsSignBO getSign(Integer id);
-
- /**
- * 签名 - 更新
- *
- * @param id
- * @param newSign
- * @param platform
- */
- void updateSign(Integer id, String newSign, Integer platform);
-
- /**
- * 签名 - 更新
- *
- * @param id
- */
- void deleteSign(Integer id);
-
- /**
- * 模板 - 创建
- *
- * @param smsSignId 选用的哪个签名
- * @param templateCode 模板code
- * @param template 模板内容
- * @param platform 平台
- */
- void addTemplate(Integer smsSignId, String templateCode,
- String template, Integer platform, Integer smsType);
-
- /**
- * 模板 - 获取
- *
- * @param id
- */
- SmsTemplateBO getTemplate(Integer id, Integer platform);
-
- /**
- * 模板 - 更新
- *
- * @param id 模板id
- * @param smsSignId 短期签名
- * @param template 模板内容
- * @param platform 短信平台
- */
- void updateTemplate(Integer id, Integer smsSignId, String templateCode,
- String template, Integer platform, Integer smsType);
-
- /**
- * 模板 - 删除
- *
- * @param id
- */
- void deleteTemplate(Integer id);
-
- /**
- * 短信发送 - 单个
- *
- * @return
- */
- void singleSend(String mobile, Integer smsTemplateId, Map params);
-
- /**
- * 短信发送 - 批量
- *
- * @return
- */
- void batchSend(List mobileList, Integer smsTemplateId, Map params);
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsSignBO.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsSignBO.java
deleted file mode 100644
index a4482d2b0..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsSignBO.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package cn.iocoder.mall.system.api.bo.sms;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * sms page
- *
- * @author Sin
- * @time 2019/5/19 4:23 PM
- */
-@Data
-@Accessors(chain = true)
-public class PageSmsSignBO {
-
- private Integer count;
-
- private Long current;
-
- private Long size;
-
- private Long total;
-
- private List data;
-
- @Data
- @Accessors(chain = true)
- public static class Sign {
- /**
- * 编号
- */
- private Integer id;
- /**
- * 短信平台
- */
- private Integer platform;
- /**
- * 签名名称
- */
- private String sign;
- /**
- * 审核状态
- *
- * - 1、审核中
- * - 2、审核成功
- * - 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
- /**
- * 更新时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date updateTime;
- /**
- * 创建时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date createTime;
- }
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsTemplateBO.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsTemplateBO.java
deleted file mode 100644
index ece12fc9c..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/PageSmsTemplateBO.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package cn.iocoder.mall.system.api.bo.sms;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.experimental.Accessors;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * sms page
- *
- * @author Sin
- * @time 2019/5/19 4:23 PM
- */
-@Data
-@Accessors(chain = true)
-public class PageSmsTemplateBO {
-
- private Long total;
-
- private Long current;
-
- private Long size;
-
- private List data;
-
- @Data
- @Accessors(chain = true)
- public static class Template {
- /**
- * 编号
- */
- private Integer id;
- /**
- * 模板编号 (第三方的)
- */
- private Integer smsSignId;
- /**
- * 短信签名 id
- */
- private String platform;
- /**
- * 短信模板 Code
- */
- private String templateCode;
- /**
- * 短信模板
- */
- private String template;
- /**
- * 短信类型
- */
- private Integer smsType;
- /**
- * 审核状态
- *
- * 1、审核中
- * 2、审核成功
- * 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
- /**
- * 更新时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date updateTime;
- /**
- * 创建时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date createTime;
-
- ///
- /// 关联字段
-
- /**
- * 签名信息
- */
- private Sign sign;
-
- }
-
- @Data
- @Accessors(chain = true)
- public static class Sign {
- /**
- * 编号
- */
- private Integer id;
- /**
- * 签名id 这个是第三方的
- */
- private String platformId;
- /**
- * 签名名称
- */
- private String sign;
- /**
- * 审核状态
- *
- * - 1、审核中
- * - 2、审核成功
- * - 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
- }
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsSignBO.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsSignBO.java
deleted file mode 100644
index 699cc359d..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsSignBO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package cn.iocoder.mall.system.api.bo.sms;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信签名
- *
- * @author Sin
- * @time 2019/5/16 6:30 PM
- */
-@Data
-@Accessors(chain = true)
-public class SmsSignBO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 签名id 这个是第三方的
- */
- private Integer signId;
- /**
- * 签名名称
- */
- private String sign;
- /**
- * 审核状态
- *
- * - 1、审核中
- * - 2、审核成功
- * - 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsTemplateBO.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsTemplateBO.java
deleted file mode 100644
index 35d5f50f1..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/bo/sms/SmsTemplateBO.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package cn.iocoder.mall.system.api.bo.sms;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信 template
- *
- * @author Sin
- * @time 2019/5/16 7:41 PM
- */
-@Data
-@Accessors(chain = true)
-public class SmsTemplateBO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 模板编号 (第三方的)
- */
- private Integer smsSignId;
- /**
- * 短信签名 id
- */
- private String platformId;
- /**
- * 短信模板
- */
- private String template;
- /**
- * 审核状态
- *
- * 1、审核中
- * 2、审核成功
- * 3、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsApplyStatusEnum.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsApplyStatusEnum.java
deleted file mode 100644
index be3203a9f..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsApplyStatusEnum.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package cn.iocoder.mall.system.api.constant;
-
-/**
- * 短信审核状态
- *
- * @author Sin
- * @time 2019/5/16 12:48 PM
- */
-public enum SmsApplyStatusEnum {
-
- CHECKING(1, "审核中"),
- SUCCESS(2, "审核成功"),
- FAIL(10, "审核失败"),
- ;
-
- private final Integer value;
- private final String name;
-
- SmsApplyStatusEnum(int code, String message) {
- this.value = code;
- this.name = message;
- }
-
- public int getValue() {
- return value;
- }
-
- public String getName() {
- return name;
- }
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsPlatformEnum.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsPlatformEnum.java
deleted file mode 100644
index 28d888c5c..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsPlatformEnum.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package cn.iocoder.mall.system.api.constant;
-
-import cn.iocoder.common.framework.core.IntArrayValuable;
-
-import java.util.Arrays;
-
-/**
- * 短信审核状态
- *
- * @author Sin
- * @time 2019/5/16 12:48 PM
- */
-public enum SmsPlatformEnum implements IntArrayValuable {
-
- YunPian(1, "云片"),
- AliYun(2, "阿里云"),
- ;
-
- public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsPlatformEnum::getValue).toArray();
-
- private final Integer value;
- private final String name;
-
- SmsPlatformEnum(Integer code, String message) {
- this.value = code;
- this.name = message;
- }
-
- public Integer getValue() {
- return value;
- }
-
- public String getName() {
- return name;
- }
-
- @Override
- public int[] array() {
- return ARRAYS;
- }
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsTypeEnum.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsTypeEnum.java
deleted file mode 100644
index d957d8b9c..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/constant/SmsTypeEnum.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package cn.iocoder.mall.system.api.constant;
-
-import cn.iocoder.common.framework.core.IntArrayValuable;
-
-import java.util.Arrays;
-
-/**
- * 短信审核状态
- *
- * @author Sin
- * @time 2019/5/16 12:48 PM
- */
-public enum SmsTypeEnum implements IntArrayValuable {
-
- VERIFICATION_CODE(1, "验证码"),
- NOTICE(2, "通知"),
- MARKETING(3, "营销"),
- ;
-
- public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsTypeEnum::getValue).toArray();
-
- private final Integer value;
- private final String name;
-
- SmsTypeEnum(Integer code, String message) {
- this.value = code;
- this.name = message;
- }
-
- public Integer getValue() {
- return value;
- }
-
- public String getName() {
- return name;
- }
-
- @Override
- public int[] array() {
- return ARRAYS;
- }
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsSignDTO.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsSignDTO.java
deleted file mode 100644
index 38286698d..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsSignDTO.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cn.iocoder.mall.system.api.dto.sms;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-
-/**
- * page 短信模板 query
- *
- * @author Sin
- * @time 2019/5/19 4:32 PM
- */
-@Data
-@Accessors(chain = true)
-@ApiModel("短信服务查询")
-public class PageQuerySmsSignDTO implements Serializable {
-
- @ApiModelProperty("每页大小")
- @NotNull
- private Integer size;
-
- @ApiModelProperty("当前页")
- @NotNull
- private Integer current;
-
- @ApiModelProperty("编号")
- private Integer id;
-
- @ApiModelProperty("签名")
- private String sign;
-
- @ApiModelProperty("申请状态")
- private Integer applyStatus;
-}
diff --git a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsTemplateDTO.java b/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsTemplateDTO.java
deleted file mode 100644
index cf0707155..000000000
--- a/归档/moved/system/system-service-api/src/main/java/cn/iocoder/mall/system/api/dto/sms/PageQuerySmsTemplateDTO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package cn.iocoder.mall.system.api.dto.sms;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-
-/**
- * page 短信模板 query
- *
- * @author Sin
- * @time 2019/5/19 4:32 PM
- */
-@Data
-@Accessors(chain = true)
-public class PageQuerySmsTemplateDTO implements Serializable {
-
- @NotNull
- private Long current;
-
- @NotNull
- private Long size;
-
- @NotNull
- private String id;
-
- @NotNull
- private Integer smsSignId;
-
- @NotNull
- private String template;
-
- @NotNull
- private String applyStatus;
-}
diff --git a/归档/moved/system/system-service-impl/pom.xml b/归档/moved/system/system-service-impl/pom.xml
deleted file mode 100644
index 8d67c79b7..000000000
--- a/归档/moved/system/system-service-impl/pom.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
- system
- cn.iocoder.mall
- 1.0-SNAPSHOT
-
- 4.0.0
- system-service-impl
-
-
-
-
- cn.iocoder.mall
- system-service-api
- 1.0-SNAPSHOT
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
- org.springframework
- spring-tx
-
-
- org.springframework
- spring-jdbc
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-dubbo
-
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
-
- com.google.guava
- guava
-
-
- com.yunpian.sdk
- yunpian-java-sdk
- 1.2.7
-
-
- com.aliyun
- aliyun-java-sdk-core
- 4.1.0
-
-
-
-
- org.springframework.boot
- spring-boot-starter-test
-
-
- org.junit.jupiter
- junit-jupiter-api
- 5.4.0
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
-
-
-
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsAliYunClient.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsAliYunClient.java
deleted file mode 100644
index 7b2318fb1..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsAliYunClient.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package cn.iocoder.mall.admin.client;
-
-import com.alibaba.fastjson.JSON;
-import com.aliyuncs.CommonRequest;
-import com.aliyuncs.CommonResponse;
-import com.aliyuncs.DefaultAcsClient;
-import com.aliyuncs.IAcsClient;
-import com.aliyuncs.exceptions.ClientException;
-import com.aliyuncs.http.MethodType;
-import com.aliyuncs.profile.DefaultProfile;
-import lombok.Data;
-import lombok.experimental.Accessors;
-import org.apache.commons.lang3.exception.ExceptionUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 短信 AliYun client
- *
- * @author Sin
- * @time 2019/5/25 12:28 PM
- */
-@Component
-public class SmsAliYunClient implements SmsClient {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(SmsAliYunClient.class);
-
- private static final String DOMAIN = "dysmsapi.aliyuncs.com";
- private static final String SUCCESS_CODE = "OK";
- private static final String SUCCESS_MESSAGE = "OK";
- /**
- * 阿里云短信 - 批量推送最大数 500,支持 1000
- */
- private static final int MAX_BATCH_SIZE = 500;
-
- @Value("${sms.aliYun.accessKeyId?:'default_value'}")
- private String accessKeyId;
- @Value("${sms.aliYun.accessSecret?:'default_value'}")
- private String accessSecret;
-
- @Data
- @Accessors(chain = true)
- public static class Result {
- /**
- * 发送回执ID,可根据该ID在接口QuerySendDetails中查询具体的发送状态。
- */
- private String BizId;
- /**
- * 请求状态码。
- *
- * - OK 蔡成功
- */
- private String Code;
- /**
- * 状态码的描述。
- */
- private String Message;
- /**
- * 请求ID。
- */
- private String RequestId;
- }
-
- @Override
- public SendResult singleSend(String mobile, String sign, String templateCode,
- String template, Map templateParams) {
- // params
- CommonRequest request = new CommonRequest();
- request.setMethod(MethodType.POST);
- request.setDomain(DOMAIN);
- request.setVersion("2017-05-25");
- request.setAction("SendSms");
- request.putQueryParameter("PhoneNumbers", mobile);
- request.putQueryParameter("SignName", sign);
- request.putQueryParameter("TemplateCode", templateCode);
- request.putQueryParameter("TemplateParam", JSON.toJSONString(templateParams));
-
- // 发送请求
- return doSend(request);
- }
-
- @Override
- public SendResult batchSend(List mobileList, String sign, String templateCode,
- String template, Map templateParams) {
-
- // 最大发送数为 1000,我们设置为 500 个, 分段发送
- int maxSendSize = MAX_BATCH_SIZE;
- int maxSendSizeCount = mobileList.size() % maxSendSize == 0
- ? mobileList.size() / maxSendSize
- : mobileList.size() / maxSendSize + 1;
-
- SendResult sendResult = null;
- for (int i = 0; i < maxSendSizeCount; i++) {
- // 分批发送
- List batchSendMobile = mobileList
- .subList(i * maxSendSize, (i + 1) * maxSendSize);
-
- // params
- CommonRequest request = new CommonRequest();
- request.setMethod(MethodType.POST);
- request.setDomain(DOMAIN);
- request.setVersion("2017-05-25");
- request.setAction("SendBatchSms");
- request.putQueryParameter("PhoneNumberJson", JSON.toJSONString(batchSendMobile));
- request.putQueryParameter("SignNameJson", JSON.toJSONString(Collections.singletonList(sign)));
- request.putQueryParameter("TemplateCode", templateCode);
- request.putQueryParameter("TemplateParamJson", JSON.toJSONString(Collections.singletonList(templateParams)));
-
- // 发送请求
- sendResult = doSend(request);
- }
- return sendResult;
- }
-
- private SendResult doSend(CommonRequest request) {
- // 获取 client
- IAcsClient client = getClient();
- try {
- CommonResponse response = client.getCommonResponse(request);
- Result result = JSON.parseObject(response.getData(), Result.class);
- if (!SUCCESS_CODE.equals(result.getCode())) {
-
- LOGGER.info("发送验证码失败 params {} res {}", JSON.toJSON(request), JSON.toJSON(result));
-
- // 错误发送失败
- return new SendResult()
- .setIsSuccess(false)
- .setCode(SendResult.ERROR_CODE)
- .setMessage(result.getMessage());
- } else {
- LOGGER.info("发送验证码失败 params {} res", JSON.toJSON(request), JSON.toJSON(result));
-
- // 发送成功
- return new SendResult()
- .setIsSuccess(true)
- .setCode(SendResult.SUCCESS_CODE)
- .setMessage(result.getMessage());
- }
- } catch (ClientException e) {
- LOGGER.error("发送验证码异常 {}", ExceptionUtils.getMessage(e));
- return new SendResult()
- .setIsSuccess(false)
- .setCode(SendResult.ERROR_CODE)
- .setMessage(ExceptionUtils.getMessage(e));
- }
- }
-
- /**
- * 获取 client
- *
- * @return
- */
- private IAcsClient getClient() {
- return new DefaultAcsClient(DefaultProfile.getProfile("default", accessKeyId, accessSecret));
- }
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsClient.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsClient.java
deleted file mode 100644
index 9ad07b566..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsClient.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package cn.iocoder.mall.admin.client;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 短信平台
- *
- * @author Sin
- * @time 2019/5/16 6:33 PM
- */
-public interface SmsClient {
-
-
-
- @Data
- @Accessors(chain = true)
- class SendResult {
-
- public static final int SUCCESS_CODE = 0;
- public static final int ERROR_CODE = 1;
- public static final String SUCCESS_MESSAGE = "SUCCESS";
-
- /**
- * 错误码
- */
- private Integer code;
- /**
- * 错误信息
- */
- private String message;
- /**
- * 是否成功
- */
- private Boolean isSuccess;
- }
-
- /**
- * 短信发送 - 单个
- *
- * @param mobile 手机号
- * @param sign 签名
- * @param templateCode 短信模板code
- * @param template 短信模板
- * @param templateParams 短信模板 params
- * @return 发送后信息
- */
- SendResult singleSend(String mobile, String sign, String templateCode,
- String template, Map templateParams);
-
- /**
- * 短信发送 - 批量
- *
- * @param mobileList 手机号
- * @param sign 签名
- * @param templateCode 短信模板 code
- * @param template 短信模板
- * @param templateParams 短信模板params
- * @return 发送后信息
- */
- SendResult batchSend(List mobileList, String sign, String templateCode,
- String template, Map templateParams);
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java
deleted file mode 100644
index db78bcb2e..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package cn.iocoder.mall.admin.client;
-
-import cn.iocoder.common.framework.exception.ServiceException;
-import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import org.apache.http.HttpEntity;
-import org.apache.http.NameValuePair;
-import org.apache.http.client.entity.UrlEncodedFormEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.message.BasicNameValuePair;
-import org.apache.http.util.EntityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-import org.springframework.util.CollectionUtils;
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 云片 短信平台
- *
- * @author Sin
- * @time 2019/5/16 6:34 PM
- */
-@Component
-public class SmsYunPianClient implements SmsClient {
-
- protected static final Logger LOGGER = LoggerFactory.getLogger(SmsYunPianClient.class);
-
- private static final int SUCCESS_CODE = 0;
- private static final String SUCCESS_MESSAGE = "SUCCESS";
-
- /**
- * 云片短信 - 批量推送最大数 500,支持 1000
- */
- private static final int MAX_BATCH_SIZE = 500;
- /**
- * 模板 - 参数拼接
- */
- private static final String PARAM_TEMPLATE = "#%s#";
- /**
- * 模板 - 签名拼接
- */
- private static final String SIGN_TEMPLATE = "【%s】%s";
-
- /**
- * 签名 - 添加
- */
- private static final String URL_SIGN_ADD = "https://sms.yunpian.com/v2/sign/add.json";
- /**
- * 签名 - 获取
- */
- private static final String URL_SIGN_GET = "https://sms.yunpian.com/v2/sign/get.json";
- /**
- * 签名 - 更新
- */
- private static final String URL_SIGN_UPDATE = "https://sms.yunpian.com/v2/sign/update.json";
- /**
- * 模板 - 添加
- */
- private static final String URL_TEMPLATE_ADD = "https://sms.yunpian.com/v2/tpl/add.json";
- /**
- * 模板 - 获取
- */
- private static final String URL_TEMPLATE_GET = "https://sms.yunpian.com/v2/tpl/get.json";
- /**
- * 模板 - 更新
- */
- private static final String URL_TEMPLATE_UPDATE = "https://sms.yunpian.com/v2/tpl/update.json";
- /**
- * 模板 - 删除
- */
- private static final String URL_TEMPLATE_DELETE = "https://sms.yunpian.com/v2/tpl/del.json";
- /**
- * 短信发送 - 单个
- */
- private static final String URL_SEND_SINGLE = "https://sms.yunpian.com/v2/sms/single_send.json";
- /**
- * 短信发送 - 批量
- */
- private static final String URL_SEND_BATCH = "https://sms.yunpian.com/v2/sms/batch_send.json";
-
-
- //编码格式。发送编码格式统一用UTF-8
- private static String ENCODING = "UTF-8";
-
- @Value("${sms.yunPian.apiKey?:'default_value'}")
- private String apiKey;
-
- @Override
- public SendResult singleSend(String mobile, String sign, String templateCode, String template, Map templateParams) {
- // build 模板
- template = buildTemplate(sign, template, templateParams);
-
- // 请求参数
- Map params = new LinkedHashMap<>();
- params.put("apikey", apiKey);
- params.put("mobile", mobile);
- params.put("text", template);
- // TODO: 2019/5/19 sin 运营商发送报告 回调
- // params.put("callback_url", template);
- String result = post(URL_SEND_SINGLE, params);
- JSONObject jsonObject = JSON.parseObject(result);
- if (jsonObject.containsKey("code")
- && !(jsonObject.getInteger("code") == SUCCESS_CODE)) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_PLATFORM_FAIL.getCode(),
- jsonObject.getString("detail"));
- }
-
- return new SendResult()
- .setIsSuccess(SUCCESS_CODE == jsonObject.getInteger("code"))
- .setCode(jsonObject.getInteger("code"))
- .setMessage(jsonObject.getString("detail"));
- }
-
- @Override
- public SendResult batchSend(List mobileList, String sign,
- String templateCode, String template,
- Map templateParams) {
- // build 模板
- template = buildTemplate(sign, template, templateParams);
-
- // 最大发送数为 1000,我们设置为 500 个, 分段发送
- int maxSendSize = MAX_BATCH_SIZE;
- int maxSendSizeCount = mobileList.size() % maxSendSize == 0
- ? mobileList.size() / maxSendSize
- : mobileList.size() / maxSendSize + 1;
- int j = 0;
- int j2 = mobileList.size();
-
- for (int i = 0; i < maxSendSizeCount; i++) {
- StringBuffer sendMobileStr = new StringBuffer();
- for (int k = j; k < j2; k++) {
- sendMobileStr.append(",");
- sendMobileStr.append(mobileList.get(k));
- }
-
- String dividedMobile = sendMobileStr.toString().substring(1);
-
- // 发送手机号
- Map params = new LinkedHashMap<>();
- params.put("apikey", apiKey);
- params.put("mobile", dividedMobile);
- params.put("text", template);
- // TODO: 2019/5/19 sin 运营商发送报告 回调
- // params.put("callback_url", template);
- String result = post(URL_SEND_BATCH, params);
- JSONObject jsonObject = JSON.parseObject(result);
- if (jsonObject.containsKey("code")
- && !(jsonObject.getInteger("code") == SUCCESS_CODE)) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_PLATFORM_FAIL.getCode(),
- jsonObject.getString("detail"));
- }
-
- // 用于递增 maxSendSize
- j = j2;
- j2 = j + maxSendSize;
- }
-
- return new SendResult()
- .setIsSuccess(true)
- .setCode(SUCCESS_CODE)
- .setMessage(SUCCESS_MESSAGE);
- }
-
- /**
- * 构建模板
- *
- * @param sign
- * @param template
- * @param templateParams
- * @return
- */
- private static String buildTemplate(String sign, String template,
- Map templateParams) {
-
- if (CollectionUtils.isEmpty(templateParams)) {
- return template;
- }
-
- for (Map.Entry entry : templateParams.entrySet()) {
- String paramsKey = entry.getKey();
- String value = entry.getValue();
- String paramPlace = String.format(PARAM_TEMPLATE, paramsKey);
- template = template.replaceAll(paramPlace, value);
- }
-
- template = String.format(SIGN_TEMPLATE, sign, template);
- return template;
- }
-
- /**
- * 基于HttpClient 4.3的通用POST方法
- *
- * @param url 提交的URL
- * @param paramsMap 提交<参数,值>Map
- * @return 提交响应
- */
-
- public static String post(String url, Map paramsMap) {
- CloseableHttpClient client = HttpClients.createDefault();
- String responseText = "";
- CloseableHttpResponse response = null;
- try {
- HttpPost method = new HttpPost(url);
- if (paramsMap != null) {
- List paramList = new ArrayList<>();
- for (Map.Entry param : paramsMap.entrySet()) {
- NameValuePair pair = new BasicNameValuePair(param.getKey(),
- param.getValue());
- paramList.add(pair);
- }
- method.setEntity(new UrlEncodedFormEntity(paramList, ENCODING));
- }
- response = client.execute(method);
- HttpEntity entity = response.getEntity();
- if (entity != null) {
- responseText = EntityUtils.toString(entity, ENCODING);
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- response.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- LOGGER.debug("云片短信平台 res: {}", responseText);
- return responseText;
- }
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsSignConvert.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsSignConvert.java
deleted file mode 100644
index deaa743ed..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsSignConvert.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package cn.iocoder.mall.admin.convert;
-
-import cn.iocoder.mall.system.api.bo.sms.PageSmsSignBO;
-import cn.iocoder.mall.system.api.bo.sms.SmsSignBO;
-import cn.iocoder.mall.admin.dataobject.SmsSignDO;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-
-/**
- * 短信 签名
- *
- * @author Sin
- * @time 2019/5/16 6:31 PM
- */
-@Mapper
-public interface SmsSignConvert {
-
- SmsSignConvert INSTANCE = Mappers.getMapper(SmsSignConvert.class);
-
- @Mappings({})
- SmsSignBO convert(SmsSignDO smsSignDO);
-
- @Mappings({})
- List convert(List smsSignDOList);
-
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsTemplateConvert.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsTemplateConvert.java
deleted file mode 100644
index 8a6e5e609..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/convert/SmsTemplateConvert.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cn.iocoder.mall.admin.convert;
-
-import cn.iocoder.mall.system.api.bo.sms.PageSmsTemplateBO;
-import cn.iocoder.mall.system.api.bo.sms.SmsTemplateBO;
-import cn.iocoder.mall.admin.dataobject.SmsSignDO;
-import cn.iocoder.mall.admin.dataobject.SmsTemplateDO;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mappings;
-import org.mapstruct.factory.Mappers;
-
-import java.util.List;
-
-/**
- * 短信 template
- *
- * @author Sin
- * @time 2019/5/16 7:43 PM
- */
-@Mapper
-public interface SmsTemplateConvert {
-
- SmsTemplateConvert INSTANCE = Mappers.getMapper(SmsTemplateConvert.class);
-
- @Mappings({})
- SmsTemplateBO convert(SmsTemplateDO smsTemplateDO);
-
- @Mappings({})
- List convert(List smsTemplateDOList);
-
- @Mappings({})
- List convertTemplateSign(List smsSignDOList);
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/SmsSendMapper.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/SmsSendMapper.java
deleted file mode 100644
index e94de81c1..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/SmsSendMapper.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cn.iocoder.mall.admin.dao;
-
-import cn.iocoder.mall.admin.dataobject.SmsSendLogDO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springframework.stereotype.Repository;
-
-/**
- * 短信
- *
- * @author Sin
- * @time 2019/5/16 6:18 PM
- */
-@Repository
-public interface SmsSendMapper extends BaseMapper {
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/SmsSignMapper.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/SmsSignMapper.java
deleted file mode 100644
index 351e0326c..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/SmsSignMapper.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cn.iocoder.mall.admin.dao;
-
-import cn.iocoder.mall.admin.dataobject.SmsSignDO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springframework.stereotype.Repository;
-
-/**
- * 短信
- *
- * @author Sin
- * @time 2019/5/16 6:18 PM
- */
-@Repository
-public interface SmsSignMapper extends BaseMapper {
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/SmsTemplateMapper.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/SmsTemplateMapper.java
deleted file mode 100644
index 91fa04057..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dao/SmsTemplateMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package cn.iocoder.mall.admin.dao;
-
-import cn.iocoder.common.framework.dataobject.BaseDO;
-import cn.iocoder.mall.admin.dataobject.SmsTemplateDO;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springframework.stereotype.Repository;
-
-/**
- * 短信 template
- *
- * @author Sin
- * @time 2019/5/16 6:18 PM
- */
-@Repository
-public interface SmsTemplateMapper extends BaseMapper {
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/SmsSendLogDO.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/SmsSendLogDO.java
deleted file mode 100644
index 3cf2b3326..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/SmsSendLogDO.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package cn.iocoder.mall.admin.dataobject;
-
-import cn.iocoder.common.framework.dataobject.BaseDO;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信 client log
- *
- * @author Sin
- * @time 2019/5/25 12:36 PM
- */
-@Data
-@Accessors(chain = true)
-public class SmsSendLogDO extends BaseDO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 短信模板
- */
- private Integer templateId;
- /**
- * 短信
- */
- private String template;
- /**
- * 参数
- */
- private String params;
- /**
- * 发送信息
- */
- private String message;
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/SmsSignDO.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/SmsSignDO.java
deleted file mode 100644
index 1b7fcdae8..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/SmsSignDO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cn.iocoder.mall.admin.dataobject;
-
-import cn.iocoder.common.framework.dataobject.DeletableDO;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信签名
- *
- * 签名是短信发送前缀 如:【阿里云】、【小红书】
- *
- * @author Sin
- * @time 2019/5/16 12:28 PM
- */
-@Data
-@Accessors(chain = true)
-@TableName("sms_sign")
-public class SmsSignDO extends DeletableDO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 签名名称
- */
- private String sign;
- /**
- * 平台
- *
- * 1、云片
- * 2、阿里云
- */
- private Integer platform;
- /**
- * 审核状态
- *
- * - 1、审核中
- * - 2、审核成功
- * - 10、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/SmsTemplateDO.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/SmsTemplateDO.java
deleted file mode 100644
index 9634b6ae6..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/dataobject/SmsTemplateDO.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package cn.iocoder.mall.admin.dataobject;
-
-import cn.iocoder.common.framework.dataobject.DeletableDO;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * 短信 模板
- *
- * @author Sin
- * @time 2019/5/16 12:31 PM
- */
-@Data
-@Accessors(chain = true)
-@TableName("sms_template")
-public class SmsTemplateDO extends DeletableDO {
-
- /**
- * 编号
- */
- private Integer id;
- /**
- * 模板编号 (第三方的)
- */
- private Integer smsSignId;
- /**
- * 模板 code(第三方平台 code)
- */
- private String templateCode;
- /**
- * 短信签名 id
- */
- private Integer platform;
- /**
- * 短信模板
- */
- private String template;
- /**
- * 短信类型
- *
- * - 验证码类
- * - 通知类
- * - 营销类
- */
- private Integer smsType;
- /**
- * 审核状态
- *
- * 1、审核中
- * 2、审核成功
- * 10、审核失败
- */
- private Integer applyStatus;
- /**
- * 审核信息
- */
- private String applyMessage;
-}
diff --git a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java b/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java
deleted file mode 100644
index b8c0a8da8..000000000
--- a/归档/moved/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java
+++ /dev/null
@@ -1,436 +0,0 @@
-package cn.iocoder.mall.admin.service;
-
-import cn.iocoder.common.framework.enums.DeletedStatusEnum;
-import cn.iocoder.common.framework.exception.ServiceException;
-import cn.iocoder.mall.system.api.SmsService;
-import cn.iocoder.mall.system.api.bo.sms.PageSmsSignBO;
-import cn.iocoder.mall.system.api.bo.sms.PageSmsTemplateBO;
-import cn.iocoder.mall.system.api.bo.sms.SmsSignBO;
-import cn.iocoder.mall.system.api.bo.sms.SmsTemplateBO;
-import cn.iocoder.mall.system.api.constant.AdminErrorCodeEnum;
-import cn.iocoder.mall.system.api.constant.SmsApplyStatusEnum;
-import cn.iocoder.mall.system.api.constant.SmsPlatformEnum;
-import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsSignDTO;
-import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsTemplateDTO;
-import cn.iocoder.mall.admin.client.SmsClient;
-import cn.iocoder.mall.admin.convert.SmsSignConvert;
-import cn.iocoder.mall.admin.convert.SmsTemplateConvert;
-import cn.iocoder.mall.admin.dao.SmsSendMapper;
-import cn.iocoder.mall.admin.dao.SmsSignMapper;
-import cn.iocoder.mall.admin.dao.SmsTemplateMapper;
-import cn.iocoder.mall.admin.dataobject.SmsSendLogDO;
-import cn.iocoder.mall.admin.dataobject.SmsSignDO;
-import cn.iocoder.mall.admin.dataobject.SmsTemplateDO;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
-import org.springframework.util.StringUtils;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * 短信
- *
- * @author Sin
- * @time 2019/5/16 10:30 AM
- */
-@Service
-@org.apache.dubbo.config.annotation.Service(validation = "true", version = "${dubbo.provider.SmsService.version}")
-public class SmsServiceImpl implements SmsService {
-
- @Autowired
- private SmsSignMapper smsSignMapper;
- @Autowired
- private SmsTemplateMapper smsTemplateMapper;
- @Autowired
- private SmsSendMapper smsSendMapper;
-
- @Autowired
- @Qualifier("smsYunPianClient")
- private SmsClient smsYunPianClient;
- @Autowired
- @Qualifier("smsAliYunClient")
- private SmsClient smsAliYunClient;
-
- @Override
- public PageSmsSignBO pageSmsSign(PageQuerySmsSignDTO queryDTO) {
- QueryWrapper queryWrapper = new QueryWrapper<>();
- if (queryDTO.getApplyStatus() != null) {
- queryWrapper.eq("apply_status", queryDTO.getApplyStatus());
- }
- if (!StringUtils.isEmpty(queryDTO.getSign())) {
- queryWrapper.like("sign", queryDTO.getSign());
- }
- if (!StringUtils.isEmpty(queryDTO.getId())) {
- queryWrapper.eq("id", queryDTO.getId());
- }
-
- Page page = new Page()
- .setSize(queryDTO.getSize())
- .setCurrent(queryDTO.getCurrent())
- .setDesc("create_time");
-
- IPage signPage = smsSignMapper.selectPage(page, queryWrapper);
- List signList = SmsSignConvert.INSTANCE.convert(signPage.getRecords());
-
- return new PageSmsSignBO()
- .setData(signList)
- .setCurrent(signPage.getCurrent())
- .setSize(signPage.getSize())
- .setTotal(signPage.getTotal());
- }
-
- @Override
- public PageSmsTemplateBO pageSmsTemplate(PageQuerySmsTemplateDTO queryDTO) {
- QueryWrapper queryWrapper = new QueryWrapper<>();
- if (queryDTO.getApplyStatus() != null) {
- queryWrapper.eq("apply_status", queryDTO.getApplyStatus());
- }
- if (queryDTO.getSmsSignId() != null) {
- queryWrapper.eq("sms_sign_id", queryDTO.getSmsSignId());
- }
- if (!StringUtils.isEmpty(queryDTO.getTemplate())) {
- queryWrapper.like("template", queryDTO.getTemplate());
- }
- if (!StringUtils.isEmpty(queryDTO.getId())) {
- queryWrapper.eq("id", queryDTO.getId());
- }
-
- Page page = new Page()
- .setSize(queryDTO.getSize())
- .setCurrent(queryDTO.getCurrent())
- .setDesc("create_time");
-
- IPage signPage = smsTemplateMapper.selectPage(page, queryWrapper);
-
- List templateList
- = SmsTemplateConvert.INSTANCE.convert(signPage.getRecords());
-
- if (CollectionUtils.isEmpty(templateList)) {
- return new PageSmsTemplateBO()
- .setData(Collections.EMPTY_LIST)
- .setCurrent(signPage.getCurrent())
- .setSize(signPage.getSize())
- .setTotal(signPage.getTotal());
- }
-
- // 获取 sign
-
- Set smsSignIds = templateList.stream().map(
- PageSmsTemplateBO.Template::getSmsSignId).collect(Collectors.toSet());
-
- List smsSignDOList = smsSignMapper.selectList(
- new QueryWrapper().in("id", smsSignIds));
-
- List signList = SmsTemplateConvert.INSTANCE.convertTemplateSign(smsSignDOList);
-
- Map smsSignDOMap = signList
- .stream().collect(Collectors.toMap(PageSmsTemplateBO.Sign::getId, o -> o));
-
- // 设置 sign
-
- templateList.forEach(template -> {
- if (smsSignDOMap.containsKey(template.getSmsSignId())) {
- template.setSign(smsSignDOMap.get(template.getSmsSignId()));
- }
- });
-
- return new PageSmsTemplateBO()
- .setData(templateList)
- .setCurrent(signPage.getCurrent())
- .setSize(signPage.getSize())
- .setTotal(signPage.getTotal());
- }
-
- @Override
- @Transactional
- public void addSign(String sign, Integer platform) {
-
- // 避免重复
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper()
- .eq("platform", platform)
- .eq("sign", sign)
- );
-
- if (smsSignDO != null) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getMessage());
- }
-
- // 保存数据库
- smsSignMapper.insert(
- (SmsSignDO) new SmsSignDO()
- .setSign(sign)
- .setPlatform(platform)
- .setApplyStatus(SmsApplyStatusEnum.SUCCESS.getValue())
- .setDeleted(DeletedStatusEnum.DELETED_NO.getValue())
- .setUpdateTime(new Date())
- .setCreateTime(new Date())
- );
- }
-
- @Override
- public SmsSignBO getSign(Integer signId) {
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper()
- .eq("id", signId)
- .eq("deleted", DeletedStatusEnum.DELETED_NO.getValue()));
-
- if (smsSignDO == null) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
-
- return SmsSignConvert.INSTANCE.convert(smsSignDO);
- }
-
- @Override
- @Transactional
- public void updateSign(Integer id, String newSign, Integer platform) {
- // 避免重复
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper()
- .eq("sign", newSign)
- .eq("platform", platform));
-
- if (smsSignDO != null) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getMessage());
- }
-
- // 更新
- smsSignMapper.update(
- (SmsSignDO) new SmsSignDO()
- .setSign(newSign)
- .setPlatform(platform)
- .setUpdateTime(new Date()),
- new QueryWrapper().eq("id", id)
- );
- }
-
- @Override
- public void deleteSign(Integer id) {
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper()
- .eq("id", id));
-
- if (smsSignDO == null) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
-
- // 更新 deleted 为 YES
- smsSignMapper.delete(new UpdateWrapper()
- .set("deleted", DeletedStatusEnum.DELETED_YES.getName())
- .eq("id", id)
- );
- }
-
- @Override
- @Transactional
- public void addTemplate(Integer smsSignId, String templateCode,
- String template, Integer platform, Integer smsType) {
-
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper().eq("id", smsSignId));
-
- if (smsSignDO == null) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
-
- // 保存数据库
- smsTemplateMapper.insert(
- (SmsTemplateDO) new SmsTemplateDO()
- .setId(null)
- .setSmsSignId(smsSignId)
- .setTemplateCode(templateCode)
- .setTemplate(template)
- .setPlatform(platform)
- .setSmsType(smsType)
- .setApplyStatus(SmsApplyStatusEnum.SUCCESS.getValue())
- .setApplyMessage("")
- .setDeleted(DeletedStatusEnum.DELETED_NO.getValue())
- .setCreateTime(new Date())
- );
- }
-
- @Override
- public SmsTemplateBO getTemplate(Integer id, Integer platform) {
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectOne(
- new QueryWrapper()
- .eq("platform", platform)
- .eq("id", id));
-
- if (smsTemplateDO == null) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
-
- return SmsTemplateConvert.INSTANCE.convert(smsTemplateDO);
- }
-
- @Override
- @Transactional
- public void updateTemplate(Integer id, Integer smsSignId, String templateCode,
- String template, Integer platform, Integer smsType) {
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectOne(
- new QueryWrapper().eq("id", id));
-
- if (smsTemplateDO == null) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
-
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper().eq("id", smsTemplateDO.getSmsSignId()));
-
- if (smsSignDO == null) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
-
- smsTemplateMapper.update(
- (SmsTemplateDO) new SmsTemplateDO()
- .setSmsSignId(smsSignId)
- .setTemplateCode(templateCode)
- .setTemplate(template)
- .setPlatform(platform)
- .setSmsType(smsType)
- .setUpdateTime(new Date()),
- new QueryWrapper().eq("id", id)
- );
- }
-
- @Override
- @Transactional
- public void deleteTemplate(Integer id) {
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectOne(
- new QueryWrapper().eq("id", id));
-
- if (smsTemplateDO == null
- || smsTemplateDO.getDeleted().equals(DeletedStatusEnum.DELETED_YES.getValue())) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
-
- // 删除 数据库模板
- SmsTemplateDO updateTemplate =new SmsTemplateDO();
- updateTemplate.setDeleted(DeletedStatusEnum.DELETED_YES.getValue());
- smsTemplateMapper.delete(
- new UpdateWrapper()
- .set("deleted", DeletedStatusEnum.DELETED_YES)
- .eq("id", id));
- }
-
- @Override
- public void singleSend(String mobile, Integer smsTemplateId, Map params) {
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectOne(
- new QueryWrapper().eq("id", smsTemplateId));
-
- if (smsTemplateDO == null
- || smsTemplateDO.getDeleted().equals(DeletedStatusEnum.DELETED_YES.getValue())) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
-
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper().eq("id", smsTemplateDO.getSmsSignId()));
-
- if (smsSignDO == null) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
-
- // 获取 client
- SmsClient smsClient = getSmsClient(smsTemplateDO.getPlatform());
- // 发送短信
- SmsClient.SendResult sendResult = smsClient.singleSend(mobile, smsSignDO.getSign(),
- smsTemplateDO.getTemplateCode(), smsTemplateDO.getTemplate(), params);
-
- // 添加日志
- smsSendMapper.insert(
- (SmsSendLogDO) new SmsSendLogDO()
- .setTemplateId(smsTemplateDO.getId())
- .setTemplate(smsTemplateDO.getTemplate())
- .setMessage(sendResult.getMessage())
- .setCreateTime(new Date())
- );
- }
-
- @Override
- public void batchSend(List mobileList, Integer smsTemplateId, Map params) {
- SmsTemplateDO smsTemplateDO = smsTemplateMapper.selectOne(
- new QueryWrapper().eq("id", smsTemplateId));
-
- if (smsTemplateDO == null
- || smsTemplateDO.getDeleted().equals(DeletedStatusEnum.DELETED_YES.getValue())) {
- throw new ServiceException(AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
- }
-
- SmsSignDO smsSignDO = smsSignMapper.selectOne(
- new QueryWrapper().eq("id", smsTemplateDO.getSmsSignId()));
-
- if (smsSignDO == null) {
- // 添加日志
- smsSendMapper.insert(
- (SmsSendLogDO) new SmsSendLogDO()
- .setTemplateId(smsTemplateDO.getId())
- .setTemplate(smsTemplateDO.getTemplate())
- .setMessage("发送成功!")
- .setCreateTime(new Date())
- );
-
- throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(),
- AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
- }
-
- // 获取 client
- SmsClient smsClient = getSmsClient(smsTemplateDO.getPlatform());
-
- // 发送短信
- SmsClient.SendResult sendResult = smsClient.batchSend(mobileList, smsSignDO.getSign(),
- smsTemplateDO.getTemplateCode(), smsTemplateDO.getTemplate(), params);
-
- // 添加日志
- smsSendMapper.insert(
- (SmsSendLogDO) new SmsSendLogDO()
- .setTemplateId(smsTemplateDO.getId())
- .setTemplate(smsTemplateDO.getTemplate())
- .setMessage(sendResult.getMessage())
- .setCreateTime(new Date())
- );
- }
-
- /**
- * 获取 sms 对于的 client
- *
- * @param platform
- * @return
- */
- private SmsClient getSmsClient(Integer platform) {
- SmsClient smsClient = null;
- if (SmsPlatformEnum.YunPian.getValue().equals(platform)) {
- smsClient = smsYunPianClient;
- } else if (SmsPlatformEnum.AliYun.getValue().equals(platform)) {
- smsClient = smsAliYunClient;
- }
-
- if (smsClient == null) {
- throw new ServiceException(
- AdminErrorCodeEnum.SMS_NOT_SEND_CLIENT.getCode(),
- AdminErrorCodeEnum.SMS_NOT_SEND_CLIENT.getMessage());
- }
-
- return smsClient;
- }
-}
diff --git a/归档/moved/system/system-service-impl/src/main/resources/config/application.yaml b/归档/moved/system/system-service-impl/src/main/resources/config/application.yaml
deleted file mode 100644
index bef7c0a02..000000000
--- a/归档/moved/system/system-service-impl/src/main/resources/config/application.yaml
+++ /dev/null
@@ -1,73 +0,0 @@
-spring:
- # datasource
- datasource:
- url: jdbc:mysql://s1.iocoder.cn:3306/mall_admin?useSSL=false&useUnicode=true&characterEncoding=UTF-8
- driver-class-name: com.mysql.jdbc.Driver
- username: root
- password: zhuyang
-
- # Spring Cloud 配置项
- cloud:
- nacos:
- # Spring Cloud Nacos Discovery 配置项
- discovery:
- server-addr: s1.iocoder.cn:8848 # Nacos 服务器地址
-
-# mybatis-plus
-mybatis-plus:
- configuration:
- map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
- global-config:
- db-config:
- id-type: auto
- logic-delete-value: 1 # 逻辑已删除值(默认为 1)
- logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
- mapper-locations: classpath*:mapper/*.xml
- type-aliases-package: cn.iocoder.mall.admin.dataobject
-
-# sms
-sms:
- yunPian:
- apiKey:
- aliYun:
- accessKeyId:
- accessSecret:
-
-# Dubbo 配置项
-dubbo:
- # Dubbo 注册中心
- registry:
- address: spring-cloud://s1.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
- # Spring Cloud Alibaba Dubbo 专属配置
- cloud:
- subscribed-services: '' # 设置订阅的应用列表,默认为 * 订阅所有应用
- # Dubbo 提供者的协议
- protocol:
- name: dubbo
- port: -1
- # Dubbo 提供服务的扫描基础包
- scan:
- base-packages: cn.iocoder.mall.admin.service
- # Dubbo 服务提供者的配置
- provider:
- filter: -exception
- AdminAccessLogService:
- version: 1.0.0
- AdminService:
- version: 1.0.0
- DataDictService:
- version: 1.0.0
- OAuth2Service:
- version: 1.0.0
- ResourceService:
- version: 1.0.0
- RoleService:
- version: 1.0.0
- SmsService:
- version: 1.0.0
-
-# logging
-logging:
- level:
- # dao 开启 debug 模式 mybatis 输入 sql
- cn.iocoder.mall.admin.dao: debug
diff --git a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/SystemApplicationTest.java b/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/SystemApplicationTest.java
deleted file mode 100644
index d0acf0f3e..000000000
--- a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/SystemApplicationTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cn.iocoder.mall.admin;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.scheduling.annotation.EnableAsync;
-
-/**
- * 短信 application (test)
- *
- * @author Sin
- * @time 2019/5/16 10:53 AM
- */
-@SpringBootApplication(scanBasePackages = {"cn.iocoder.mall.admin"})
-@EnableAsync(proxyTargetClass = true)
-public class SystemApplicationTest {
-
- public static void main(String[] args) {
- SpringApplication.run(SystemApplicationTest.class);
- }
-}
diff --git a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/client/SmsAliYunClientTest.java b/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/client/SmsAliYunClientTest.java
deleted file mode 100644
index 66e9badd2..000000000
--- a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/client/SmsAliYunClientTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.iocoder.mall.admin.client;
-
-import cn.iocoder.mall.admin.SystemApplicationTest;
-import com.google.common.collect.ImmutableMap;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-/**
- * 阿里云 短信 test
- *
- * @author Sin
- * @time 2019/5/26 10:08 AM
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = SystemApplicationTest.class)
-public class SmsAliYunClientTest {
-
- @Autowired
- private SmsAliYunClient smsAliYunClient;
-
- @Test
- public void singleSendTest() {
- String sign = "阿里云短信测试专用";
- String mobile = "13302926050";
- String templateCode = "SMS_137110043";
- String template = "验证码#code#,您正在进行身份验证,打死不要告诉别人哦!";
- smsAliYunClient.singleSend(mobile, sign, templateCode,
- template, ImmutableMap.of("code", "8888"));
- }
-}
diff --git a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/client/SmsYunPianClientTest.java b/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/client/SmsYunPianClientTest.java
deleted file mode 100644
index 36b604586..000000000
--- a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/client/SmsYunPianClientTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cn.iocoder.mall.admin.client;
-
-import cn.iocoder.mall.admin.SystemApplicationTest;
-import com.google.common.collect.ImmutableMap;
-import org.assertj.core.util.Lists;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-/**
- * 短信 sms client test
- *
- * @author Sin
- * @time 2019/5/25 12:46 PM
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = SystemApplicationTest.class)
-public class SmsYunPianClientTest {
-
- @Autowired
- private SmsYunPianClient smsYunPianClient;
-
- private String sign = null;
-
- @Before
- public void setup() {
- sign = "悦跑运动";
- }
-
- @Test
- public void sendMobileTest() {
- String mobile = "13302926050";
- String template = "您的验证码是#code#,打死也不告诉别人哦。";
- smsYunPianClient.singleSend(mobile, sign, null,
- template, ImmutableMap.of("code", "1111"));
- }
-
- @Test
- public void batchSendTest() {
- String mobile = "13302926050";
- String template = "您的验证码是#code#,打死也不告诉别人哦。";
- smsYunPianClient.batchSend(Lists.newArrayList(mobile), sign, null,
- template, ImmutableMap.of("code", "2222"));
- }
-}
diff --git a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SmsServiceImplTest.java b/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SmsServiceImplTest.java
deleted file mode 100644
index 9b9c1e64f..000000000
--- a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SmsServiceImplTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package cn.iocoder.mall.admin.service;
-
-import cn.iocoder.common.framework.exception.ServiceException;
-import cn.iocoder.mall.admin.SystemApplicationTest;
-import cn.iocoder.mall.system.api.SmsService;
-import cn.iocoder.mall.system.api.bo.sms.SmsSignBO;
-import cn.iocoder.mall.system.api.constant.SmsPlatformEnum;
-import cn.iocoder.mall.system.api.constant.SmsTypeEnum;
-import com.google.common.collect.ImmutableMap;
-import org.assertj.core.util.Lists;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.jupiter.api.Assertions;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-/**
- * 短信 test
- *
- * @author Sin
- * @time 2019/5/16 10:52 AM
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = SystemApplicationTest.class)
-public class SmsServiceImplTest {
-
- @Autowired
- private SmsService smsService;
-
- @Test
- public void createSignTest() {
-// smsService.addSign("悦跑运动", SmsPlatformEnum.YunPian.getValue());
- smsService.addSign("登录确认验证码", SmsPlatformEnum.AliYun.getValue());
- }
-
- @Test
- public void getSignTest() {
- SmsSignBO smsSignBO = smsService.getSign(3);
- Assert.assertNotNull("不能为空!", smsSignBO);
- }
-
- @Test
- public void updateSignTest() {
- String oldSign = "悦跑运动2";
- String newSign = "悦跑运动";
- smsService.updateSign(3, newSign, SmsPlatformEnum.YunPian.getValue());
- SmsSignBO smsSignBO = smsService.getSign(3);
- Assert.assertTrue("更新不成功!", smsSignBO.getSign().equals(newSign));
- }
-
- @Test
- public void deletedSignTest() {
- smsService.deleteSign(3);
- Assertions.assertThrows(ServiceException.class, () -> {
- smsService.getSign(3);
- });
- }
-
- @Test
- public void createTemplateTest() {
- Integer sign = 4;
- String templateCode = "SMS_137110043";
- String template = "验证码#code#,您正在登录,若非本人操作,请勿泄露。";
- smsService.addTemplate(
- sign,
- templateCode,
- template,
- SmsPlatformEnum.AliYun.getValue(),
- SmsTypeEnum.VERIFICATION_CODE.getValue());
- }
-
- @Test
- public void singleSendTest() {
- String mobile = "13302926050";
- Integer templateId = 7;
- smsService.singleSend(mobile, templateId, ImmutableMap.of("code", "8888"));
- }
-
- @Test
- public void batchSendTest() {
- String mobile = "13302926050";
- Integer templateId = 7;
- smsService.batchSend(Lists.newArrayList(mobile), templateId, ImmutableMap.of("code", "8888"));
- }
-}
diff --git a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SystemLogServiceImplTest.java b/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SystemLogServiceImplTest.java
deleted file mode 100644
index cb4bd9df2..000000000
--- a/归档/moved/system/system-service-impl/src/test/java/cn/iocoder/mall/admin/service/SystemLogServiceImplTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package cn.iocoder.mall.admin.service;
-
-import cn.iocoder.mall.system.api.SystemLogService;
-import cn.iocoder.mall.system.api.bo.systemlog.AccessLogPageBO;
-import cn.iocoder.mall.system.api.dto.systemlog.AccessLogPageDTO;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-/**
- * @author:ycjx
- * @descriptio
- * @create:2019-06-23 18:08
- */
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = SystemLogServiceImplTest.class)
-public class SystemLogServiceImplTest {
-
- @Autowired
- private SystemLogService systemLogService;
-
- @Test
- public void getAccessLogPageTest(){
- AccessLogPageDTO accessLogPageDTO = new AccessLogPageDTO();
- accessLogPageDTO.setPageNo(1);
- accessLogPageDTO.setPageSize(10);
- AccessLogPageBO accessLogPage = systemLogService.getAccessLogPage(accessLogPageDTO);
- System.out.println(accessLogPage.getTotal());
-
- }
-
-
-}
diff --git a/归档/moved/system/system-start/pom.xml b/归档/moved/system/system-start/pom.xml
deleted file mode 100644
index 4e403bd56..000000000
--- a/归档/moved/system/system-start/pom.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
- system
- cn.iocoder.mall
- 1.0-SNAPSHOT
-
- 4.0.0
-
- system-start
-
-
-
-
- cn.iocoder.mall
- common-framework
- 1.0-SNAPSHOT
-
-
- cn.iocoder.mall
- mall-spring-boot
- 1.0-SNAPSHOT
-
-
- cn.iocoder.mall
- system-service-impl
- 1.0-SNAPSHOT
-
-
- cn.iocoder.mall
- system-sdk
- 1.0-SNAPSHOT
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
- io.springfox
- springfox-swagger2
-
-
- com.github.xiaoymin
- swagger-bootstrap-ui
-
-
-
-
- com.qiniu
- qiniu-java-sdk
-
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-sentinel
-
-
-
-
- de.codecentric
- spring-boot-admin-starter-client
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
- io.micrometer
- micrometer-registry-prometheus
-
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
-
-
-
diff --git a/归档/moved/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/FileController.java b/归档/moved/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/FileController.java
deleted file mode 100644
index 5c3455130..000000000
--- a/归档/moved/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/FileController.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.iocoder.mall.system.application.controller.admins;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import com.qiniu.util.Auth;
-import io.swagger.annotations.Api;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequestMapping("admins/file")
-@Api("文件模块")
-public class FileController {
-
- private Logger logger = LoggerFactory.getLogger(getClass());
-
- @Autowired
- private Auth auth;
- @Value("${qiniu.bucket}")
- private String bucket;
-
- @GetMapping("/get-qiniu-token")
- public CommonResult getQiniuToken() {
- String token = auth.uploadToken(bucket);
- logger.info("[qiniu_token][token({}) get]", token);
- return CommonResult.success(token);
- }
-
-}
diff --git a/归档/moved/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsSignController.java b/归档/moved/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsSignController.java
deleted file mode 100644
index 62fa02c4a..000000000
--- a/归档/moved/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsSignController.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package cn.iocoder.mall.system.application.controller.admins;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.mall.system.api.SmsService;
-import cn.iocoder.mall.system.api.bo.sms.PageSmsSignBO;
-import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsSignDTO;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 短信服务
- *
- * @author Sin
- * @time 2019/5/26 12:26 PM
- */
-@RestController
-@RequestMapping("admins/sms/sign")
-@Api("短信服务(签名)")
-public class SmsSignController {
-
- @Autowired
- private SmsService smsService;
-
- @GetMapping("page")
- @ApiOperation("签名-page")
- public CommonResult pageSign(@Validated PageQuerySmsSignDTO querySmsSignDTO) {
- return CommonResult.success(smsService.pageSmsSign(querySmsSignDTO));
- }
-
- @PostMapping("add")
- @ApiOperation("签名-添加")
- public CommonResult addSign(@RequestParam("sign") String sign,
- @RequestParam("platform") Integer platform) {
- smsService.addSign(sign, platform);
- return CommonResult.success(null);
- }
-
- @PutMapping("update")
- @ApiOperation("签名-更新")
- public CommonResult updateSign(@RequestParam("id") Integer id,
- @RequestParam("sign") String sign,
- @RequestParam("platform") Integer platform) {
- smsService.updateSign(id, sign, platform);
- return CommonResult.success(null);
- }
-
- @DeleteMapping("deleted")
- @ApiOperation("签名-删除")
- public CommonResult deletedSign(@RequestParam("id") Integer id) {
- smsService.deleteSign(id);
- return CommonResult.success(null);
- }
-}
diff --git a/归档/moved/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsTemplateController.java b/归档/moved/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsTemplateController.java
deleted file mode 100644
index d0f000d9d..000000000
--- a/归档/moved/system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/SmsTemplateController.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package cn.iocoder.mall.system.application.controller.admins;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.mall.system.api.SmsService;
-import cn.iocoder.mall.system.api.bo.sms.PageSmsTemplateBO;
-import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsTemplateDTO;
-import cn.iocoder.mall.system.application.po.sms.SmsTemplateAddPO;
-import cn.iocoder.mall.system.application.po.sms.SmsTemplateUpdatePO;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 短信服务
- *
- * @author Sin
- * @time 2019/5/26 12:26 PM
- */
-@RestController
-@RequestMapping("admins/sms/template")
-@Api("短信服务(短信模板)")
-public class SmsTemplateController {
-
- @Autowired
- private SmsService smsService;
-
- @GetMapping("page")
- @ApiOperation("短信模板-page")
- public CommonResult pageSign(PageQuerySmsTemplateDTO pageQuerySmsTemplateDTO) {
- return CommonResult.success(smsService.pageSmsTemplate(pageQuerySmsTemplateDTO));
- }
-
- @PostMapping("add")
- @ApiOperation("短信模板-添加")
- public CommonResult addSign(SmsTemplateAddPO smsTemplateAddPO) {
- smsService.addTemplate(
- smsTemplateAddPO.getSmsSignId(),
- smsTemplateAddPO.getTemplateCode(),
- smsTemplateAddPO.getTemplate(),
- smsTemplateAddPO.getPlatform(),
- smsTemplateAddPO.getSmsType());
- return CommonResult.success(null);
- }
-
- @PutMapping("update")
- @ApiOperation("短信模板-更新")
- public CommonResult updateSign(SmsTemplateUpdatePO smsTemplateUpdatePO) {
- smsService.updateTemplate(
- smsTemplateUpdatePO.getId(),
- smsTemplateUpdatePO.getSmsSignId(),
- smsTemplateUpdatePO.getTemplateCode(),
- smsTemplateUpdatePO.getTemplate(),
- smsTemplateUpdatePO.getPlatform(),
- smsTemplateUpdatePO.getSmsType());
- return CommonResult.success(null);
- }
-
- @DeleteMapping("deleted")
- @ApiOperation("短信模板-删除")
- public CommonResult deletedSign(@RequestParam("id") Integer id) {
- smsService.deleteTemplate(id);
- return CommonResult.success(null);
- }
-}
diff --git a/归档/moved/system/system-start/src/main/resources/application.yaml b/归档/moved/system/system-start/src/main/resources/application.yaml
deleted file mode 100644
index b06d085a5..000000000
--- a/归档/moved/system/system-start/src/main/resources/application.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-spring:
- application:
- name: admin-application
-
- # Spring Cloud 配置项
- cloud:
- # Spring Cloud Sentinel 配置项
- sentinel:
- transport:
- dashboard: s1.iocoder.cn:12088 # Sentinel Dashboard 服务地址
- eager: true # 项目启动时,直接连接到 Sentinel
-
-# server
-server:
- port: 18083
- servlet:
- context-path: /admin-api/
-
-admins:
- security:
- ignore_urls: /admin-api/admins/passport/login, /admin-api/admins/file/get-qiniu-token
-
-# qiniu
-qiniu:
- access-key: YldfyUC7OewoWM63TPYTairqnq8GMJvNek9EGoID
- secret-key: zZ7Q8wwZRyaklVvkyLmVydA4WygOBqtc_gTYzalS
- bucket: onemall
-
-swagger:
- enable: true # 暂时不去掉
- title: 管理员子系统
- description: 管理员子系统
- version: 1.0.0
- base-package: cn.iocoder.mall.admin.application.controller
diff --git a/归档/system-service-project/pom.xml b/归档/system-service-project/pom.xml
deleted file mode 100644
index be2f0674d..000000000
--- a/归档/system-service-project/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
- onemall
- cn.iocoder.mall
- 1.0-SNAPSHOT
-
- 4.0.0
-
- system-service-project
- pom
-
- system-service-api
- system-service-app
- system-service-integration-test
-
-
-
-
-
-
- cn.iocoder.mall
- mall-dependencies
- 1.0-SNAPSHOT
- pom
- import
-
-
-
- cn.iocoder.mall
- common-framework
- 1.0-SNAPSHOT
-
-
-
-
- cn.iocoder.mall
- system-service-api
- 1.0-SNAPSHOT
-
-
-
-
-
diff --git a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/ErrorCodeFeign.java b/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/ErrorCodeFeign.java
deleted file mode 100644
index a06510136..000000000
--- a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/ErrorCodeFeign.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package cn.iocoder.mall.systemservice.rpc.errorcode;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.common.framework.vo.PageResult;
-import cn.iocoder.mall.systemservice.rpc.errorcode.dto.ErrorCodeAutoGenerateDTO;
-import cn.iocoder.mall.systemservice.rpc.errorcode.dto.ErrorCodeCreateDTO;
-import cn.iocoder.mall.systemservice.rpc.errorcode.dto.ErrorCodePageDTO;
-import cn.iocoder.mall.systemservice.rpc.errorcode.dto.ErrorCodeUpdateDTO;
-import cn.iocoder.mall.systemservice.rpc.errorcode.vo.ErrorCodeVO;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.Date;
-import java.util.List;
-
-/**
-* 部门 Rpc 接口
-*/
-@FeignClient("system-service")
-public interface ErrorCodeFeign {
-
- @GetMapping("/system/errorcode/listErrorCodes")
- public CommonResult> listErrorCodes(@RequestParam("group") String group, @RequestParam("minUpdateTime") Date minUpdateTime) ;
-
- @PostMapping("/system/errorcode/autoGenerateErrorCodes")
- public CommonResult autoGenerateErrorCodes(@RequestBody List autoGenerateDTOs);
-
- @PostMapping("/system/errorcode/createErrorCode")
- public CommonResult createErrorCode(@RequestBody ErrorCodeCreateDTO createDTO) ;
-
- @PostMapping("/system/errorcode/updateErrorCode")
- public CommonResult updateErrorCode(@RequestBody ErrorCodeUpdateDTO updateDTO) ;
-
- @GetMapping("/system/errorcode/deleteErrorCode")
- public CommonResult deleteErrorCode(@RequestParam("errorCodeId")Integer errorCodeId) ;
-
- @GetMapping("/system/errorcode/getErrorCode")
- public CommonResult getErrorCode(@RequestParam("errorCodeId")Integer errorCodeId) ;
-
- @GetMapping("/system/errorcode/listErrorCodesByIds")
- public CommonResult> listErrorCodes(@RequestParam("errorCodeIds")List errorCodeIds) ;
-
- @PostMapping("/system/errorcode/pageErrorCode")
- public CommonResult> pageErrorCode(@RequestBody ErrorCodePageDTO pageDTO);
-
-}
diff --git a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodeAutoGenerateDTO.java b/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodeAutoGenerateDTO.java
deleted file mode 100644
index 155c7af86..000000000
--- a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodeAutoGenerateDTO.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.iocoder.mall.systemservice.rpc.errorcode.dto;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-
-/**
- * 错误码自动生成 DTO
- */
-@Data
-@Accessors(chain = true)
-public class ErrorCodeAutoGenerateDTO implements Serializable {
-
- /**
- * 错误码编码
- */
- @NotNull(message = "错误码编码不能为空")
- private Integer code;
- /**
- * 错误码错误提示
- */
- @NotEmpty(message = "错误码错误提示不能为空")
- private String message;
- /**
- * 错误码分组
- */
- @NotNull(message = "错误码分组不能为空")
- private String group;
-
-}
diff --git a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodeCreateDTO.java b/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodeCreateDTO.java
deleted file mode 100644
index 116853802..000000000
--- a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodeCreateDTO.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package cn.iocoder.mall.systemservice.rpc.errorcode.dto;
-
-import cn.iocoder.common.framework.validator.InEnum;
-import cn.iocoder.mall.systemservice.enums.errorcode.ErrorCodeTypeEnum;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-
-/**
-* 错误码创建 DTO
-*/
-@Data
-@Accessors(chain = true)
-public class ErrorCodeCreateDTO implements Serializable {
-
- /**
- * 错误码编码
- */
- @NotNull(message = "错误码编码不能为空")
- private Integer code;
- /**
- * 错误码错误提示
- */
- @NotEmpty(message = "错误码错误提示不能为空")
- private String message;
- /**
- * 错误码类型
- */
- @NotNull(message = "错误码类型不能为空")
- @InEnum(value = ErrorCodeTypeEnum.class, message = "错误码类型必须是 {value}")
- private Integer type;
- /**
- * 错误码分组
- */
- @NotNull(message = "错误码分组不能为空")
- private String group;
- /**
- * 错误码备注
- */
- private String memo;
-
-}
diff --git a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodePageDTO.java b/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodePageDTO.java
deleted file mode 100644
index b071c6bf8..000000000
--- a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodePageDTO.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cn.iocoder.mall.systemservice.rpc.errorcode.dto;
-
-import cn.iocoder.common.framework.vo.PageParam;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
-* 错误码分页 DTO
-*/
-@Data
-@EqualsAndHashCode(callSuper = true)
-@Accessors(chain = true)
-public class ErrorCodePageDTO extends PageParam {
-
- /**
- * 错误码编码
- */
- private Integer code;
- /**
- * 错误码错误提示
- *
- * 模糊匹配
- */
- private String message;
- /**
- * 错误码分组
- *
- * 模糊匹配
- */
- private String group;
-
-}
diff --git a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodeUpdateDTO.java b/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodeUpdateDTO.java
deleted file mode 100644
index 293784904..000000000
--- a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/dto/ErrorCodeUpdateDTO.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package cn.iocoder.mall.systemservice.rpc.errorcode.dto;
-
-import cn.iocoder.common.framework.validator.InEnum;
-import cn.iocoder.mall.systemservice.enums.errorcode.ErrorCodeTypeEnum;
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-
-/**
-* 错误码更新 DTO
-*/
-@Data
-@Accessors(chain = true)
-public class ErrorCodeUpdateDTO implements Serializable {
-
- /**
- * 错误码编号
- */
- @NotNull(message = "错误码编号不能为空")
- private Integer id;
- /**
- * 错误码编码
- */
- @NotNull(message = "错误码编码不能为空")
- private Integer code;
- /**
- * 错误码错误提示
- */
- private String message;
- /**
- * 错误码类型
- */
- @InEnum(value = ErrorCodeTypeEnum.class, message = "错误码类型必须是 {value}")
- private Integer type;
- /**
- * 错误码分组
- */
- private String group;
- /**
- * 错误码备注
- */
- private String memo;
-
-}
diff --git a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/vo/ErrorCodeVO.java b/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/vo/ErrorCodeVO.java
deleted file mode 100644
index a6f83e7ac..000000000
--- a/归档/system-service-project/system-service-api/src/main/java/cn/iocoder/mall/systemservice/rpc/errorcode/vo/ErrorCodeVO.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package cn.iocoder.mall.systemservice.rpc.errorcode.vo;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 错误码 VO
- */
-@Data
-@Accessors(chain = true)
-public class ErrorCodeVO implements Serializable {
-
- /**
- * 错误码编号
- */
- private Integer id;
- /**
- * 错误码编码
- */
- private Integer code;
- /**
- * 错误码错误提示
- */
- private String message;
- /**
- * 错误码类型
- */
- private Integer type;
- /**
- * 错误码分组
- */
- private String group;
- /**
- * 错误码备注
- */
- private String memo;
- /**
- * 创建时间
- */
- private Date createTime;
- /**
- * 最后更新时间
- */
- private Date updateTime;
-
-}
diff --git a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/AdminController.java b/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/AdminController.java
deleted file mode 100644
index 4eb7ab379..000000000
--- a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/AdminController.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package cn.iocoder.mall.systemservice.controller;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.common.framework.vo.PageResult;
-import cn.iocoder.mall.systemservice.manager.admin.AdminManager;
-import cn.iocoder.mall.systemservice.rpc.admin.dto.AdminCreateDTO;
-import cn.iocoder.mall.systemservice.rpc.admin.dto.AdminPageDTO;
-import cn.iocoder.mall.systemservice.rpc.admin.dto.AdminUpdateDTO;
-import cn.iocoder.mall.systemservice.rpc.admin.dto.AdminVerifyPasswordDTO;
-import cn.iocoder.mall.systemservice.rpc.admin.vo.AdminVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import static cn.iocoder.common.framework.vo.CommonResult.success;
-
-/**
- * Title:
- * Description:
- *
- * @author zhuyang
- * @version 1.0 2021/10/11
- */
-@RestController
-@RequestMapping("/system/admin")
-public class AdminController {
- @Autowired
- private AdminManager adminManager;
-
-
- @PostMapping("verifyPassword")
- public CommonResult verifyPassword(@RequestBody AdminVerifyPasswordDTO verifyPasswordDTO) {
- return success(adminManager.verifyPassword(verifyPasswordDTO));
- }
-
- @PostMapping("createAdmin")
- public CommonResult createAdmin(@RequestBody AdminCreateDTO createDTO) {
- AdminVO adminVO = adminManager.createAdmin(createDTO);
- return success(adminVO.getId());
- }
-
- @PostMapping("updateAdmin")
- public CommonResult updateAdmin(@RequestBody AdminUpdateDTO updateDTO) {
- adminManager.updateAdmin(updateDTO);
- return success(true);
- }
-
- @PostMapping("pageAdmin")
- public CommonResult> pageAdmin(@RequestBody AdminPageDTO pageDTO) {
- return success(adminManager.pageAdmin(pageDTO));
- }
-
- @GetMapping("getAdmin")
- public CommonResult getAdmin(@RequestParam("adminId") Integer adminId) {
- return success(adminManager.getAdmin(adminId));
- }
-
-}
diff --git a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/DataDictController.java b/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/DataDictController.java
deleted file mode 100644
index d4fee5fe1..000000000
--- a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/DataDictController.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package cn.iocoder.mall.systemservice.controller;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.mall.systemservice.manager.datadict.DataDictManager;
-import cn.iocoder.mall.systemservice.rpc.datadict.dto.DataDictCreateDTO;
-import cn.iocoder.mall.systemservice.rpc.datadict.dto.DataDictUpdateDTO;
-import cn.iocoder.mall.systemservice.rpc.datadict.vo.DataDictVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-import static cn.iocoder.common.framework.vo.CommonResult.success;
-
-/**
- * Title:
- * Description:
- *
- * @author zhuyang
- * @version 1.0 2021/10/11
- */
-@RestController
-@RequestMapping("/system/datadict")
-public class DataDictController {
- @Autowired
- private DataDictManager dataDictManager;
-
- @PostMapping("createDataDict")
- public CommonResult createDataDict(@RequestBody DataDictCreateDTO createDTO) {
- return success(dataDictManager.createDataDict(createDTO));
- }
-
- @PostMapping("updateDataDict")
- public CommonResult updateDataDict(@RequestBody DataDictUpdateDTO updateDTO) {
- dataDictManager.updateDataDict(updateDTO);
- return success(true);
- }
-
- @GetMapping("deleteDataDict")
- public CommonResult deleteDataDict(@RequestParam("dataDictId") Integer dataDictId) {
- dataDictManager.deleteDataDict(dataDictId);
- return success(true);
- }
-
- @GetMapping("getDataDict")
- public CommonResult getDataDict(@RequestParam("dataDictId") Integer dataDictId) {
- return success(dataDictManager.getDataDict(dataDictId));
- }
-
- @GetMapping("listAllDataDicts")
- public CommonResult> listDataDicts() {
- return success(dataDictManager.listDataDicts());
- }
-
- @GetMapping("listDataDicts")
- public CommonResult> listDataDicts(@RequestParam("dataDictIds") List dataDictIds) {
- return success(dataDictManager.listDataDicts(dataDictIds));
- }
-
-}
diff --git a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/DepartmentController.java b/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/DepartmentController.java
deleted file mode 100644
index c45b7942f..000000000
--- a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/DepartmentController.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package cn.iocoder.mall.systemservice.controller;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.mall.systemservice.manager.admin.DepartmentManager;
-import cn.iocoder.mall.systemservice.rpc.admin.dto.*;
-import cn.iocoder.mall.systemservice.rpc.admin.vo.DepartmentVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Collection;
-import java.util.List;
-
-import static cn.iocoder.common.framework.vo.CommonResult.success;
-
-/**
- * Title:
- * Description:
- *
- * @author zhuyang
- * @version 1.0 2021/10/11
- */
-@RestController
-@RequestMapping("/system/department")
-public class DepartmentController {
- @Autowired
- private DepartmentManager departmentManager;
-
- @PostMapping("createDepartment")
- public CommonResult createDepartment(@RequestBody DepartmentCreateDTO createDTO) {
- return success(departmentManager.createDepartment(createDTO));
- }
-
- @PostMapping("updateDepartment")
- public CommonResult updateDepartment(@RequestBody DepartmentUpdateDTO updateDTO) {
- departmentManager.updateDepartment(updateDTO);
- return success(true);
- }
-
- @GetMapping("deleteDepartment")
- public CommonResult deleteDepartment(@RequestParam("departmentId")Integer departmentId) {
- departmentManager.deleteDepartment(departmentId);
- return success(true);
- }
-
- @GetMapping("getDepartment")
- public CommonResult getDepartment(@RequestParam("departmentId") Integer departmentId) {
- return success(departmentManager.getDepartment(departmentId));
- }
-
- @GetMapping("listDepartments")
- public CommonResult> listDepartments(@RequestParam("departmentIds")Collection departmentIds) {
- return success(departmentManager.listDepartments(departmentIds));
- }
-
- @GetMapping("listAllDepartments")
- public CommonResult> listDepartments() {
- return success(departmentManager.listDepartments());
- }
-
-
-}
diff --git a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/ErrorCodeController.java b/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/ErrorCodeController.java
deleted file mode 100644
index 8f8822061..000000000
--- a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/ErrorCodeController.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package cn.iocoder.mall.systemservice.controller;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.common.framework.vo.PageResult;
-import cn.iocoder.mall.systemservice.manager.errorcode.ErrorCodeManager;
-import cn.iocoder.mall.systemservice.rpc.errorcode.dto.ErrorCodeAutoGenerateDTO;
-import cn.iocoder.mall.systemservice.rpc.errorcode.dto.ErrorCodeCreateDTO;
-import cn.iocoder.mall.systemservice.rpc.errorcode.dto.ErrorCodePageDTO;
-import cn.iocoder.mall.systemservice.rpc.errorcode.dto.ErrorCodeUpdateDTO;
-import cn.iocoder.mall.systemservice.rpc.errorcode.vo.ErrorCodeVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Date;
-import java.util.List;
-
-import static cn.iocoder.common.framework.vo.CommonResult.success;
-
-/**
- * Title:
- * Description:
- *
- * @author zhuyang
- * @version 1.0 2021/10/11
- */
-@RestController
-@RequestMapping("/system/errorcode")
-public class ErrorCodeController {
- @Autowired
- private ErrorCodeManager errorCodeManager;
-
- @GetMapping("listErrorCodes")
- public CommonResult> listErrorCodes(@RequestParam("group") String group, @RequestParam("minUpdateTime") Date minUpdateTime) {
- return success(errorCodeManager.listErrorCodes(group, minUpdateTime));
- }
-
- @PostMapping("autoGenerateErrorCodes")
- public CommonResult autoGenerateErrorCodes(@RequestBody List autoGenerateDTOs) {
- errorCodeManager.autoGenerateErrorCodes(autoGenerateDTOs);
- return success(true);
- }
-
- @PostMapping("createErrorCode")
- public CommonResult createErrorCode(@RequestBody ErrorCodeCreateDTO createDTO) {
- return success(errorCodeManager.createErrorCode(createDTO));
- }
-
- @PostMapping("updateErrorCode")
- public CommonResult updateErrorCode(@RequestBody ErrorCodeUpdateDTO updateDTO) {
- errorCodeManager.updateErrorCode(updateDTO);
- return success(true);
- }
-
- @GetMapping("deleteErrorCode")
- public CommonResult deleteErrorCode(@RequestParam("errorCodeId")Integer errorCodeId) {
- errorCodeManager.deleteErrorCode(errorCodeId);
- return success(true);
- }
-
- @GetMapping("getErrorCode")
- public CommonResult getErrorCode(@RequestParam("errorCodeId")Integer errorCodeId) {
- return success(errorCodeManager.getErrorCode(errorCodeId));
- }
-
- @GetMapping("listErrorCodesByIds")
- public CommonResult> listErrorCodes(@RequestParam("errorCodeIds")List errorCodeIds) {
- return success(errorCodeManager.listErrorCodes(errorCodeIds));
- }
-
- @PostMapping("pageErrorCode")
- public CommonResult> pageErrorCode(@RequestBody ErrorCodePageDTO pageDTO) {
- return success(errorCodeManager.pageErrorCode(pageDTO));
- }
-}
diff --git a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/OAuthController.java b/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/OAuthController.java
deleted file mode 100644
index 21822383b..000000000
--- a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/OAuthController.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package cn.iocoder.mall.systemservice.controller;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.mall.systemservice.rpc.oauth.dto.OAuth2AccessTokenRespDTO;
-import cn.iocoder.mall.systemservice.rpc.oauth.dto.OAuth2CreateAccessTokenReqDTO;
-import cn.iocoder.mall.systemservice.rpc.oauth.dto.OAuth2RefreshAccessTokenReqDTO;
-import cn.iocoder.mall.systemservice.rpc.oauth.dto.OAuth2RemoveTokenByUserReqDTO;
-import cn.iocoder.mall.systemservice.service.oauth.OAuth2Service;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import static cn.iocoder.common.framework.vo.CommonResult.success;
-
-/**
- * Title:
- * Description:
- *
- * @author zhuyang
- * @version 1.0 2021/10/11
- */
-@RestController
-@RequestMapping("/system/oauth")
-public class OAuthController {
-
- @Autowired
- private OAuth2Service oAuth2Service;
-
- @PostMapping("createAccessToken")
- public CommonResult createAccessToken(@RequestBody OAuth2CreateAccessTokenReqDTO createAccessTokenDTO) {
- return success(oAuth2Service.createAccessToken(createAccessTokenDTO));
- }
-
- @GetMapping("checkAccessToken")
- public CommonResult checkAccessToken(@RequestParam("accessToken") String accessToken) {
- return success(oAuth2Service.checkAccessToken(accessToken));
- }
-
- @PostMapping("refreshAccessToken")
- public CommonResult refreshAccessToken(@RequestBody OAuth2RefreshAccessTokenReqDTO refreshAccessTokenDTO) {
- return success(oAuth2Service.refreshAccessToken(refreshAccessTokenDTO));
- }
-
- @PostMapping("removeToken")
- public CommonResult removeToken(@RequestBody OAuth2RemoveTokenByUserReqDTO removeTokenDTO) {
- oAuth2Service.removeToken(removeTokenDTO);
- return success(true);
- }
-}
diff --git a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/PermissionController.java b/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/PermissionController.java
deleted file mode 100644
index 64e939262..000000000
--- a/归档/system-service-project/system-service-app/src/main/java/cn/iocoder/mall/systemservice/controller/PermissionController.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package cn.iocoder.mall.systemservice.controller;
-
-import cn.iocoder.common.framework.vo.CommonResult;
-import cn.iocoder.mall.systemservice.manager.permission.PermissionManager;
-import cn.iocoder.mall.systemservice.rpc.permission.dto.PermissionAssignAdminRoleDTO;
-import cn.iocoder.mall.systemservice.rpc.permission.dto.PermissionAssignRoleResourceDTO;
-import cn.iocoder.mall.systemservice.rpc.permission.dto.PermissionCheckDTO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import static cn.iocoder.common.framework.vo.CommonResult.success;
-
-/**
- * Title:
- * Description:
- *
- * @author zhuyang
- * @version 1.0 2021/10/11
- */
-@RestController
-@RequestMapping("/system/permission")
-public class PermissionController {
- @Autowired
- private PermissionManager permissionManager;
-
- @GetMapping("listRoleResourceIds")
- public CommonResult> listRoleResourceIds(@RequestParam("roleId")Integer roleId) {
- return success(permissionManager.listRoleResourceIds(roleId));
- }
-
- @PostMapping("assignRoleResource")
- public CommonResult assignRoleResource(@RequestBody PermissionAssignRoleResourceDTO assignRoleResourceDTO) {
- permissionManager.assignRoleResource(assignRoleResourceDTO);
- return success(true);
- }
-
- @GetMapping("listAdminRoleIds")
- public CommonResult> listAdminRoleIds(@RequestParam("adminId")Integer adminId) {
- return success(permissionManager.listAdminRoleIds(adminId));
- }
-
- @GetMapping("mapAdminRoleIds")
- public CommonResult