依赖包整理

master
邱飞云 4 years ago
parent 9c5987aa7b
commit 72b8605073
  1. 17
      dq-financial-api/pom.xml
  2. 20
      dq-financial-crms/pom.xml
  3. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/config/IPageConfig.java
  4. 40
      dq-financial-hrms-auth/pom.xml
  5. 41
      dq-financial-hrms/pom.xml
  6. 27
      dq-framework-common/src/main/java/com/daqing/framework/util/SendSMS.java

@ -15,31 +15,18 @@
<description>系统API统一定义</description>
<dependencies>
<!-- <dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>-->
<dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-model</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.1.8.RELEASE</version>
</dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.1.8.RELEASE</version>
<scope>test</scope>
</dependency>-->
</dependencies>
</project>

@ -20,20 +20,12 @@
</properties>
<dependencies>
<dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-model</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-utils</artifactId>
<groupId>com.daqing.financial</groupId>
<artifactId>dq-financial-hrms-auth</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.daqing.financial</groupId>
@ -44,11 +36,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<!--<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

@ -1,3 +1,4 @@
/*
package com.daqing.financial.crms.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
@ -11,3 +12,4 @@ public class IPageConfig {
return new PaginationInterceptor();
}
}
*/

@ -20,11 +20,7 @@
</properties>
<dependencies>
<!-- <dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>-->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
@ -35,15 +31,10 @@
<artifactId>jjwt</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
<!--<dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-model</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>-->
<dependency>
@ -51,33 +42,6 @@
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!--<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-jwt</artifactId>
<version>1.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.0</version>
</dependency>-->
<!-- <dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
&lt;!&ndash; 指明版本,解决redis存储出现的问题:java.lang.NoSuchMethodError: org.springframework.data.redis.connection.RedisConnection.set([B[B)V问题 &ndash;&gt;
<version>2.3.3.RELEASE</version>
</dependency>-->
<!-- <dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.0.5</version>
</dependency>-->
<dependency>
<groupId>com.daqing.financial</groupId>
<artifactId>dq-financial-api</artifactId>

@ -21,53 +21,20 @@
<dependencies>
<!--<dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>-->
<!--<dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-model</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>-->
<!-- <dependency>
<groupId>com.daqing.framework</groupId>
<artifactId>dq-framework-utils</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>-->
<dependency>
<groupId>com.daqing.financial</groupId>
<artifactId>dq-financial-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
</dependency>-->
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
</dependency>-->
<!--<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>-->
<!-- <dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.3.5.RELEASE</version>
<scope>compile</scope>
</dependency>-->
<dependency>
<groupId>com.daqing.financial</groupId>
<artifactId>dq-financial-hrms-auth</artifactId>

@ -14,12 +14,12 @@ public class SendSMS {
public static void main(String[] args){
String mobile="13888888888";//需要接受短信验证码的手机号
String sendTemplate="SMS_134188888";//短信模板ID,需要去阿里云平台申请,审核通过后方能使用,通常是以"SMS_"开头字符串
String mobile="18707074784";//需要接受短信验证码的手机号
String sendTemplate="SMS_204155294";//短信模板ID,需要去阿里云平台申请,审核通过后方能使用,通常是以"SMS_"开头字符串
String code = (int)((Math.random() * 9 + 1) * 100000)+ "";//要发送给用户的短信验证码,行业通常使用六位纯数字
String result= sendCode(mobile,sendTemplate,code);
if(result!=null&&"OK".equals(result.toUpperCase())){
boolean result= sendCode(mobile,sendTemplate,code);
if(result){
System.out.println("短信发送成功");
}else{
System.out.println("短信发送失败");
@ -32,7 +32,8 @@ public class SendSMS {
* @param sendTemplate 短信模板id此处将其封装为变量是为了由该方法的调用者决定自己来发送哪种类型的短信验证码比如注册重置密码类的
* @param code 您将发送到用户手机的短信验证码
*/
public static String sendCode(String mobile,String sendTemplate,String code){
public static Boolean sendCode(String mobile,String sendTemplate,String code){
boolean isSend = false;
//请求失败这里会抛ClientException异常
String result="";
try {
@ -43,8 +44,8 @@ public class SendSMS {
final String product = "Dysmsapi";//短信API产品名称(短信产品名固定,无需修改)
final String domain = "dysmsapi.aliyuncs.com";//短信API产品域名(接口地址固定,无需修改)
//替换成你的AK
final String accessKeyId = "LTAI3IJDEVkXgY0E";//你的accessKeyId,参考本文档步骤2
final String accessKeySecret = "kmnOeksdTEauInvea9Hf6dqssDdvho";//你的accessKeySecret,参考本文档步骤2
final String accessKeyId = "LTAI4FzqQHnk4rozqLZ8jCNj";//你的accessKeyId,参考本文档步骤2
final String accessKeySecret = "mveW7B1OyFoKUkHm8WsxmrjHmkJWHq";//你的accessKeySecret,参考本文档步骤2
//初始化ascClient,暂时不支持多region(请勿修改)
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId,
accessKeySecret);
@ -57,7 +58,7 @@ public class SendSMS {
//必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式;发送国际/港澳台消息时,接收号码格式为00+国际区号+号码,如“0085200000000”
request.setPhoneNumbers(mobile);
//必填:短信签名-可在短信控制台中找到
request.setSignName("");//注意要与你在短信控制台中的签名一致
request.setSignName("职站");//注意要与你在短信控制台中的签名一致
//必填:短信模板-可在短信控制台中找到
request.setTemplateCode(sendTemplate);
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
@ -71,10 +72,18 @@ public class SendSMS {
SendSmsResponse response = acsClient.getAcsResponse(request);
result=response.getCode();
if(result!=null&&"OK".equals(result.toUpperCase())){
System.out.println("短信发送成功");
isSend = true;
}else{
isSend = false;
System.out.println("短信发送失败");
}
} catch (Exception e) {
result=e.getMessage();
isSend = false;
}
return result;
return isSend;
}
}
Loading…
Cancel
Save