style: update
This commit is contained in:
@@ -2,7 +2,7 @@ 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.domain.redis.RedisUtil;
|
||||
import com.schisandra.auth.infra.entity.ConfigInfo;
|
||||
import com.schisandra.auth.infra.rpc.ConfigRpc;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
@@ -3,7 +3,7 @@ package com.schisandra.auth.application.controller;
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import com.schisandra.auth.application.dto.SchisandraCaptchaDTO;
|
||||
import com.schisandra.auth.common.entity.CaptchaResult;
|
||||
import com.schisandra.auth.common.redis.RedisUtil;
|
||||
import com.schisandra.auth.domain.redis.RedisUtil;
|
||||
import com.schisandra.auth.common.utils.RotateImageUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@@ -12,7 +12,7 @@ import com.schisandra.auth.application.utils.CheckRouteCaptcha;
|
||||
import com.schisandra.auth.common.entity.CaptchaResult;
|
||||
import com.schisandra.auth.common.entity.Result;
|
||||
import com.schisandra.auth.common.enums.UserRoleEnum;
|
||||
import com.schisandra.auth.common.redis.RedisUtil;
|
||||
import com.schisandra.auth.domain.redis.RedisUtil;
|
||||
import com.schisandra.auth.domain.bo.SchisandraAuthRolePermissionBO;
|
||||
import com.schisandra.auth.domain.bo.SchisandraAuthUserBO;
|
||||
import com.schisandra.auth.domain.service.SchisandraAuthPermissionDomainService;
|
||||
|
@@ -5,19 +5,19 @@ import com.schisandra.auth.application.context.SmsConfigContext;
|
||||
import com.schisandra.auth.application.dto.SchisandraCaptchaDTO;
|
||||
import com.schisandra.auth.application.utils.CheckRouteCaptcha;
|
||||
import com.schisandra.auth.common.entity.CaptchaResult;
|
||||
import com.schisandra.auth.common.redis.RedisUtil;
|
||||
import com.schisandra.auth.common.entity.Result;
|
||||
import com.schisandra.auth.domain.redis.RedisUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.dromara.sms4j.api.entity.SmsResponse;
|
||||
import org.dromara.sms4j.comm.utils.SmsUtils;
|
||||
import org.dromara.sms4j.core.factory.SmsFactory;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
/**
|
||||
* @description: 短信发送controller
|
||||
* @author: landaiqing
|
||||
@@ -36,6 +36,9 @@ public class SchisandraSmsController {
|
||||
@Resource
|
||||
CheckRouteCaptcha checkRouteCaptcha;
|
||||
|
||||
@Resource
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
|
||||
/**
|
||||
* @description: 发送短信验证码
|
||||
* @param: [phone]
|
||||
@@ -79,4 +82,17 @@ public class SchisandraSmsController {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 测试mq发送
|
||||
* @param: [id]
|
||||
* @return: com.schisandra.auth.common.entity.Result<java.lang.Boolean>
|
||||
* @author: landaiqing
|
||||
* @date: 2024/6/25 下午2:35
|
||||
*/
|
||||
@PostMapping("postMessage")
|
||||
public Result<Boolean> pushMessage(@RequestParam("id") int id) {
|
||||
rocketMQTemplate.convertAndSend("first-topic", "landaiqing666" + id);
|
||||
return Result.ok(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,8 +1,7 @@
|
||||
package com.schisandra.auth.application.utils;
|
||||
|
||||
import com.cxytiandi.encrypt.springboot.annotation.Decrypt;
|
||||
import com.schisandra.auth.common.entity.CaptchaResult;
|
||||
import com.schisandra.auth.common.redis.RedisUtil;
|
||||
import com.schisandra.auth.domain.redis.RedisUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@@ -19,6 +19,10 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.schisandra</groupId>
|
||||
<artifactId>schisandra-cloud-storage-auth-domain</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@@ -0,0 +1,25 @@
|
||||
package com.schisandra.auth.application.mq;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||
import org.apache.rocketmq.spring.core.RocketMQListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Classname TestConsumer
|
||||
* @BelongsProject: schisandra-cloud-storage
|
||||
* @BelongsPackage: com.schisandra.auth.application.mq
|
||||
* @Author: landaiqing
|
||||
* @CreateTime: 2024-06-25 14:39
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Component
|
||||
@RocketMQMessageListener(topic = "first-topic", consumerGroup = "schisandra-cloud-storage-auth-producer")
|
||||
@Slf4j
|
||||
public class TestConsumer implements RocketMQListener<String> {
|
||||
@Override
|
||||
public void onMessage(String s) {
|
||||
log.info("接收到ma消息:{}", s);
|
||||
}
|
||||
}
|
@@ -128,13 +128,6 @@
|
||||
<version>0.4.20</version>
|
||||
</dependency>
|
||||
|
||||
<!--加密工具-->
|
||||
<dependency>
|
||||
<groupId>com.cxytiandi</groupId>
|
||||
<artifactId>monkey-api-encrypt-core</artifactId>
|
||||
<version>1.2.2.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@@ -67,5 +67,10 @@
|
||||
<artifactId>schisandra-cloud-storage-auth-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.rocketmq</groupId>
|
||||
<artifactId>rocketmq-spring-boot-starter</artifactId>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package com.schisandra.auth.common.redis;
|
||||
package com.schisandra.auth.domain.redis;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
@@ -1,4 +1,4 @@
|
||||
package com.schisandra.auth.common.redis;
|
||||
package com.schisandra.auth.domain.redis;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
@@ -8,7 +8,7 @@ import com.google.gson.Gson;
|
||||
import com.schisandra.auth.common.entity.Result;
|
||||
import com.schisandra.auth.common.enums.IsDeletedFlagEnum;
|
||||
import com.schisandra.auth.common.enums.UserRoleEnum;
|
||||
import com.schisandra.auth.common.redis.RedisUtil;
|
||||
import com.schisandra.auth.domain.redis.RedisUtil;
|
||||
import com.schisandra.auth.domain.bo.SchisandraAuthUserBO;
|
||||
import com.schisandra.auth.domain.bo.SchisandraAuthUserRoleBO;
|
||||
import com.schisandra.auth.domain.bo.SchisandraSocialUserAuthBO;
|
||||
|
@@ -15,12 +15,12 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Configuration
|
||||
public class MyBatisFlexConfiguration {
|
||||
public class AuthMyBatisFlexConfiguration {
|
||||
private static final Logger logger = LoggerFactory
|
||||
.getLogger("mybatis-flex-sql");
|
||||
|
||||
|
||||
public MyBatisFlexConfiguration() {
|
||||
public AuthMyBatisFlexConfiguration() {
|
||||
//开启审计功能
|
||||
AuditManager.setAuditEnable(true);
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.schisandra.auth;
|
||||
|
||||
import com.cxytiandi.encrypt.springboot.annotation.EnableEncrypt;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
@@ -102,3 +102,8 @@ web:
|
||||
# MD5加密salt
|
||||
cipher:
|
||||
salt: E2754BC007CA407190E85DFF6E566003
|
||||
|
||||
rocketmq:
|
||||
name-server: 1.95.0.111:9876
|
||||
producer:
|
||||
group: schisandra-cloud-storage-auth-producer
|
||||
|
Reference in New Issue
Block a user