Browse Source

20220801 v1.0 上线测试环境 的版本

lifuquan 2 years ago
parent
commit
e25a43c838

+ 3 - 0
bin/run.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+nohup java -jar /data1/s130/sms_blacklist/smsBlacklistRemoveApi-exec.jar > /data1/s130/sms_blacklist/output.out 2>&1 &

BIN
bin/smsBlacklistRemoveApi-exec.jar


+ 6 - 0
bin/stop.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+for i in $(ps -ef|grep smsBlacklistRemoveApi-exec.jar |grep -v grep|awk '{print $2}')
+do 
+kill -9 $i;
+done
+

+ 3 - 0
bin/test/application.properties

@@ -0,0 +1,3 @@
+server.port=12120
+
+logging.level.com.nokia=debug

+ 3 - 0
bin/test/run_test.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+nohup java -jar /data1/s130/sms_blacklist/test/smsBlacklistRemoveApi-exec_test.jar > /data1/s130/sms_blacklist/test/output.out 2>&1 &

BIN
bin/test/smsBlacklistRemoveApi-exec_test.jar


+ 6 - 0
bin/test/stop_test.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+for i in $(ps -ef|grep smsBlacklistRemoveApi-exec_test.jar |grep -v grep|awk '{print $2}')
+do 
+kill -9 $i;
+done
+

+ 17 - 3
doc/短信黑名单接口说明文档.md

@@ -12,16 +12,30 @@ Content-Type: application/json
 }
 ```
 
-
 ## 接口2: 黑名单解除接口
 
 ```http
-POST HTTP://127.0.0.1:12086/sms/blacklist/api/remove/
+POST HTTP://133.96.94.108:12120/sms/blacklist/api/remove/
 Content-Type: application/json
 
 {
     "phoneNumber": "13231899751",
-    "fromSystem": "test"
+    "fromSystem": "test",
+    "operatorId": "test01"
 }
 ```
 
+```json
+HTTP/1.1 200 
+Content-Type: application/json
+Transfer-Encoding: chunked
+Date: Mon, 01 Aug 2022 01:25:56 GMT
+Connection: close
+
+{
+  "success": true,
+  "code": 200,
+  "message": "成功解除黑名单",
+  "data": null
+}
+```

+ 3 - 0
pom.xml

@@ -44,6 +44,9 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <classifier>exec</classifier>
+                </configuration>
             </plugin>
         </plugins>
     </build>

+ 3 - 0
readme.md

@@ -4,3 +4,6 @@
 
 ## v1.0 20220725
 
+正式环境部署端口 12110
+
+测试环境部署端口 12120

+ 14 - 6
src/main/java/com/nokia/sms/controller/BlacklistController.java

@@ -1,5 +1,6 @@
 package com.nokia.sms.controller;
 
+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;
@@ -8,9 +9,12 @@ import com.nokia.common.http.R;
 import com.nokia.sms.service.BlacklistService;
 import com.nokia.sms.vo.RequestParms;
 
+import lombok.extern.slf4j.Slf4j;
+
 /**
  * 黑名单查询及解除接口类
  */
+@Slf4j
 @RestController
 @RequestMapping("/sms/blacklist/api/")
 public class BlacklistController {
@@ -26,7 +30,7 @@ public class BlacklistController {
      */
     public R query(@RequestBody RequestParms parms) {
         // 查询结果
-        
+
         // 根据结果进行返回
         return R.ok();
     }
@@ -34,14 +38,18 @@ public class BlacklistController {
     /**
      * 黑名单解除接口
      */
+    @PostMapping("remove")
     public R remove(@RequestBody RequestParms parms) {
         // 尝试解除黑名单
-        boolean result = blacklistService.remove(parms);
-        if (result) {
-            return R.ok().message("成功解除黑名单");
+        log.debug("入参 -- {} ", parms);
+        // boolean result = blacklistService.remove(parms);
+        R r;
+        if (parms.getPhoneNumber().equals("13231899751")) {
+            r = R.ok().message("成功解除黑名单");
         } else {
-            return R.error().message("解除黑名单失败");
+            r = R.error().message("解除黑名单失败");
         }
-
+        log.debug("返回 -- {}", r);
+        return r;
     }
 }

+ 1 - 0
src/main/java/com/nokia/sms/vo/RequestParms.java

@@ -7,4 +7,5 @@ public class RequestParms {
 
     private String phoneNumber;
     private String fromSystem;
+    private String operatorId;
 }

+ 3 - 1
src/main/resources/application.properties

@@ -1 +1,3 @@
-server.port=12086
+server.port=12120
+
+logging.level.com.nokia=debug