feat: 更改数据库主键id生成策略
This commit is contained in:
@@ -3,8 +3,8 @@ package com.schisandra.auth.application.config;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.schisandra.auth.application.context.SmsConfigContext;
|
||||
import com.schisandra.auth.common.redis.RedisUtil;
|
||||
import com.schisandra.auth.infra.entity.SmsConfigInfo;
|
||||
import com.schisandra.auth.infra.rpc.SmsConfigRpc;
|
||||
import com.schisandra.auth.infra.entity.ConfigInfo;
|
||||
import com.schisandra.auth.infra.rpc.ConfigRpc;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.sms4j.core.factory.SmsFactory;
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
@@ -24,7 +24,7 @@ public class SmsInitConfig implements SmartLifecycle {
|
||||
@Resource
|
||||
SmsReadConfig smsReadConfig;
|
||||
@Resource
|
||||
SmsConfigRpc smsConfigRpc;
|
||||
ConfigRpc configRpc;
|
||||
|
||||
@Resource
|
||||
RedisUtil redisUtil;
|
||||
@@ -32,7 +32,7 @@ public class SmsInitConfig implements SmartLifecycle {
|
||||
private final String smsConfigPrefix="sys.config";
|
||||
|
||||
public void init() {
|
||||
SmsConfigInfo configInfo = smsConfigRpc.getConfigInfo(SmsConfigContext.SMS_CONFIG_KEY);
|
||||
ConfigInfo configInfo = configRpc.getConfigInfo(SmsConfigContext.SMS_CONFIG_KEY);
|
||||
if (ObjectUtil.isEmpty(configInfo)){
|
||||
log.info("短信配置获取失败!");
|
||||
}
|
||||
|
@@ -1,43 +0,0 @@
|
||||
package com.schisandra.auth.application.convert;
|
||||
|
||||
import com.schisandra.auth.application.dto.SchisandraSmsConfigDTO;
|
||||
import com.schisandra.auth.domain.bo.SchisandraSmsConfigBO;
|
||||
import com.schisandra.auth.infra.basic.entity.SchisandraSmsConfig;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (SchisandraSmsConfig)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-08 20:09:54
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface SchisandraSmsConfigDTOConvert {
|
||||
|
||||
SchisandraSmsConfigDTOConvert INSTANCE = Mappers.getMapper(SchisandraSmsConfigDTOConvert.class);
|
||||
|
||||
/**
|
||||
* @description: 将bo转换为实体
|
||||
* @param: schisandraSmsConfigDTO
|
||||
* @return com.schisandra.auth.infra.basic.bo.SchisandraAuthUser
|
||||
* @author schisandra
|
||||
* @date: 2024/3/21 23:13
|
||||
*/
|
||||
SchisandraSmsConfigBO convertDTOToBO(SchisandraSmsConfigDTO schisandraSmsConfigDTO);
|
||||
|
||||
/**
|
||||
* @description: 将实体转换为bo
|
||||
* @param: schisandraSmsConfigBO
|
||||
* @return com.schisandra.auth.domain.bo.SchisandraAuthUserBO
|
||||
* @author schisandra
|
||||
* @date: 2024/3/21 23:13
|
||||
*/
|
||||
SchisandraSmsConfigDTO convertBOToDTO(SchisandraSmsConfigBO schisandraSmsConfigBO);
|
||||
|
||||
List<SchisandraSmsConfigDTO> convertBOToDTOList(List<SchisandraSmsConfigBO> schisandraSmsConfigBO);
|
||||
|
||||
}
|
||||
|
@@ -1,10 +1,8 @@
|
||||
package com.schisandra.auth.application.handler.sms;
|
||||
|
||||
import com.schisandra.auth.application.convert.SchisandraSmsConfigDTOConvert;
|
||||
import com.schisandra.auth.application.dto.SchisandraSmsConfigDTO;
|
||||
import com.schisandra.auth.common.enums.SmsSupplierType;
|
||||
import com.schisandra.auth.domain.bo.SchisandraSmsConfigBO;
|
||||
import com.schisandra.auth.domain.service.SchisandraSmsConfigDomainService;
|
||||
import com.schisandra.auth.infra.entity.SmsConfigInfo;
|
||||
import com.schisandra.auth.infra.rpc.SmsConfigRpc;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.dromara.sms4j.aliyun.config.AlibabaConfig;
|
||||
@@ -25,8 +23,9 @@ import javax.annotation.Resource;
|
||||
@Component
|
||||
@Slf4j
|
||||
public class AlibabaSmsHandler implements SchisandraSmsTypeHandler{
|
||||
|
||||
@Resource
|
||||
SchisandraSmsConfigDomainService schisandraSmsConfigDomainService;
|
||||
private SmsConfigRpc smsConfigRpc;
|
||||
@Override
|
||||
public SmsSupplierType getHandlerType() {
|
||||
return SmsSupplierType.ALIBABA;
|
||||
@@ -34,22 +33,21 @@ public class AlibabaSmsHandler implements SchisandraSmsTypeHandler{
|
||||
|
||||
@Override
|
||||
public BaseConfig addConfig(String configId) {
|
||||
SchisandraSmsConfigBO schisandraSmsConfigBO = schisandraSmsConfigDomainService.queryByConfigId(configId);
|
||||
SchisandraSmsConfigDTO schisandraSmsConfigDTO = SchisandraSmsConfigDTOConvert.INSTANCE.convertBOToDTO(schisandraSmsConfigBO);
|
||||
if (ObjectUtils.isEmpty(schisandraSmsConfigDTO)){
|
||||
SmsConfigInfo smsConfigInfo = smsConfigRpc.getSmsConfigInfo(configId);
|
||||
if (ObjectUtils.isEmpty(smsConfigInfo)){
|
||||
log.error("阿里云短信配置信息获取失败");
|
||||
return null;
|
||||
}
|
||||
AlibabaConfig alibabaConfig=new AlibabaConfig();
|
||||
alibabaConfig.setConfigId(schisandraSmsConfigDTO.getConfigId());
|
||||
alibabaConfig.setRequestUrl(schisandraSmsConfigDTO.getRequestUrl());
|
||||
alibabaConfig.setAccessKeyId(schisandraSmsConfigDTO.getAccessKeyId());
|
||||
alibabaConfig.setAccessKeySecret(schisandraSmsConfigDTO.getAccessKeySecret());
|
||||
alibabaConfig.setSignature(schisandraSmsConfigDTO.getSignature());
|
||||
alibabaConfig.setTemplateId(schisandraSmsConfigDTO.getTemplateId());
|
||||
alibabaConfig.setTemplateName(schisandraSmsConfigDTO.getTemplateName());
|
||||
alibabaConfig.setSdkAppId(schisandraSmsConfigDTO.getSdkAppId());
|
||||
alibabaConfig.setMaximum(Math.toIntExact(schisandraSmsConfigDTO.getMaximum()));
|
||||
alibabaConfig.setConfigId(smsConfigInfo.getConfigId());
|
||||
alibabaConfig.setRequestUrl(smsConfigInfo.getRequestUrl());
|
||||
alibabaConfig.setAccessKeyId(smsConfigInfo.getAccessKeyId());
|
||||
alibabaConfig.setAccessKeySecret(smsConfigInfo.getAccessKeySecret());
|
||||
alibabaConfig.setSignature(smsConfigInfo.getSignature());
|
||||
alibabaConfig.setTemplateId(smsConfigInfo.getTemplateId());
|
||||
alibabaConfig.setTemplateName(smsConfigInfo.getTemplateName());
|
||||
alibabaConfig.setSdkAppId(smsConfigInfo.getSdkAppId());
|
||||
alibabaConfig.setMaximum(Math.toIntExact(smsConfigInfo.getMaximum()));
|
||||
return alibabaConfig;
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,8 @@
|
||||
package com.schisandra.auth.application.handler.sms;
|
||||
|
||||
import com.schisandra.auth.application.convert.SchisandraSmsConfigDTOConvert;
|
||||
import com.schisandra.auth.application.dto.SchisandraSmsConfigDTO;
|
||||
import com.schisandra.auth.common.enums.SmsSupplierType;
|
||||
import com.schisandra.auth.domain.bo.SchisandraSmsConfigBO;
|
||||
import com.schisandra.auth.domain.service.SchisandraSmsConfigDomainService;
|
||||
import com.schisandra.auth.infra.entity.SmsConfigInfo;
|
||||
import com.schisandra.auth.infra.rpc.SmsConfigRpc;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.dromara.sms4j.provider.config.BaseConfig;
|
||||
@@ -24,40 +22,41 @@ import javax.annotation.Resource;
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class TencentSmsHandler implements SchisandraSmsTypeHandler{
|
||||
@Resource
|
||||
SchisandraSmsConfigDomainService schisandraSmsConfigDomainService;
|
||||
public class TencentSmsHandler implements SchisandraSmsTypeHandler {
|
||||
|
||||
@Override
|
||||
public SmsSupplierType getHandlerType() {
|
||||
return SmsSupplierType.TENCENT;
|
||||
}
|
||||
|
||||
@Resource
|
||||
private SmsConfigRpc smsConfigRpc;
|
||||
|
||||
@Override
|
||||
public BaseConfig addConfig(String configId) {
|
||||
SchisandraSmsConfigBO schisandraSmsConfigBO = schisandraSmsConfigDomainService.queryByConfigId(configId);
|
||||
SchisandraSmsConfigDTO schisandraSmsConfigDTO = SchisandraSmsConfigDTOConvert.INSTANCE.convertBOToDTO(schisandraSmsConfigBO);
|
||||
if (ObjectUtils.isEmpty(schisandraSmsConfigDTO)){
|
||||
SmsConfigInfo smsConfigInfo = smsConfigRpc.getSmsConfigInfo(configId);
|
||||
if (ObjectUtils.isEmpty(smsConfigInfo)) {
|
||||
log.error("腾讯短信配置信息获取失败");
|
||||
return null;
|
||||
}
|
||||
TencentConfig tencentConfig=new TencentConfig();
|
||||
tencentConfig.setAccessKeyId(schisandraSmsConfigDTO.getAccessKeyId());
|
||||
tencentConfig.setAccessKeySecret(schisandraSmsConfigDTO.getAccessKeySecret());
|
||||
tencentConfig.setConfigId(schisandraSmsConfigDTO.getConfigId());
|
||||
tencentConfig.setAction(schisandraSmsConfigDTO.getAction());
|
||||
tencentConfig.setService(schisandraSmsConfigDTO.getService());
|
||||
tencentConfig.setRequestUrl(schisandraSmsConfigDTO.getRequestUrl());
|
||||
tencentConfig.setConnTimeout(schisandraSmsConfigDTO.getConnTimeout());
|
||||
tencentConfig.setTerritory(schisandraSmsConfigDTO.getRegion());
|
||||
tencentConfig.setVersion(schisandraSmsConfigDTO.getVersion());
|
||||
tencentConfig.setTemplateId(schisandraSmsConfigDTO.getTemplateId());
|
||||
tencentConfig.setSignature(schisandraSmsConfigDTO.getSignature());
|
||||
tencentConfig.setSdkAppId(schisandraSmsConfigDTO.getSdkAppId());
|
||||
tencentConfig.setMaxRetries(schisandraSmsConfigDTO.getMaxRetries());
|
||||
tencentConfig.setMaximum(Math.toIntExact(schisandraSmsConfigDTO.getMaximum()));
|
||||
tencentConfig.setWeight(schisandraSmsConfigDTO.getWeight());
|
||||
tencentConfig.setMaximum(Math.toIntExact(schisandraSmsConfigDTO.getMaximum()));
|
||||
tencentConfig.setMaxRetries(Math.toIntExact(schisandraSmsConfigDTO.getMaxRetries()));
|
||||
TencentConfig tencentConfig = new TencentConfig();
|
||||
tencentConfig.setAccessKeyId(smsConfigInfo.getAccessKeyId());
|
||||
tencentConfig.setAccessKeySecret(smsConfigInfo.getAccessKeySecret());
|
||||
tencentConfig.setConfigId(smsConfigInfo.getConfigId());
|
||||
tencentConfig.setAction(smsConfigInfo.getAction());
|
||||
tencentConfig.setService(smsConfigInfo.getService());
|
||||
tencentConfig.setRequestUrl(smsConfigInfo.getRequestUrl());
|
||||
tencentConfig.setConnTimeout(smsConfigInfo.getConnTimeout());
|
||||
tencentConfig.setTerritory(smsConfigInfo.getRegion());
|
||||
tencentConfig.setVersion(smsConfigInfo.getVersion());
|
||||
tencentConfig.setTemplateId(smsConfigInfo.getTemplateId());
|
||||
tencentConfig.setSignature(smsConfigInfo.getSignature());
|
||||
tencentConfig.setSdkAppId(smsConfigInfo.getSdkAppId());
|
||||
tencentConfig.setMaxRetries(smsConfigInfo.getMaxRetries());
|
||||
tencentConfig.setMaximum(Math.toIntExact(smsConfigInfo.getMaximum()));
|
||||
tencentConfig.setWeight(smsConfigInfo.getWeight());
|
||||
tencentConfig.setMaximum(Math.toIntExact(smsConfigInfo.getMaximum()));
|
||||
tencentConfig.setMaxRetries(Math.toIntExact(smsConfigInfo.getMaxRetries()));
|
||||
return tencentConfig;
|
||||
}
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ public enum OauthType {
|
||||
/**
|
||||
* System
|
||||
*/
|
||||
SYSTEM("system");
|
||||
SYSTEM("SYSTEM");
|
||||
|
||||
public String type;
|
||||
|
||||
|
@@ -1,9 +1,7 @@
|
||||
package com.schisandra.auth.domain.convert;
|
||||
|
||||
import com.schisandra.auth.domain.bo.SchisandraAuthPermissionBO;
|
||||
import com.schisandra.auth.domain.bo.SchisandraAuthRoleBO;
|
||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthPermission;
|
||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthRole;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
@Mapper(componentModel = "spring")
|
||||
|
@@ -1,48 +0,0 @@
|
||||
package com.schisandra.auth.domain.convert;
|
||||
|
||||
import com.schisandra.auth.domain.bo.SchisandraAuthUserBO;
|
||||
import com.schisandra.auth.domain.bo.SchisandraSmsConfigBO;
|
||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthUser;
|
||||
import com.schisandra.auth.infra.basic.entity.SchisandraSmsConfig;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (SchisandraSmsConfig)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-08 20:09:54
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface SchisandraSmsConfigBOConvert {
|
||||
|
||||
SchisandraSmsConfigBOConvert INSTANCE = Mappers.getMapper(SchisandraSmsConfigBOConvert.class);
|
||||
|
||||
/**
|
||||
* @description 将bo转换为实体
|
||||
* @param schisandraSmsConfigBO
|
||||
* @return com.schisandra.auth.infra.basic.bo.SchisandraAuthUser
|
||||
* @author schisandra
|
||||
* @date 2024/3/21 23:13
|
||||
*/
|
||||
SchisandraSmsConfig convertBOToEntity(SchisandraSmsConfigBO schisandraSmsConfigBO);
|
||||
|
||||
/**
|
||||
* @description 将实体转换为bo
|
||||
* @param schisandraSmsConfig
|
||||
* @return com.schisandra.auth.domain.bo.SchisandraAuthUserBO
|
||||
* @author schisandra
|
||||
* @date 2024/3/21 23:13
|
||||
*/
|
||||
SchisandraSmsConfigBO convertEntityToBO(SchisandraSmsConfig schisandraSmsConfig);
|
||||
|
||||
List<SchisandraSmsConfigBO> convertEntityToBOList(List<SchisandraSmsConfig> schisandraSmsConfigs);
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,17 +0,0 @@
|
||||
package com.schisandra.auth.domain.service;
|
||||
|
||||
|
||||
import com.schisandra.auth.domain.bo.SchisandraSmsConfigBO;
|
||||
|
||||
/**
|
||||
* 用户领域service
|
||||
*
|
||||
* @author schisandra
|
||||
* @date 2024/3/21
|
||||
*/
|
||||
public interface SchisandraSmsConfigDomainService {
|
||||
|
||||
SchisandraSmsConfigBO queryByConfigId(String configId);
|
||||
|
||||
}
|
||||
|
@@ -195,8 +195,7 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
||||
*/
|
||||
@Override
|
||||
public Object deleteById(Long id) {
|
||||
boolean flag = schisandraAuthUserService.deleteById(id);
|
||||
return flag;
|
||||
return schisandraAuthUserService.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,25 +0,0 @@
|
||||
package com.schisandra.auth.domain.service.impl;
|
||||
|
||||
import com.schisandra.auth.domain.bo.SchisandraSmsConfigBO;
|
||||
import com.schisandra.auth.domain.convert.SchisandraSmsConfigBOConvert;
|
||||
import com.schisandra.auth.domain.service.SchisandraSmsConfigDomainService;
|
||||
import com.schisandra.auth.infra.basic.entity.SchisandraSmsConfig;
|
||||
import com.schisandra.auth.infra.basic.service.SchisandraSmsConfigService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SchisandraSmsConfigDomainServiceImpl implements SchisandraSmsConfigDomainService {
|
||||
@Resource
|
||||
private SchisandraSmsConfigService schisandraSmsConfigService;
|
||||
|
||||
@Override
|
||||
public SchisandraSmsConfigBO queryByConfigId(String configId) {
|
||||
SchisandraSmsConfig schisandraSmsConfig= schisandraSmsConfigService.queryByConfigId(configId);
|
||||
return SchisandraSmsConfigBOConvert.INSTANCE.convertEntityToBO(schisandraSmsConfig);
|
||||
}
|
||||
|
||||
}
|
@@ -11,7 +11,8 @@ import org.springframework.stereotype.Repository;
|
||||
* @since 2024-04-11 13:00:10
|
||||
*/
|
||||
@Repository
|
||||
public interface SchisandraAuthPermissionDao extends BaseMapper<SchisandraAuthPermission> {
|
||||
public interface
|
||||
SchisandraAuthPermissionDao extends BaseMapper<SchisandraAuthPermission> {
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,18 +0,0 @@
|
||||
package com.schisandra.auth.infra.basic.dao;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.schisandra.auth.infra.basic.entity.SchisandraSmsConfig;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* (SchisandraSmsConfig)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-11 15:47:58
|
||||
*/
|
||||
@Repository
|
||||
public interface SchisandraSmsConfigDao extends BaseMapper<SchisandraSmsConfig> {
|
||||
|
||||
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -19,7 +20,7 @@ import java.util.Date;
|
||||
@Table(value = "schisandra_auth_permission")
|
||||
public class SchisandraAuthPermission implements Serializable {
|
||||
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraAuthRole implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraAuthRolePermission implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -5,6 +5,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -23,7 +24,7 @@ public class SchisandraAuthUser implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -5,6 +5,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -23,7 +24,7 @@ public class SchisandraAuthUserRole implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -97,8 +97,7 @@ public class SchisandraAuthUserServiceImpl implements SchisandraAuthUserService
|
||||
@Override
|
||||
public SchisandraAuthUser selectByUuidAndType(String uuid, String type) {
|
||||
return schisandraAuthUserDao.selectOneByCondition(SchisandraAuthUserTableDef.SCHISANDRA_AUTH_USER.UUID.eq(uuid)
|
||||
.and(SchisandraAuthUserTableDef.SCHISANDRA_AUTH_USER.SOURCE.eq(type)
|
||||
.and(SchisandraAuthUserTableDef.SCHISANDRA_AUTH_USER.IS_DELETED.eq(0))));
|
||||
.and(SchisandraAuthUserTableDef.SCHISANDRA_AUTH_USER.SOURCE.eq(type)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,44 @@
|
||||
package com.schisandra.auth.infra.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Classname ConfigInfo
|
||||
* @BelongsProject: schisandra-cloud-storage
|
||||
* @BelongsPackage: com.schisandra.auth.application.rpc.bo
|
||||
* @Author: landaiqing
|
||||
* @CreateTime: 2024-05-11 23:50
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ConfigInfo implements Serializable {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 参数键
|
||||
*/
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
*/
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
* 系统内置(0是 1否)
|
||||
*/
|
||||
private Integer configType;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
}
|
@@ -5,40 +5,203 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Classname SmsConfigInfo
|
||||
* @BelongsProject: schisandra-cloud-storage
|
||||
* @BelongsPackage: com.schisandra.auth.application.rpc.bo
|
||||
* @Author: landaiqing
|
||||
* @CreateTime: 2024-05-11 23:50
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
* 短信配置信息表 dto
|
||||
*
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Data
|
||||
public class SmsConfigInfo implements Serializable {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
* id
|
||||
*/
|
||||
private String configName;
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 参数键
|
||||
* 配置id
|
||||
*/
|
||||
private String configKey;
|
||||
private String configId;
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
* 请求地址
|
||||
*/
|
||||
private String configValue;
|
||||
private String requestUrl;
|
||||
|
||||
/**
|
||||
* 系统内置(0是 1否)
|
||||
* 模板变量名称
|
||||
*/
|
||||
private Integer configType;
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
* 接口名称
|
||||
*/
|
||||
private String remarks;
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 地域信息
|
||||
*/
|
||||
private String region;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String accessKeyId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String accessKeySecret;
|
||||
|
||||
/**
|
||||
* 厂商名称标识
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 短信签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String sdkAppId;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
private Integer weight;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
private Integer retryInterval;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
private Integer maxRetries;
|
||||
|
||||
/**
|
||||
* 厂商的发送数量上限,默认不设置上限
|
||||
*/
|
||||
private Long maximum;
|
||||
|
||||
/**
|
||||
* REST API Base URL
|
||||
*/
|
||||
private String baseUrl;
|
||||
|
||||
/**
|
||||
* 请求域名
|
||||
*/
|
||||
private String serverIp;
|
||||
|
||||
/**
|
||||
* 请求端口
|
||||
*/
|
||||
private Integer serverPort;
|
||||
|
||||
/**
|
||||
* 国内短信签名通道号
|
||||
*/
|
||||
private String sender;
|
||||
|
||||
/**
|
||||
* 短信状态报告接收地
|
||||
*/
|
||||
private String statusCallBack;
|
||||
|
||||
/**
|
||||
* APP接入地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 模板短信请求地址
|
||||
*/
|
||||
private String templateUrl;
|
||||
|
||||
/**
|
||||
* 验证码短信请求地址
|
||||
*/
|
||||
private String codeUrl;
|
||||
|
||||
/**
|
||||
* 验证码验证请求地址
|
||||
*/
|
||||
private String verifyUrl;
|
||||
|
||||
/**
|
||||
* 是否需要支持短信上行。true:需要,false:不需要false
|
||||
*/
|
||||
private String needUp;
|
||||
|
||||
/**
|
||||
* 请求超时时间
|
||||
*/
|
||||
private Integer connTimeout;
|
||||
|
||||
/**
|
||||
* 是否为简易模式
|
||||
*/
|
||||
private String isSimple;
|
||||
|
||||
/**
|
||||
* 短信发送后将向这个地址推送(运营商返回的)发送报告
|
||||
*/
|
||||
private String callbackUrl;
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
private Integer mchId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer appId;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 单发链接
|
||||
*/
|
||||
private String singleMsgUrl;
|
||||
|
||||
/**
|
||||
* 群发链接
|
||||
*/
|
||||
private String massMsgUrl;
|
||||
|
||||
/**
|
||||
* 签名ID
|
||||
*/
|
||||
private String signatureId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String extraJson;
|
||||
|
||||
/**
|
||||
* 服务名
|
||||
*/
|
||||
private String service;
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,41 @@
|
||||
package com.schisandra.auth.infra.rpc;
|
||||
|
||||
|
||||
import com.schisandra.auth.infra.entity.ConfigInfo;
|
||||
import com.schisandra.system.api.SchisandraSystemFeignService;
|
||||
import com.schisandra.system.entity.Result;
|
||||
import com.schisandra.system.entity.SchisandraSysConfigDTO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Classname ConfigRpc
|
||||
* @BelongsProject: schisandra-cloud-storage
|
||||
* @BelongsPackage: com.schisandra.auth.application.rpc
|
||||
* @Author: landaiqing
|
||||
* @CreateTime: 2024-05-11 23:44
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Component
|
||||
public class ConfigRpc {
|
||||
@Resource
|
||||
private SchisandraSystemFeignService schisandraSystemFeignService;
|
||||
|
||||
public ConfigInfo getConfigInfo(String key) {
|
||||
Result<SchisandraSysConfigDTO> result = schisandraSystemFeignService.getConfigByKey(key);
|
||||
ConfigInfo configInfo = new ConfigInfo();
|
||||
if (!result.getSuccess()) {
|
||||
return configInfo;
|
||||
}
|
||||
SchisandraSysConfigDTO data = result.getData();
|
||||
configInfo.setConfigKey(data.getConfigKey());
|
||||
configInfo.setConfigName(data.getConfigName());
|
||||
configInfo.setConfigValue(data.getConfigValue());
|
||||
configInfo.setRemarks(data.getRemarks());
|
||||
configInfo.setConfigType(data.getConfigType());
|
||||
return configInfo;
|
||||
}
|
||||
|
||||
}
|
@@ -1,10 +1,9 @@
|
||||
package com.schisandra.auth.infra.rpc;
|
||||
|
||||
|
||||
import com.schisandra.auth.infra.entity.SmsConfigInfo;
|
||||
import com.schisandra.system.api.SchisandraSystemFeignService;
|
||||
import com.schisandra.system.entity.Result;
|
||||
import com.schisandra.system.entity.SchisandraSysConfigDTO;
|
||||
import com.schisandra.system.entity.SchisandraSmsConfigDTO;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -12,9 +11,9 @@ import javax.annotation.Resource;
|
||||
/**
|
||||
* @Classname SmsConfigRpc
|
||||
* @BelongsProject: schisandra-cloud-storage
|
||||
* @BelongsPackage: com.schisandra.auth.application.rpc
|
||||
* @BelongsPackage: com.schisandra.auth.infra.rpc
|
||||
* @Author: landaiqing
|
||||
* @CreateTime: 2024-05-11 23:44
|
||||
* @CreateTime: 2024-06-19 22:39
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@@ -23,19 +22,49 @@ public class SmsConfigRpc {
|
||||
@Resource
|
||||
private SchisandraSystemFeignService schisandraSystemFeignService;
|
||||
|
||||
public SmsConfigInfo getConfigInfo(String key) {
|
||||
Result<SchisandraSysConfigDTO> result = schisandraSystemFeignService.getConfigByKey(key);
|
||||
public SmsConfigInfo getSmsConfigInfo(String configId) {
|
||||
Result<SchisandraSmsConfigDTO> result = schisandraSystemFeignService.querySmsByConfigId(configId);
|
||||
SmsConfigInfo smsConfigInfo = new SmsConfigInfo();
|
||||
if (!result.getSuccess()) {
|
||||
return smsConfigInfo;
|
||||
}
|
||||
SchisandraSysConfigDTO data = result.getData();
|
||||
smsConfigInfo.setConfigKey(data.getConfigKey());
|
||||
smsConfigInfo.setConfigName(data.getConfigName());
|
||||
smsConfigInfo.setConfigValue(data.getConfigValue());
|
||||
smsConfigInfo.setRemarks(data.getRemarks());
|
||||
smsConfigInfo.setConfigType(data.getConfigType());
|
||||
SchisandraSmsConfigDTO data = result.getData();
|
||||
smsConfigInfo.setConfigId(data.getConfigId());
|
||||
smsConfigInfo.setAction(data.getAction());
|
||||
smsConfigInfo.setAppId(data.getAppId());
|
||||
smsConfigInfo.setAppKey(data.getAppKey());
|
||||
smsConfigInfo.setBaseUrl(data.getBaseUrl());
|
||||
smsConfigInfo.setCodeUrl(data.getCodeUrl());
|
||||
smsConfigInfo.setAccessKeyId(data.getAccessKeyId());
|
||||
smsConfigInfo.setAccessKeySecret(data.getAccessKeySecret());
|
||||
smsConfigInfo.setCallbackUrl(data.getCallbackUrl());
|
||||
smsConfigInfo.setConnTimeout(data.getConnTimeout());
|
||||
smsConfigInfo.setIsSimple(data.getIsSimple());
|
||||
smsConfigInfo.setExtraJson(data.getExtraJson());
|
||||
smsConfigInfo.setMaximum(data.getMaximum());
|
||||
smsConfigInfo.setMaxRetries(data.getMaxRetries());
|
||||
smsConfigInfo.setMassMsgUrl(data.getMassMsgUrl());
|
||||
smsConfigInfo.setMchId(data.getMchId());
|
||||
smsConfigInfo.setNeedUp(data.getNeedUp());
|
||||
smsConfigInfo.setRegion(data.getRegion());
|
||||
smsConfigInfo.setRequestUrl(data.getRequestUrl());
|
||||
smsConfigInfo.setRetryInterval(data.getRetryInterval());
|
||||
smsConfigInfo.setSdkAppId(data.getSdkAppId());
|
||||
smsConfigInfo.setSender(data.getSender());
|
||||
smsConfigInfo.setServerPort(data.getServerPort());
|
||||
smsConfigInfo.setService(data.getService());
|
||||
smsConfigInfo.setSignature(data.getSignature());
|
||||
smsConfigInfo.setSignatureId(data.getSignatureId());
|
||||
smsConfigInfo.setSupplier(data.getSupplier());
|
||||
smsConfigInfo.setStatusCallBack(data.getStatusCallBack());
|
||||
smsConfigInfo.setTemplateUrl(data.getTemplateUrl());
|
||||
smsConfigInfo.setTemplateName(data.getTemplateName());
|
||||
smsConfigInfo.setTemplateId(data.getTemplateId());
|
||||
smsConfigInfo.setUrl(data.getUrl());
|
||||
smsConfigInfo.setVerifyUrl(data.getVerifyUrl());
|
||||
smsConfigInfo.setVersion(data.getVersion());
|
||||
smsConfigInfo.setWeight(data.getWeight());
|
||||
return smsConfigInfo;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraSmsConfigDao">
|
||||
|
||||
<resultMap type="com.schisandra.auth.infra.basic.entity.SchisandraSmsConfig" id="SchisandraSmsConfigMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="configId" column="config_id" jdbcType="VARCHAR"/>
|
||||
<result property="requestUrl" column="request_url" jdbcType="VARCHAR"/>
|
||||
<result property="templateName" column="template_name" jdbcType="VARCHAR"/>
|
||||
<result property="action" column="action" jdbcType="VARCHAR"/>
|
||||
<result property="region" column="region" jdbcType="VARCHAR"/>
|
||||
<result property="accessKeyId" column="access_key_id" jdbcType="VARCHAR"/>
|
||||
<result property="accessKeySecret" column="access_key_secret" jdbcType="VARCHAR"/>
|
||||
<result property="supplier" column="supplier" jdbcType="VARCHAR"/>
|
||||
<result property="signature" column="signature" jdbcType="VARCHAR"/>
|
||||
<result property="sdkAppId" column="sdk_app_id" jdbcType="VARCHAR"/>
|
||||
<result property="templateId" column="template_id" jdbcType="VARCHAR"/>
|
||||
<result property="weight" column="weight" jdbcType="INTEGER"/>
|
||||
<result property="retryInterval" column="retry_interval" jdbcType="INTEGER"/>
|
||||
<result property="maxRetries" column="max_retries" jdbcType="INTEGER"/>
|
||||
<result property="maximum" column="maximum" jdbcType="INTEGER"/>
|
||||
<result property="baseUrl" column="base_url" jdbcType="VARCHAR"/>
|
||||
<result property="serverIp" column="server_ip" jdbcType="VARCHAR"/>
|
||||
<result property="serverPort" column="server_port" jdbcType="INTEGER"/>
|
||||
<result property="sender" column="sender" jdbcType="VARCHAR"/>
|
||||
<result property="statusCallBack" column="status_call_back" jdbcType="VARCHAR"/>
|
||||
<result property="url" column="url" jdbcType="VARCHAR"/>
|
||||
<result property="templateUrl" column="template_url" jdbcType="VARCHAR"/>
|
||||
<result property="codeUrl" column="code_url" jdbcType="VARCHAR"/>
|
||||
<result property="verifyUrl" column="verify_url" jdbcType="VARCHAR"/>
|
||||
<result property="needUp" column="need_up" jdbcType="VARCHAR"/>
|
||||
<result property="connTimeout" column="conn_timeout" jdbcType="INTEGER"/>
|
||||
<result property="isSimple" column="is_simple" jdbcType="VARCHAR"/>
|
||||
<result property="callbackUrl" column="callback_url" jdbcType="VARCHAR"/>
|
||||
<result property="mchId" column="mch_id" jdbcType="INTEGER"/>
|
||||
<result property="appKey" column="app_key" jdbcType="VARCHAR"/>
|
||||
<result property="appId" column="app_id" jdbcType="INTEGER"/>
|
||||
<result property="version" column="version" jdbcType="VARCHAR"/>
|
||||
<result property="singleMsgUrl" column="single_msg_url" jdbcType="VARCHAR"/>
|
||||
<result property="massMsgUrl" column="mass_msg_url" jdbcType="VARCHAR"/>
|
||||
<result property="signatureId" column="signature_Id" jdbcType="VARCHAR"/>
|
||||
<result property="createdBy" column="created_by" jdbcType="VARCHAR"/>
|
||||
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
<result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/>
|
||||
<result property="extraJson" column="extra_json" jdbcType="VARCHAR"/>
|
||||
<result property="service" column="service" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
@@ -88,7 +88,7 @@ mybatis-flex:
|
||||
global-config:
|
||||
print-banner: false
|
||||
key-config:
|
||||
key-type: auto
|
||||
key-type: generator
|
||||
normal-value-of-logic-delete: 0
|
||||
deleted-value-of-logic-delete: 1
|
||||
logic-delete-column: is_deleted
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# 数据库连接信息
|
||||
jdbc:
|
||||
dbName: schisandra-cloud-storage
|
||||
tableName: schisandra_oss_wangyi
|
||||
tableName: schisandra_sms_config
|
||||
url: jdbc:mysql://1.95.0.111:3306/
|
||||
username: root
|
||||
password: LDQ20020618xxx
|
||||
@@ -22,9 +22,9 @@ params:
|
||||
# 作者
|
||||
author: landaiqing
|
||||
# 模块
|
||||
module: oss
|
||||
module: system
|
||||
# controller 通用前缀
|
||||
api: /oss/wangyi
|
||||
api: /system/sms
|
||||
# 生成对象是否移除前缀
|
||||
removePre: false
|
||||
# 使用内置函数赋值给变量 FunctionUtils 中替换
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssAli implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssAws implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssBaidu implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssFtp implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssHuawei implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -20,49 +21,49 @@ import java.util.Date;
|
||||
public class SchisandraOssJd implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("base_path")
|
||||
private String basePath;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("bucket_name")
|
||||
private String bucketName;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("endpoint")
|
||||
private String endpoint;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("access_key")
|
||||
private String accessKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("secret_key")
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("region")
|
||||
private String region;
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssJdbc implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -20,13 +21,13 @@ import java.util.Date;
|
||||
public class SchisandraOssJdbcData implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("user_id")
|
||||
private Long userId;
|
||||
@@ -64,7 +65,7 @@ public class SchisandraOssJdbcData implements Serializable {
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
@Column(value = "is_deleted",isLogicDelete = true)
|
||||
@Column(value = "is_deleted", isLogicDelete = true)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,11 +23,11 @@ public class SchisandraOssJdbcStore implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("user_id")
|
||||
private Long userId;
|
||||
@@ -94,7 +95,7 @@ public class SchisandraOssJdbcStore implements Serializable {
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
@Column(value = "is_deleted",isLogicDelete = true)
|
||||
@Column(value = "is_deleted", isLogicDelete = true)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssJinshan implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@@ -167,7 +168,7 @@ public class SchisandraOssJinshan implements Serializable {
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
@Column(value = "is_deleted",isLogicDelete = true)
|
||||
@Column(value = "is_deleted", isLogicDelete = true)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -20,19 +21,19 @@ import java.util.Date;
|
||||
public class SchisandraOssLocal implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("base_path")
|
||||
private String basePath;
|
||||
@@ -70,7 +71,7 @@ public class SchisandraOssLocal implements Serializable {
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
@Column(value = "is_deleted",isLogicDelete = true)
|
||||
@Column(value = "is_deleted", isLogicDelete = true)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
|
@@ -5,6 +5,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -23,7 +24,7 @@ public class SchisandraOssMinio implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -20,67 +21,67 @@ import java.util.Date;
|
||||
public class SchisandraOssPingan implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("system_user_id")
|
||||
private Long systemUserId;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("user_agent")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("obs_url")
|
||||
private String obsUrl;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("obs_access_key")
|
||||
private String obsAccessKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("obs_secret")
|
||||
private String obsSecret;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("base_path")
|
||||
private String basePath;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("bucket_name")
|
||||
private String bucketName;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("represent_path_in_key")
|
||||
private String representPathInKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("domain_name")
|
||||
private String domainName;
|
||||
@@ -130,7 +131,7 @@ public class SchisandraOssPingan implements Serializable {
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
@Column(value = "is_deleted",isLogicDelete = true)
|
||||
@Column(value = "is_deleted", isLogicDelete = true)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -20,49 +21,49 @@ import java.util.Date;
|
||||
public class SchisandraOssQingyun implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("endpoint")
|
||||
private String endpoint;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("access_key")
|
||||
private String accessKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("access_secret")
|
||||
private String accessSecret;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("bucket_name")
|
||||
private String bucketName;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("zone")
|
||||
private String zone;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Column("base_path")
|
||||
private String basePath;
|
||||
@@ -154,7 +155,7 @@ public class SchisandraOssQingyun implements Serializable {
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
@Column(value = "is_deleted",isLogicDelete = true)
|
||||
@Column(value = "is_deleted", isLogicDelete = true)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssQiniu implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssTencent implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@@ -202,7 +203,7 @@ public class SchisandraOssTencent implements Serializable {
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
@Column(value = "is_deleted",isLogicDelete = true)
|
||||
@Column(value = "is_deleted", isLogicDelete = true)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssUcloud implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssUp implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraOssWangyi implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -56,7 +56,7 @@ mybatis-flex:
|
||||
global-config:
|
||||
print-banner: false
|
||||
key-config:
|
||||
key-type: auto
|
||||
key-type: generator
|
||||
normal-value-of-logic-delete: 0
|
||||
deleted-value-of-logic-delete: 1
|
||||
logic-delete-column: is_deleted
|
||||
|
@@ -1,18 +1,21 @@
|
||||
package com.schisandra.system.api;
|
||||
|
||||
import com.schisandra.system.entity.Result;
|
||||
import com.schisandra.system.entity.SchisandraSmsConfigDTO;
|
||||
import com.schisandra.system.entity.SchisandraSysConfigDTO;
|
||||
import com.schisandra.system.entity.SchisandraSysOauthDTO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient("schisandra-cloud-storage-system")
|
||||
public interface SchisandraSystemFeignService {
|
||||
@PostMapping(value = "/system/getConfigByKey")
|
||||
Result<SchisandraSysConfigDTO> getConfigByKey(@RequestParam(value = "key") String key);
|
||||
|
||||
@PostMapping("/system/oauth/getOauthConfigByType")
|
||||
Result<SchisandraSysOauthDTO> getOauthConfigByType(@RequestParam("type") String type);
|
||||
|
||||
@PostMapping("/system/sms/querySmsByConfigId")
|
||||
Result<SchisandraSmsConfigDTO> querySmsByConfigId(@RequestParam(value = "configId") String configId);
|
||||
}
|
||||
|
@@ -1,182 +1,229 @@
|
||||
package com.schisandra.auth.infra.basic.entity;
|
||||
package com.schisandra.system.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (SchisandraSmsConfig)实体类
|
||||
* 短信配置信息表 dto
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-11 15:47:59
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Data
|
||||
@Table(value = "schisandra_sms_config")
|
||||
public class SchisandraSmsConfig implements Serializable {
|
||||
public class SchisandraSmsConfigDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 配置id
|
||||
*/
|
||||
private String configId;
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
*/
|
||||
private String requestUrl;
|
||||
|
||||
/**
|
||||
* 模板变量名称
|
||||
*/
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 接口名称
|
||||
*/
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 地域信息
|
||||
*/
|
||||
private String region;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String accessKeyId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String accessKeySecret;
|
||||
|
||||
/**
|
||||
* 厂商名称标识
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 短信签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String sdkAppId;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
private Integer weight;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
private Integer retryInterval;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
private Integer maxRetries;
|
||||
|
||||
/**
|
||||
* 厂商的发送数量上限,默认不设置上限
|
||||
*/
|
||||
private Long maximum;
|
||||
|
||||
/**
|
||||
* REST API Base URL
|
||||
*/
|
||||
private String baseUrl;
|
||||
|
||||
/**
|
||||
* 请求域名
|
||||
*/
|
||||
private String serverIp;
|
||||
|
||||
/**
|
||||
* 请求端口
|
||||
*/
|
||||
private Integer serverPort;
|
||||
|
||||
/**
|
||||
* 国内短信签名通道号
|
||||
*/
|
||||
private String sender;
|
||||
|
||||
/**
|
||||
* 短信状态报告接收地
|
||||
*/
|
||||
private String statusCallBack;
|
||||
|
||||
/**
|
||||
* APP接入地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 模板短信请求地址
|
||||
*/
|
||||
private String templateUrl;
|
||||
|
||||
/**
|
||||
* 验证码短信请求地址
|
||||
*/
|
||||
private String codeUrl;
|
||||
|
||||
/**
|
||||
* 验证码验证请求地址
|
||||
*/
|
||||
private String verifyUrl;
|
||||
|
||||
/**
|
||||
* 是否需要支持短信上行。true:需要,false:不需要false
|
||||
*/
|
||||
private String needUp;
|
||||
|
||||
/**
|
||||
* 请求超时时间
|
||||
*/
|
||||
private Integer connTimeout;
|
||||
|
||||
/**
|
||||
* 是否为简易模式
|
||||
*/
|
||||
private String isSimple;
|
||||
|
||||
/**
|
||||
* 短信发送后将向这个地址推送(运营商返回的)发送报告
|
||||
*/
|
||||
private String callbackUrl;
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
private Integer mchId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer appId;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 单发链接
|
||||
*/
|
||||
private String singleMsgUrl;
|
||||
|
||||
/**
|
||||
* 群发链接
|
||||
*/
|
||||
private String massMsgUrl;
|
||||
|
||||
/**
|
||||
* 签名ID
|
||||
*/
|
||||
private String signatureId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
@Column(isLogicDelete = true)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String extraJson;
|
||||
|
||||
/**
|
||||
* 服务名
|
||||
*/
|
@@ -0,0 +1,235 @@
|
||||
package com.schisandra.system.application.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.schisandra.system.application.convert.SchisandraSmsConfigDTOConverter;
|
||||
import com.schisandra.system.application.dto.SchisandraSmsConfigDTO;
|
||||
import com.schisandra.system.common.entity.Result;
|
||||
import com.schisandra.system.domain.bo.SchisandraSmsConfigBO;
|
||||
import com.schisandra.system.domain.service.SchisandraSmsConfigDomainService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 短信配置信息表 controller
|
||||
*
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/sms/")
|
||||
@Slf4j
|
||||
public class SchisandraSmsConfigController {
|
||||
|
||||
@Resource
|
||||
private SchisandraSmsConfigDomainService schisandraSmsConfigDomainService;
|
||||
|
||||
/**
|
||||
* 新增短信配置信息表
|
||||
*/
|
||||
@RequestMapping("add")
|
||||
public Result<Boolean> add(@RequestBody SchisandraSmsConfigDTO schisandraSmsConfigDTO) {
|
||||
|
||||
try {
|
||||
if (log.isInfoEnabled()) {
|
||||
log.info("SchisandraSmsConfigController.add.dto:{}", JSON.toJSONString(schisandraSmsConfigDTO));
|
||||
}
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getId(), "id不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getConfigId(), "配置id不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getRequestUrl(), "请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getTemplateName(), "模板变量名称不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAction(), "接口名称不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getRegion(), "地域信息不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAccessKeyId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAccessKeySecret(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSupplier(), "厂商名称标识不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSignature(), "短信签名不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSdkAppId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getTemplateId(), "模板ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getWeight(), "权重不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getRetryInterval(), "短信重试次数,默认0次不重试不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMaxRetries(), "短信重试次数,默认0次不重试不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMaximum(), "厂商的发送数量上限,默认不设置上限不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getBaseUrl(), "REST API Base URL不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getServerIp(), "请求域名不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getServerPort(), "请求端口不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSender(), "国内短信签名通道号不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getStatusCallBack(), "短信状态报告接收地不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getUrl(), "APP接入地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getTemplateUrl(), "模板短信请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCodeUrl(), "验证码短信请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getVerifyUrl(), "验证码验证请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getNeedUp(), "是否需要支持短信上行。true:需要,false:不需要false不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getConnTimeout(), "请求超时时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getIsSimple(), "是否为简易模式不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCallbackUrl(), "短信发送后将向这个地址推送(运营商返回的)发送报告不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMchId(), "企业ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAppKey(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAppId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getVersion(), "版本号不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSingleMsgUrl(), "单发链接不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMassMsgUrl(), "群发链接不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSignatureId(), "签名ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCreatedBy(), "创建人不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCreatedTime(), "创建时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getUpdateTime(), "更新时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getUpdateBy(), "更新人不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getExtraJson(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getService(), "服务名不能为空");
|
||||
SchisandraSmsConfigBO SchisandraSmsConfigBO = SchisandraSmsConfigDTOConverter.INSTANCE.convertDTOToBO(schisandraSmsConfigDTO);
|
||||
return Result.ok(schisandraSmsConfigDomainService.add(SchisandraSmsConfigBO));
|
||||
} catch (Exception e) {
|
||||
log.error("SchisandraSmsConfigController.register.error:{}", e.getMessage(), e);
|
||||
return Result.fail("新增短信配置信息表失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改短信配置信息表
|
||||
*/
|
||||
@RequestMapping("update")
|
||||
public Result<Boolean> update(@RequestBody SchisandraSmsConfigDTO schisandraSmsConfigDTO) {
|
||||
|
||||
try {
|
||||
if (log.isInfoEnabled()) {
|
||||
log.info("SchisandraSmsConfigController.update.dto:{}", JSON.toJSONString(schisandraSmsConfigDTO));
|
||||
}
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getId(), "id不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getConfigId(), "配置id不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getRequestUrl(), "请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getTemplateName(), "模板变量名称不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAction(), "接口名称不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getRegion(), "地域信息不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAccessKeyId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAccessKeySecret(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSupplier(), "厂商名称标识不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSignature(), "短信签名不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSdkAppId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getTemplateId(), "模板ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getWeight(), "权重不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getRetryInterval(), "短信重试次数,默认0次不重试不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMaxRetries(), "短信重试次数,默认0次不重试不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMaximum(), "厂商的发送数量上限,默认不设置上限不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getBaseUrl(), "REST API Base URL不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getServerIp(), "请求域名不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getServerPort(), "请求端口不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSender(), "国内短信签名通道号不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getStatusCallBack(), "短信状态报告接收地不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getUrl(), "APP接入地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getTemplateUrl(), "模板短信请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCodeUrl(), "验证码短信请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getVerifyUrl(), "验证码验证请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getNeedUp(), "是否需要支持短信上行。true:需要,false:不需要false不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getConnTimeout(), "请求超时时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getIsSimple(), "是否为简易模式不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCallbackUrl(), "短信发送后将向这个地址推送(运营商返回的)发送报告不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMchId(), "企业ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAppKey(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAppId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getVersion(), "版本号不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSingleMsgUrl(), "单发链接不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMassMsgUrl(), "群发链接不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSignatureId(), "签名ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCreatedBy(), "创建人不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCreatedTime(), "创建时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getUpdateTime(), "更新时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getUpdateBy(), "更新人不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getExtraJson(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getService(), "服务名不能为空");
|
||||
SchisandraSmsConfigBO schisandraSmsConfigBO = SchisandraSmsConfigDTOConverter.INSTANCE.convertDTOToBO(schisandraSmsConfigDTO);
|
||||
return Result.ok(schisandraSmsConfigDomainService.update(schisandraSmsConfigBO));
|
||||
} catch (Exception e) {
|
||||
log.error("SchisandraSmsConfigController.update.error:{}", e.getMessage(), e);
|
||||
return Result.fail("更新短信配置信息表信息失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除短信配置信息表
|
||||
*/
|
||||
@RequestMapping("delete")
|
||||
public Result<Boolean> delete(@RequestBody SchisandraSmsConfigDTO schisandraSmsConfigDTO) {
|
||||
|
||||
try {
|
||||
if (log.isInfoEnabled()) {
|
||||
log.info("SchisandraSmsConfigController.delete.dto:{}", JSON.toJSONString(schisandraSmsConfigDTO));
|
||||
}
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getId(), "id不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getConfigId(), "配置id不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getRequestUrl(), "请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getTemplateName(), "模板变量名称不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAction(), "接口名称不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getRegion(), "地域信息不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAccessKeyId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAccessKeySecret(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSupplier(), "厂商名称标识不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSignature(), "短信签名不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSdkAppId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getTemplateId(), "模板ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getWeight(), "权重不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getRetryInterval(), "短信重试次数,默认0次不重试不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMaxRetries(), "短信重试次数,默认0次不重试不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMaximum(), "厂商的发送数量上限,默认不设置上限不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getBaseUrl(), "REST API Base URL不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getServerIp(), "请求域名不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getServerPort(), "请求端口不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSender(), "国内短信签名通道号不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getStatusCallBack(), "短信状态报告接收地不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getUrl(), "APP接入地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getTemplateUrl(), "模板短信请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCodeUrl(), "验证码短信请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getVerifyUrl(), "验证码验证请求地址不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getNeedUp(), "是否需要支持短信上行。true:需要,false:不需要false不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getConnTimeout(), "请求超时时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getIsSimple(), "是否为简易模式不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCallbackUrl(), "短信发送后将向这个地址推送(运营商返回的)发送报告不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMchId(), "企业ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAppKey(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getAppId(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getVersion(), "版本号不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSingleMsgUrl(), "单发链接不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getMassMsgUrl(), "群发链接不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getSignatureId(), "签名ID不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCreatedBy(), "创建人不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getCreatedTime(), "创建时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getUpdateTime(), "更新时间不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getUpdateBy(), "更新人不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getIsDeleted(), "是否删除 0 未删除 1已删除不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getExtraJson(), "不能为空");
|
||||
Preconditions.checkNotNull(schisandraSmsConfigDTO.getService(), "服务名不能为空");
|
||||
SchisandraSmsConfigBO schisandraSmsConfigBO = SchisandraSmsConfigDTOConverter.INSTANCE.convertDTOToBO(schisandraSmsConfigDTO);
|
||||
return Result.ok(schisandraSmsConfigDomainService.delete(schisandraSmsConfigBO));
|
||||
} catch (Exception e) {
|
||||
log.error("SchisandraSmsConfigController.delete.error:{}", e.getMessage(), e);
|
||||
return Result.fail("删除短信配置信息表信息失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据短信厂商获取短信配置信息
|
||||
* @param: [configId]
|
||||
* @return: com.schisandra.system.common.entity.Result<com.schisandra.system.application.dto.SchisandraSmsConfigDTO>
|
||||
* @author: landaiqing
|
||||
* @date: 2024/6/19 22:36
|
||||
*/
|
||||
@PostMapping("querySmsByConfigId")
|
||||
public Result<SchisandraSmsConfigDTO> querySmsByConfigId(@RequestParam(value = "configId") String configId) {
|
||||
log.info("SchisandraSmsConfigController.querySmsByConfigId.configId:{}", configId);
|
||||
Preconditions.checkNotNull(configId, "短信configId不能为空");
|
||||
SchisandraSmsConfigBO schisandraSmsConfigBO = schisandraSmsConfigDomainService.queryByConfigId(configId);
|
||||
if (ObjectUtils.isEmpty(schisandraSmsConfigBO)) {
|
||||
return Result.fail("查询短信配置信息表信息失败");
|
||||
}
|
||||
SchisandraSmsConfigDTO schisandraSmsConfigDTO = SchisandraSmsConfigDTOConverter.INSTANCE.convertBOToDTO(schisandraSmsConfigBO);
|
||||
return Result.ok(schisandraSmsConfigDTO);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package com.schisandra.system.application.convert;
|
||||
|
||||
import com.schisandra.system.application.dto.SchisandraSmsConfigDTO;
|
||||
import com.schisandra.system.domain.bo.SchisandraSmsConfigBO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 短信配置信息表 dto转换器
|
||||
*
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Mapper
|
||||
public interface SchisandraSmsConfigDTOConverter {
|
||||
|
||||
SchisandraSmsConfigDTOConverter INSTANCE = Mappers.getMapper(SchisandraSmsConfigDTOConverter.class);
|
||||
|
||||
SchisandraSmsConfigBO convertDTOToBO(SchisandraSmsConfigDTO schisandraSmsConfigDTO);
|
||||
SchisandraSmsConfigDTO convertBOToDTO(SchisandraSmsConfigBO schisandraSmsConfigBO);
|
||||
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package com.schisandra.auth.application.dto;
|
||||
package com.schisandra.system.application.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -6,10 +6,10 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (SchisandraSmsConfig)实体类
|
||||
* 短信配置信息表 dto
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-08 20:09:54
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Data
|
||||
public class SchisandraSmsConfigDTO implements Serializable {
|
||||
@@ -18,160 +18,216 @@ public class SchisandraSmsConfigDTO implements Serializable {
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 配置id
|
||||
*/
|
||||
private String configId;
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
*/
|
||||
private String requestUrl;
|
||||
|
||||
/**
|
||||
* 模板变量名称
|
||||
*/
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 接口名称
|
||||
*/
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 地域信息
|
||||
*/
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* key
|
||||
*
|
||||
*/
|
||||
private String accessKeyId;
|
||||
|
||||
/**
|
||||
* 密钥
|
||||
*
|
||||
*/
|
||||
private String accessKeySecret;
|
||||
|
||||
/**
|
||||
* 厂商名称标识
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 短信签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* appid
|
||||
*
|
||||
*/
|
||||
private String sdkAppId;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
private Integer weight;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
private Integer retryInterval;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
private Integer maxRetries;
|
||||
|
||||
/**
|
||||
* 厂商的发送数量上限,默认不设置上限
|
||||
*/
|
||||
private Long maximum;
|
||||
|
||||
/**
|
||||
* REST API Base URL
|
||||
*/
|
||||
private String baseUrl;
|
||||
|
||||
/**
|
||||
* 请求域名
|
||||
*/
|
||||
private String serverIp;
|
||||
|
||||
/**
|
||||
* 请求端口
|
||||
*/
|
||||
private Integer serverPort;
|
||||
|
||||
/**
|
||||
* 国内短信签名通道号
|
||||
*/
|
||||
private String sender;
|
||||
|
||||
/**
|
||||
* 短信状态报告接收地
|
||||
*/
|
||||
private String statusCallBack;
|
||||
|
||||
/**
|
||||
* APP接入地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 模板短信请求地址
|
||||
*/
|
||||
private String templateUrl;
|
||||
|
||||
/**
|
||||
* 验证码短信请求地址
|
||||
*/
|
||||
private String codeUrl;
|
||||
|
||||
/**
|
||||
* 验证码验证请求地址
|
||||
*/
|
||||
private String verifyUrl;
|
||||
|
||||
/**
|
||||
* 是否需要支持短信上行。true:需要,false:不需要false
|
||||
*/
|
||||
private String needUp;
|
||||
|
||||
/**
|
||||
* 请求超时时间
|
||||
*/
|
||||
private Integer connTimeout;
|
||||
|
||||
/**
|
||||
* 是否为简易模式
|
||||
*/
|
||||
private String isSimple;
|
||||
|
||||
/**
|
||||
* 短信发送后将向这个地址推送(运营商返回的)发送报告
|
||||
*/
|
||||
private String callbackUrl;
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
private Integer mchId;
|
||||
|
||||
/**
|
||||
* app key
|
||||
*
|
||||
*/
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
* app id
|
||||
*
|
||||
*/
|
||||
private Integer appId;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 单发链接
|
||||
*/
|
||||
private String singleMsgUrl;
|
||||
|
||||
/**
|
||||
* 群发链接
|
||||
*/
|
||||
private String massMsgUrl;
|
||||
|
||||
/**
|
||||
* 签名ID
|
||||
*/
|
||||
private String signatureId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
* 额外字段
|
||||
*
|
||||
*/
|
||||
private String extraJson;
|
||||
|
||||
/**
|
||||
* 服务名
|
||||
*/
|
||||
private String service;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,15 +1,14 @@
|
||||
package com.schisandra.auth.domain.bo;
|
||||
package com.schisandra.system.domain.bo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (SchisandraSmsConfig)实体类
|
||||
* 短信配置信息表 bo
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-08 20:09:54
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Data
|
||||
public class SchisandraSmsConfigBO implements Serializable {
|
||||
@@ -18,148 +17,216 @@ public class SchisandraSmsConfigBO implements Serializable {
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 配置id
|
||||
*/
|
||||
private String configId;
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
*/
|
||||
private String requestUrl;
|
||||
|
||||
/**
|
||||
* 模板变量名称
|
||||
*/
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 接口名称
|
||||
*/
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 地域信息
|
||||
*/
|
||||
private String region;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String accessKeyId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String accessKeySecret;
|
||||
|
||||
/**
|
||||
* 厂商名称标识
|
||||
*/
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 短信签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String sdkAppId;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
private Integer weight;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
private Integer retryInterval;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
private Integer maxRetries;
|
||||
|
||||
/**
|
||||
* 厂商的发送数量上限,默认不设置上限
|
||||
*/
|
||||
private Long maximum;
|
||||
|
||||
/**
|
||||
* REST API Base URL
|
||||
*/
|
||||
private String baseUrl;
|
||||
|
||||
/**
|
||||
* 请求域名
|
||||
*/
|
||||
private String serverIp;
|
||||
|
||||
/**
|
||||
* 请求端口
|
||||
*/
|
||||
private Integer serverPort;
|
||||
|
||||
/**
|
||||
* 国内短信签名通道号
|
||||
*/
|
||||
private String sender;
|
||||
|
||||
/**
|
||||
* 短信状态报告接收地
|
||||
*/
|
||||
private String statusCallBack;
|
||||
|
||||
/**
|
||||
* APP接入地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 模板短信请求地址
|
||||
*/
|
||||
private String templateUrl;
|
||||
|
||||
/**
|
||||
* 验证码短信请求地址
|
||||
*/
|
||||
private String codeUrl;
|
||||
|
||||
/**
|
||||
* 验证码验证请求地址
|
||||
*/
|
||||
private String verifyUrl;
|
||||
|
||||
/**
|
||||
* 是否需要支持短信上行。true:需要,false:不需要false
|
||||
*/
|
||||
private String needUp;
|
||||
|
||||
/**
|
||||
* 请求超时时间
|
||||
*/
|
||||
private Integer connTimeout;
|
||||
|
||||
/**
|
||||
* 是否为简易模式
|
||||
*/
|
||||
private String isSimple;
|
||||
|
||||
/**
|
||||
* 短信发送后将向这个地址推送(运营商返回的)发送报告
|
||||
*/
|
||||
private String callbackUrl;
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
private Integer mchId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer appId;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 单发链接
|
||||
*/
|
||||
private String singleMsgUrl;
|
||||
|
||||
/**
|
||||
* 群发链接
|
||||
*/
|
||||
private String massMsgUrl;
|
||||
|
||||
/**
|
||||
* 签名ID
|
||||
*/
|
||||
private String signatureId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String extraJson;
|
||||
|
||||
/**
|
||||
* 服务名
|
||||
*/
|
||||
private String service;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,22 @@
|
||||
package com.schisandra.system.domain.convert;
|
||||
|
||||
import com.schisandra.system.domain.bo.SchisandraSmsConfigBO;
|
||||
import com.schisandra.system.infra.basic.entity.SchisandraSmsConfig;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 短信配置信息表 bo转换器
|
||||
*
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Mapper
|
||||
public interface SchisandraSmsConfigBOConverter {
|
||||
|
||||
SchisandraSmsConfigBOConverter INSTANCE = Mappers.getMapper(SchisandraSmsConfigBOConverter.class);
|
||||
|
||||
SchisandraSmsConfig convertBOToEntity(SchisandraSmsConfigBO schisandraSmsConfigBO);
|
||||
SchisandraSmsConfigBO convertEntityToBO(SchisandraSmsConfig schisandraSmsConfig);
|
||||
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package com.schisandra.system.domain.service;
|
||||
|
||||
import com.schisandra.system.domain.bo.SchisandraSmsConfigBO;
|
||||
|
||||
/**
|
||||
* 短信配置信息表 领域service
|
||||
*
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
public interface SchisandraSmsConfigDomainService {
|
||||
|
||||
/**
|
||||
* 添加 短信配置信息表 信息
|
||||
*/
|
||||
Boolean add(SchisandraSmsConfigBO schisandraSmsConfigBO);
|
||||
|
||||
/**
|
||||
* 更新 短信配置信息表 信息
|
||||
*/
|
||||
Boolean update(SchisandraSmsConfigBO schisandraSmsConfigBO);
|
||||
|
||||
/**
|
||||
* 删除 短信配置信息表 信息
|
||||
*/
|
||||
Boolean delete(SchisandraSmsConfigBO schisandraSmsConfigBO);
|
||||
|
||||
SchisandraSmsConfigBO queryByConfigId(String configId);
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
package com.schisandra.system.domain.service.impl;
|
||||
|
||||
import com.schisandra.system.common.enums.IsDeletedFlagEnum;
|
||||
import com.schisandra.system.domain.convert.SchisandraSmsConfigBOConverter;
|
||||
import com.schisandra.system.domain.bo.SchisandraSmsConfigBO;
|
||||
import com.schisandra.system.domain.service.SchisandraSmsConfigDomainService;
|
||||
import com.schisandra.system.infra.basic.entity.SchisandraSmsConfig;
|
||||
import com.schisandra.system.infra.basic.service.SchisandraSmsConfigService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 短信配置信息表 领域service实现了
|
||||
*
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SchisandraSmsConfigDomainServiceImpl implements SchisandraSmsConfigDomainService {
|
||||
|
||||
@Resource
|
||||
private SchisandraSmsConfigService schisandraSmsConfigService;
|
||||
|
||||
@Override
|
||||
public Boolean add(SchisandraSmsConfigBO schisandraSmsConfigBO) {
|
||||
SchisandraSmsConfig schisandraSmsConfig = SchisandraSmsConfigBOConverter.INSTANCE.convertBOToEntity(schisandraSmsConfigBO);
|
||||
schisandraSmsConfig.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
|
||||
return schisandraSmsConfigService.insert(schisandraSmsConfig) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean update(SchisandraSmsConfigBO schisandraSmsConfigBO) {
|
||||
SchisandraSmsConfig schisandraSmsConfig = SchisandraSmsConfigBOConverter.INSTANCE.convertBOToEntity(schisandraSmsConfigBO);
|
||||
return schisandraSmsConfigService.update(schisandraSmsConfig) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean delete(SchisandraSmsConfigBO schisandraSmsConfigBO) {
|
||||
SchisandraSmsConfig schisandraSmsConfig = new SchisandraSmsConfig();
|
||||
schisandraSmsConfig.setId(schisandraSmsConfigBO.getId());
|
||||
schisandraSmsConfig.setIsDeleted(IsDeletedFlagEnum.DELETED.getCode());
|
||||
return schisandraSmsConfigService.update(schisandraSmsConfig) > 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SchisandraSmsConfigBO queryByConfigId(String configId) {
|
||||
SchisandraSmsConfig schisandraSmsConfig= schisandraSmsConfigService.queryByConfigId(configId);
|
||||
return SchisandraSmsConfigBOConverter.INSTANCE.convertEntityToBO(schisandraSmsConfig);
|
||||
}
|
||||
|
||||
}
|
@@ -49,8 +49,7 @@ public class SchisandraSysOauthDomainServiceImpl implements SchisandraSysOauthDo
|
||||
@Override
|
||||
public SchisandraSysOauthBO getOauthConfigByType(String type) {
|
||||
SchisandraSysOauth schisandraSysOauth= schisandraSysOauthService.getOauthConfigByType(type);
|
||||
SchisandraSysOauthBO schisandraSysOauthBO = SchisandraSysOauthBOConverter.INSTANCE.convertEntityToBO(schisandraSysOauth);
|
||||
return schisandraSysOauthBO;
|
||||
return SchisandraSysOauthBOConverter.INSTANCE.convertEntityToBO(schisandraSysOauth);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,17 @@
|
||||
package com.schisandra.system.infra.basic.dao;
|
||||
|
||||
import com.schisandra.system.infra.basic.entity.SchisandraSmsConfig;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 短信配置信息表 表数据库访问层
|
||||
*
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Repository
|
||||
public interface SchisandraSmsConfigDao extends BaseMapper<SchisandraSmsConfig> {
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,282 @@
|
||||
package com.schisandra.system.infra.basic.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 短信配置信息表 实体类
|
||||
*
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Data
|
||||
@Table("schisandra_sms_config")
|
||||
public class SchisandraSmsConfig implements Serializable {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 配置id
|
||||
*/
|
||||
@Column("config_id")
|
||||
private String configId;
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
*/
|
||||
@Column("request_url")
|
||||
private String requestUrl;
|
||||
|
||||
/**
|
||||
* 模板变量名称
|
||||
*/
|
||||
@Column("template_name")
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 接口名称
|
||||
*/
|
||||
@Column("action")
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 地域信息
|
||||
*/
|
||||
@Column("region")
|
||||
private String region;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Column("access_key_id")
|
||||
private String accessKeyId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Column("access_key_secret")
|
||||
private String accessKeySecret;
|
||||
|
||||
/**
|
||||
* 厂商名称标识
|
||||
*/
|
||||
@Column("supplier")
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* 短信签名
|
||||
*/
|
||||
@Column("signature")
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Column("sdk_app_id")
|
||||
private String sdkAppId;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
@Column("template_id")
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
@Column("weight")
|
||||
private Integer weight;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
@Column("retry_interval")
|
||||
private Integer retryInterval;
|
||||
|
||||
/**
|
||||
* 短信重试次数,默认0次不重试
|
||||
*/
|
||||
@Column("max_retries")
|
||||
private Integer maxRetries;
|
||||
|
||||
/**
|
||||
* 厂商的发送数量上限,默认不设置上限
|
||||
*/
|
||||
@Column("maximum")
|
||||
private Long maximum;
|
||||
|
||||
/**
|
||||
* REST API Base URL
|
||||
*/
|
||||
@Column("base_url")
|
||||
private String baseUrl;
|
||||
|
||||
/**
|
||||
* 请求域名
|
||||
*/
|
||||
@Column("server_ip")
|
||||
private String serverIp;
|
||||
|
||||
/**
|
||||
* 请求端口
|
||||
*/
|
||||
@Column("server_port")
|
||||
private Integer serverPort;
|
||||
|
||||
/**
|
||||
* 国内短信签名通道号
|
||||
*/
|
||||
@Column("sender")
|
||||
private String sender;
|
||||
|
||||
/**
|
||||
* 短信状态报告接收地
|
||||
*/
|
||||
@Column("status_call_back")
|
||||
private String statusCallBack;
|
||||
|
||||
/**
|
||||
* APP接入地址
|
||||
*/
|
||||
@Column("url")
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 模板短信请求地址
|
||||
*/
|
||||
@Column("template_url")
|
||||
private String templateUrl;
|
||||
|
||||
/**
|
||||
* 验证码短信请求地址
|
||||
*/
|
||||
@Column("code_url")
|
||||
private String codeUrl;
|
||||
|
||||
/**
|
||||
* 验证码验证请求地址
|
||||
*/
|
||||
@Column("verify_url")
|
||||
private String verifyUrl;
|
||||
|
||||
/**
|
||||
* 是否需要支持短信上行。true:需要,false:不需要false
|
||||
*/
|
||||
@Column("need_up")
|
||||
private String needUp;
|
||||
|
||||
/**
|
||||
* 请求超时时间
|
||||
*/
|
||||
@Column("conn_timeout")
|
||||
private Integer connTimeout;
|
||||
|
||||
/**
|
||||
* 是否为简易模式
|
||||
*/
|
||||
@Column("is_simple")
|
||||
private String isSimple;
|
||||
|
||||
/**
|
||||
* 短信发送后将向这个地址推送(运营商返回的)发送报告
|
||||
*/
|
||||
@Column("callback_url")
|
||||
private String callbackUrl;
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
@Column("mch_id")
|
||||
private Integer mchId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Column("app_key")
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Column("app_id")
|
||||
private Integer appId;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@Column("version")
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 单发链接
|
||||
*/
|
||||
@Column("single_msg_url")
|
||||
private String singleMsgUrl;
|
||||
|
||||
/**
|
||||
* 群发链接
|
||||
*/
|
||||
@Column("mass_msg_url")
|
||||
private String massMsgUrl;
|
||||
|
||||
/**
|
||||
* 签名ID
|
||||
*/
|
||||
@Column("signature_Id")
|
||||
private String signatureId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Column("created_by")
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column("created_time")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@Column("update_by")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 是否删除 0 未删除 1已删除
|
||||
*/
|
||||
@Column(value = "is_deleted",isLogicDelete = true)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Column("extra_json")
|
||||
private String extraJson;
|
||||
|
||||
/**
|
||||
* 服务名
|
||||
*/
|
||||
@Column("service")
|
||||
private String service;
|
||||
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraSysConfig implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -5,6 +5,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -24,7 +25,7 @@ public class SchisandraSysLog implements Serializable {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,7 +23,7 @@ public class SchisandraSysOauth implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(value = "id", keyType = KeyType.Auto)
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@@ -1,16 +1,12 @@
|
||||
package com.schisandra.auth.infra.basic.service;
|
||||
package com.schisandra.system.infra.basic.service;
|
||||
|
||||
import com.schisandra.auth.infra.basic.entity.SchisandraSmsConfig;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
import java.util.List;
|
||||
import com.schisandra.system.infra.basic.entity.SchisandraSmsConfig;
|
||||
|
||||
/**
|
||||
* (SchisandraSmsConfig)表服务接口
|
||||
* 短信配置信息表 表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-11 15:48:02
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
public interface SchisandraSmsConfigService {
|
||||
|
||||
@@ -20,8 +16,7 @@ public interface SchisandraSmsConfigService {
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
SchisandraSmsConfig queryById(Integer id);
|
||||
|
||||
SchisandraSmsConfig queryById(Long id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
@@ -37,7 +32,7 @@ public interface SchisandraSmsConfigService {
|
||||
* @param schisandraSmsConfig 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
SchisandraSmsConfig update(SchisandraSmsConfig schisandraSmsConfig);
|
||||
int update(SchisandraSmsConfig schisandraSmsConfig);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
@@ -45,8 +40,8 @@ public interface SchisandraSmsConfigService {
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
boolean deleteById(Long id);
|
||||
|
||||
SchisandraSmsConfig queryByConfigId(String configId);
|
||||
|
||||
}
|
@@ -1,22 +1,22 @@
|
||||
package com.schisandra.auth.infra.basic.service.impl;
|
||||
package com.schisandra.system.infra.basic.service.impl;
|
||||
|
||||
import com.schisandra.auth.infra.basic.dao.SchisandraSmsConfigDao;
|
||||
import com.schisandra.auth.infra.basic.entity.SchisandraSmsConfig;
|
||||
import com.schisandra.auth.infra.basic.entity.table.SchisandraSmsConfigTableDef;
|
||||
import com.schisandra.auth.infra.basic.service.SchisandraSmsConfigService;
|
||||
import com.schisandra.system.infra.basic.dao.SchisandraSmsConfigDao;
|
||||
import com.schisandra.system.infra.basic.entity.SchisandraSmsConfig;
|
||||
import com.schisandra.system.infra.basic.entity.table.SchisandraSmsConfigTableDef;
|
||||
import com.schisandra.system.infra.basic.service.SchisandraSmsConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (SchisandraSmsConfig)表服务实现类
|
||||
* 短信配置信息表 表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-11 15:48:03
|
||||
* @author landaiqing
|
||||
* @since 2024-06-19 22:20:47
|
||||
*/
|
||||
@Service("schisandraSmsConfigService")
|
||||
@Service("SchisandraSmsConfigService")
|
||||
public class SchisandraSmsConfigServiceImpl implements SchisandraSmsConfigService {
|
||||
|
||||
@Resource
|
||||
private SchisandraSmsConfigDao schisandraSmsConfigDao;
|
||||
|
||||
@@ -27,11 +27,10 @@ public class SchisandraSmsConfigServiceImpl implements SchisandraSmsConfigServic
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public SchisandraSmsConfig queryById(Integer id) {
|
||||
public SchisandraSmsConfig queryById(Long id) {
|
||||
return this.schisandraSmsConfigDao.selectOneById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
@@ -40,8 +39,7 @@ public class SchisandraSmsConfigServiceImpl implements SchisandraSmsConfigServic
|
||||
*/
|
||||
@Override
|
||||
public int insert(SchisandraSmsConfig schisandraSmsConfig) {
|
||||
return schisandraSmsConfigDao.insert(schisandraSmsConfig,true);
|
||||
|
||||
return this.schisandraSmsConfigDao.insert(schisandraSmsConfig, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,9 +49,8 @@ public class SchisandraSmsConfigServiceImpl implements SchisandraSmsConfigServic
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public SchisandraSmsConfig update(SchisandraSmsConfig schisandraSmsConfig) {
|
||||
this.schisandraSmsConfigDao.update(schisandraSmsConfig);
|
||||
return this.queryById(schisandraSmsConfig.getId());
|
||||
public int update(SchisandraSmsConfig schisandraSmsConfig) {
|
||||
return this.schisandraSmsConfigDao.update(schisandraSmsConfig, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +60,7 @@ public class SchisandraSmsConfigServiceImpl implements SchisandraSmsConfigServic
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
public boolean deleteById(Long id) {
|
||||
return this.schisandraSmsConfigDao.deleteById(id) > 0;
|
||||
}
|
||||
|
||||
@@ -71,4 +68,5 @@ public class SchisandraSmsConfigServiceImpl implements SchisandraSmsConfigServic
|
||||
public SchisandraSmsConfig queryByConfigId(String configId) {
|
||||
return schisandraSmsConfigDao.selectOneByCondition(SchisandraSmsConfigTableDef.SCHISANDRA_SMS_CONFIG.CONFIG_ID.eq(configId));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.schisandra.system.infra.basic.dao.SchisandraSmsConfigDao">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.schisandra.system.infra.basic.entity.SchisandraSmsConfig">
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="config_id" jdbcType="VARCHAR" property="configId"/>
|
||||
<result column="request_url" jdbcType="VARCHAR" property="requestUrl"/>
|
||||
<result column="template_name" jdbcType="VARCHAR" property="templateName"/>
|
||||
<result column="action" jdbcType="VARCHAR" property="action"/>
|
||||
<result column="region" jdbcType="VARCHAR" property="region"/>
|
||||
<result column="access_key_id" jdbcType="VARCHAR" property="accessKeyId"/>
|
||||
<result column="access_key_secret" jdbcType="VARCHAR" property="accessKeySecret"/>
|
||||
<result column="supplier" jdbcType="VARCHAR" property="supplier"/>
|
||||
<result column="signature" jdbcType="VARCHAR" property="signature"/>
|
||||
<result column="sdk_app_id" jdbcType="VARCHAR" property="sdkAppId"/>
|
||||
<result column="template_id" jdbcType="VARCHAR" property="templateId"/>
|
||||
<result column="weight" jdbcType="INTEGER" property="weight"/>
|
||||
<result column="retry_interval" jdbcType="INTEGER" property="retryInterval"/>
|
||||
<result column="max_retries" jdbcType="INTEGER" property="maxRetries"/>
|
||||
<result column="maximum" jdbcType="BIGINT" property="maximum"/>
|
||||
<result column="base_url" jdbcType="VARCHAR" property="baseUrl"/>
|
||||
<result column="server_ip" jdbcType="VARCHAR" property="serverIp"/>
|
||||
<result column="server_port" jdbcType="INTEGER" property="serverPort"/>
|
||||
<result column="sender" jdbcType="VARCHAR" property="sender"/>
|
||||
<result column="status_call_back" jdbcType="VARCHAR" property="statusCallBack"/>
|
||||
<result column="url" jdbcType="VARCHAR" property="url"/>
|
||||
<result column="template_url" jdbcType="VARCHAR" property="templateUrl"/>
|
||||
<result column="code_url" jdbcType="VARCHAR" property="codeUrl"/>
|
||||
<result column="verify_url" jdbcType="VARCHAR" property="verifyUrl"/>
|
||||
<result column="need_up" jdbcType="VARCHAR" property="needUp"/>
|
||||
<result column="conn_timeout" jdbcType="INTEGER" property="connTimeout"/>
|
||||
<result column="is_simple" jdbcType="VARCHAR" property="isSimple"/>
|
||||
<result column="callback_url" jdbcType="VARCHAR" property="callbackUrl"/>
|
||||
<result column="mch_id" jdbcType="INTEGER" property="mchId"/>
|
||||
<result column="app_key" jdbcType="VARCHAR" property="appKey"/>
|
||||
<result column="app_id" jdbcType="INTEGER" property="appId"/>
|
||||
<result column="version" jdbcType="VARCHAR" property="version"/>
|
||||
<result column="single_msg_url" jdbcType="VARCHAR" property="singleMsgUrl"/>
|
||||
<result column="mass_msg_url" jdbcType="VARCHAR" property="massMsgUrl"/>
|
||||
<result column="signature_Id" jdbcType="VARCHAR" property="signatureId"/>
|
||||
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
||||
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/>
|
||||
<result column="extra_json" jdbcType="VARCHAR" property="extraJson"/>
|
||||
<result column="service" jdbcType="VARCHAR" property="service"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
@@ -75,7 +75,7 @@ mybatis-flex:
|
||||
global-config:
|
||||
print-banner: false
|
||||
key-config:
|
||||
key-type: auto
|
||||
key-type: generator
|
||||
normal-value-of-logic-delete: 0
|
||||
deleted-value-of-logic-delete: 1
|
||||
logic-delete-column: is_deleted
|
||||
|
Reference in New Issue
Block a user