将 onemall 老代码,统一到归档目录,后续不断迁移移除
This commit is contained in:
44
归档/moved/system/system-service-api/pom.xml
Normal file
44
归档/moved/system/system-service-api/pom.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>system</artifactId>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<artifactId>system-service-api</artifactId>
|
||||
<dependencies>
|
||||
<!-- Mall 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>common-framework</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId> <!-- use mapstruct-jdk8 for Java 8 or higher -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-jdk8</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,44 @@
|
||||
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<DataDictBO> 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<DataDictBO> getDataDict(String dictKey, Object dictValue);
|
||||
|
||||
CommonResult<List<DataDictBO>> getDataDict(String dictKey);
|
||||
|
||||
/**
|
||||
* 获取字典值 - 多个
|
||||
*
|
||||
* 注意:dictValueList:? 为了方便调用,会自动转换为 Set:String
|
||||
*
|
||||
* @param dictKey
|
||||
* @param dictValueList
|
||||
* @return
|
||||
*/
|
||||
CommonResult<List<DataDictBO>> getDataDictList(String dictKey, Collection<?> dictValueList);
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
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<String, String> params);
|
||||
|
||||
/**
|
||||
* 短信发送 - 批量
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
void batchSend(List<String> mobileList, Integer smsTemplateId, Map<String, String> params);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
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<Sign> data;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class Sign {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 短信平台
|
||||
*/
|
||||
private Integer platform;
|
||||
/**
|
||||
* 签名名称
|
||||
*/
|
||||
private String sign;
|
||||
/**
|
||||
* 审核状态
|
||||
* <p>
|
||||
* - 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
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<Template> 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user