x1ongzhu 7 лет назад
Родитель
Сommit
a872c15c3e

+ 46 - 10
build.sh

@@ -1,10 +1,46 @@
-rm -rf src/main/webapp/static/*
-rm -rf src/main/webapp/WEB-INF/html/admin.html
-git checkout .
-git pull
-(cd src/main/vue && npm run build)
-mvn package
-/usr/local/tomcat/shouyoudianjing/bin/shutdown.sh -force
-rm -rf /var/www/shouyoudianjing
-mv target/awesome-admin /var/www/shouyoudianjing
-/usr/local/tomcat/shouyoudianjing/bin/startup.sh
+#!/bin/bash
+
+while getopts "gjvt" arg #选项后面的冒号表示该选项需要参数
+do
+        case $arg in
+             g)
+                git=1
+                ;;
+             j)
+                java=1
+                ;;
+             v)
+                vue=1
+                ;;
+             t)
+                tomcat=1
+        ;;
+        esac
+done
+
+if (git==1)
+then
+    rm -rf src/main/webapp/static/*
+    rm -rf src/main/webapp/WEB-INF/html/admin.html
+    git checkout .
+    git pull
+fi
+
+if (vue==1)
+then
+    (cd src/main/vue && npm run build)
+fi
+
+if (java==1)
+then
+    mvn package
+fi
+
+if (tomcat==1)
+then
+    /usr/local/tomcat/shouyoudianjing/bin/shutdown.sh -force
+    rm -rf /var/www/shouyoudianjing
+    mv target/awesome-admin /var/www/shouyoudianjing
+    /usr/local/tomcat/shouyoudianjing/bin/startup.sh
+fi
+

+ 4 - 1
src/main/java/com/izouma/awesomeadmin/service/impl/VideoNotifyServiceImpl.java

@@ -2,6 +2,7 @@ package com.izouma.awesomeadmin.service.impl;
 
 import com.izouma.awesomeadmin.dto.VideoNotifyParam;
 import com.izouma.awesomeadmin.service.VideoNotifyService;
+import org.apache.log4j.Logger;
 import org.springframework.stereotype.Service;
 
 import javax.servlet.http.HttpServletRequest;
@@ -9,9 +10,11 @@ import javax.servlet.http.HttpServletResponse;
 
 @Service
 public class VideoNotifyServiceImpl implements VideoNotifyService {
+    private static Logger logger = Logger.getLogger(PowerInfoServiceImpl.class);
+
     @Override
     public void onConnect(VideoNotifyParam param, HttpServletRequest request, HttpServletResponse response) {
-
+        logger.info("onConnect");
     }
 
     @Override

+ 0 - 1
src/main/java/com/izouma/awesomeadmin/web/VideoNotifyController.java

@@ -18,7 +18,6 @@ public class VideoNotifyController {
 
     @RequestMapping(method = RequestMethod.POST)
     public void videoNotify(VideoNotifyParam param, HttpServletRequest request, HttpServletResponse response) {
-        System.out.println(param);
         switch (param.getCall()) {
             case "connect":
                 videoNotifyService.onConnect(param, request, response);