Răsfoiți Sursa

适配core-sms修改,增加动态指定短信发送接口地址的测试

luoshi 1 an în urmă
părinte
comite
a2e4bb5440

+ 10 - 0
api-demo/pom.xml

@@ -65,4 +65,14 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.3.7.RELEASE</version>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>

+ 2 - 2
api-demo/src/main/java/com/qmth/demo/api/controller/SmsController.java

@@ -19,13 +19,13 @@ public class SmsController {
 
     @RequestMapping("/send")
     public Object sendVerifySms(@RequestParam String phoneNumber, @RequestParam String signName,
-            @RequestParam String templateCode) {
+            @RequestParam String templateCode, @RequestParam(required = false) String url) {
         SmsSendRequest request = new SmsSendRequest();
         request.setPhoneNumber(phoneNumber);
         request.setSignName(signName);
         request.setTemplateCode(templateCode);
         request.addParam("code", RandomStringUtils.random(4, false, true));
-        return smsService.sendSms(request);
+        return url != null ? smsService.sendSms(url, request) : smsService.sendSms(request);
     }
 
 }

+ 3 - 3
api-demo/src/main/resources/application.properties

@@ -1,5 +1,5 @@
 server.port=8080
-spring.resources.static-locations=classpath:/static/,file:/Users/luoshi/Downloads/
+#spring.resources.static-locations=classpath:/static/,file:/Users/luoshi/Downloads/
 
 #com.qmth.api.uri-prefix=/aaa
 com.qmth.api.global-auth=false
@@ -31,8 +31,8 @@ com.qmth.fss.server=https://server.com
 
 ##solar online
 #com.qmth.solar.server=http://localhost:8090
-com.qmth.solar.accessKey=11859ec021f1484685cec40d8bfae05f
-com.qmth.solar.accessSecret=mA5GDTj0oBYpgw5sMcrqMa9Ua1bLnyDh
+com.qmth.solar.accessKey=58ef80b17e634be5a4da615eddf00287
+com.qmth.solar.accessSecret=nujVkeIsWKIfRTvL3g4JzomKZ7qbhH1k
 
 ##solar offline
 #com.qmth.solar.license=/Users/luoshi/Downloads/solar/test.lic

+ 0 - 45
pom.xml

@@ -91,49 +91,4 @@
         </dependencies>
     </dependencyManagement>
 
-    <build>
-        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
-            <plugins>
-                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-clean-plugin</artifactId>
-                    <version>3.1.0</version>
-                </plugin>
-                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
-                <plugin>
-                    <artifactId>maven-resources-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>3.8.0</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.22.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-install-plugin</artifactId>
-                    <version>2.5.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>2.8.2</version>
-                </plugin>
-                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-site-plugin</artifactId>
-                    <version>3.7.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>3.0.0</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
 </project>