wuweihao пре 3 година
родитељ
комит
eb1b734d11

+ 36 - 0
expo_zhengzhou_api/gis_api/src/main/java/com/gis/api/controller/TestController.java

@@ -0,0 +1,36 @@
+package com.gis.api.controller;
+
+import com.gis.common.util.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+
+/**
+ * Created by owen on 2021/7/13 0013 14:19
+ */
+@ApiIgnore
+@Slf4j
+@Api(tags = "测试")
+@RestController
+public class TestController {
+
+
+    @ApiOperation("保存人流量")
+    @GetMapping("/{aa}/test")
+    public Result saveVisit(@PathVariable String aa){
+        log.info("参数: {}", aa);
+
+        return Result.failure(aa);
+    }
+
+    @ApiOperation("保存人流量api")
+    @GetMapping("/{aa}/api")
+    public Result saveVisitapi(@PathVariable String aa){
+        log.info("参数: {}", aa);
+
+        return Result.failure(aa);
+    }
+}

+ 7 - 0
expo_zhengzhou_api/gis_api/src/main/java/com/gis/api/entity/dto/UserDto.java

@@ -29,4 +29,11 @@ public class UserDto  {
 
     @ApiModelProperty(value = "展位号" )
     private String boothNum;
+
+    @ApiModelProperty(value = "daikan:带看, 不传是其他" )
+    private String type;
+
+
+
+
 }

+ 3 - 0
expo_zhengzhou_api/gis_api/src/main/java/com/gis/api/entity/po/UserEntity.java

@@ -31,5 +31,8 @@ public class UserEntity extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "展位号" )
     private String boothNum;
 
+    @ApiModelProperty(value = "daikan:带看, 不传是其他" )
+    private String type;
+
 
 }

expo_zhengzhou_api/gis_application/src/main/resources/application-sit.properties → expo_zhengzhou_api/gis_application/src/main/resources/application-pro.properties


+ 60 - 0
expo_zhengzhou_api/run.sh

@@ -0,0 +1,60 @@
+#!/bin/sh
+APP_NAME=expo_zhengzhou_api.jar
+APP_PORT=8005
+APP_EVN=$2   #执行环境 sit|pro
+APP_ORDER=$1   #执行方法  start|stop|restart
+# 获取进程号
+APP_PID=`netstat -ntpl | grep $APP_PORT | grep LISTEN | awk '{print $7}' | awk -F "/" '{print $1}'`
+
+
+# 启动命令
+startApp(){
+    if [ ${APP_PID} ];
+    then
+    	echo "程序已经在运行了"
+    else
+    	echo "执行 start 方法"
+    	nohup java -jar -Xmx3072M -Xms512M ./$APP_NAME --spring.profiles.active=$APP_EVN --server.port=$APP_PORT > logs.log 2>error.log &  # 说明pid为空
+	echo Start Success!
+fi
+}
+
+# 停止命令
+stopApp(){
+    echo "执行 stop 方法"
+    if [ ${APP_PID} ];
+	then
+		echo $APP_NAME "存在,执行 stop 方法"
+			kill -9 ${APP_PID} && echo 'Kill Process!'
+	else
+		echo $APP_NAME 没有运行
+    fi
+}
+
+# 重启命令
+restartApp(){
+    echo " 1 执行 restart 方法"
+	stopApp
+	APP_PID=''  #将进程号置空
+	sleep 2
+	echo "进程号:" ${APP_PID} "端口号:" ${APP_PORT}
+	echo " 2 执行 restart 方法"
+	startApp
+}
+
+# 判断执行命令 取第一个参数
+case $APP_ORDER in
+    "start")
+        startApp
+        ;;
+    "stop")
+        stopApp
+        ;;
+	"restart")
+		restartApp
+        ;;
+        *)
+     ;;
+esac
+
+