Browse Source

Merge branch 'master' of http://git.ycjcjy.com/pet_identity/service

张延森 3 years ago
parent
commit
c32b34da50

+ 38
- 0
deploy/backup.sh View File

@@ -0,0 +1,38 @@
1
+#!/bin/bash
2
+#
3
+#
4
+
5
+source /etc/profile
6
+
7
+#
8
+BackupDir=/opt/apps/mysqlbackup
9
+fmonth=`date "+%Y%m"`
10
+fdate=`date "+%Y%m%d%H%M%S"`
11
+logfile=$BackupDir/backmysql.log
12
+chown -R mysql:mysql $BackupDir
13
+chmod -R 775 $BackupDir
14
+
15
+# 备份
16
+function backupPetIdentity () {
17
+  echo "`date "+%m %d %H:%M:%S"` Begin backup pet_identity database" >> $logfile
18
+
19
+  if [ ! -d $BackupDir/$fmonth ];then
20
+    mkdir -p $BackupDir/$fmonth
21
+  fi
22
+
23
+  chown -R mysql:mysql $BackupDir/$fmonth
24
+  cd $BackupDir/$fmonth
25
+
26
+  mysqldump -R -E pet_identity > pet_identity_$fdate.sql
27
+
28
+  echo "`date "+%m %d %H:%M:%S"` Begin compress database " >> $logfile
29
+  tar -cf pet_identity_$fdate.sql.tar pet_identity_$fdate.sql
30
+  rm -f pet_identity_$fdate.sql
31
+  echo "`date "+%m %d %H:%M:%S"` data compress done" >> $logfile
32
+
33
+  echo "`date "+%m %d %H:%M:%S"` backup pet_identity database done" >> $logfile
34
+  echo "`date "+%m %d %H:%M:%S"` backup file $BackupDir/$fmonth/pet_identity_$fdate.sql.tar" >> $logfile
35
+}
36
+
37
+backupPetIdentity
38
+echo "mysql数据库备份完成"

+ 0
- 5
deploy/bootstrap View File

@@ -1,5 +0,0 @@
1
-#!/bin/bash
2
-#
3
-#
4
-
5
-java -jar ./ubpa-0.0.7.jar

+ 0
- 35
deploy/s.yml View File

@@ -1,35 +0,0 @@
1
-edition: 1.0.0          #  命令行YAML规范版本,遵循语义化版本(Semantic Versioning)规范。
2
-name: ubpa-plat        #  项目名称。
3
-access: default         #  密钥别名。
4
-
5
-services:
6
-  dianyang: #  服务名称。
7
-    component: devsapp/fc
8
-    props: #  组件的属性值。
9
-      region: cn-shanghai
10
-      service:
11
-        name: ubpa-plat
12
-        description: 'ubpa-plat'
13
-        internetAccess: true
14
-      function:
15
-        name: ubpa-func
16
-        description: 'ubpa-func'
17
-        ossBucket: yz-serverless
18
-        ossKey: ubpa/ubpa-0.0.7.zip
19
-        handler: 'com.njyunzhi.ubpa.UbpaApplication::main'
20
-        memorySize: 1024
21
-        timeout: 30
22
-        runtime: custom
23
-        caPort: 9000
24
-        initializationTimeout: 30
25
-        instanceConcurrency: 10
26
-      triggers:
27
-        - name: httpUbpa
28
-          type: http
29
-          config:
30
-            authType: anonymous
31
-            methods:
32
-              - GET
33
-              - POST
34
-              - PUT
35
-              - DELETE

+ 24
- 0
deploy/start.sh View File

@@ -0,0 +1,24 @@
1
+#!/bin/sh
2
+#
3
+#
4
+#source /etc/profile
5
+
6
+JAVA_HOME=/opt/apps/jdk1.8.0_331
7
+JRE_HOME=$JAVA_HOME/jre
8
+PATH=$PATH:$JAVA_HOME/bin
9
+CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
10
+export JAVA_HOME
11
+export JRE_HOME
12
+export PATH
13
+export CLASSPATH
14
+
15
+SERVICE_HOME="/opt/apps/pet-identity/service"
16
+LOG="$SERVICE_HOME/logs/service.log"
17
+JAR=$(ls -lt ${SERVICE_HOME}/*.jar|head -n1|rev|cut -d" " -f1|rev)
18
+LIBS="$SERVICE_HOME/libs"
19
+CONFIG_PATH="$SERVICE_HOME/config/"
20
+
21
+nohup java -Dloader.path=$LIBS -jar $JAR --spring.config.location=$CONFIG_PATH > $LOG 2>&1 &
22
+
23
+tail -f $LOG
24
+

+ 1
- 1
pom.xml View File

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.njyunzhi</groupId>
12 12
 	<artifactId>pet_identity</artifactId>
13
-	<version>0.0.3</version>
13
+	<version>0.0.4</version>
14 14
 	<name>pet_identity</name>
15 15
 	<description>Demo project for Spring Boot</description>
16 16
 

+ 3
- 1
src/main/java/com/njyunzhi/pet_identity/controller/TaApplicationController.java View File

@@ -84,7 +84,8 @@ public class TaApplicationController extends BaseController {
84 84
                                           @ApiParam("犬名") @RequestParam(value ="petName", required = false) String petName,
85 85
                                           @ApiParam("卡号") @RequestParam(value ="originCardNo", required = false) String originCardNo,
86 86
                                           @ApiParam("是否企业") @RequestParam(value ="isOrg", required = false) Boolean isOrg,
87
-                                          @ApiParam("企业名称") @RequestParam(value ="orgName", required = false) String orgName) throws Exception{
87
+                                          @ApiParam("企业名称") @RequestParam(value ="orgName", required = false) String orgName,
88
+                                          @ApiParam("状态") @RequestParam(value ="status", required = false) Integer status) throws Exception{
88 89
 
89 90
         SysUser sysUser = currentUser();
90 91
 
@@ -93,6 +94,7 @@ public class TaApplicationController extends BaseController {
93 94
         queryWrapper.gt("status", Constants.STATUS_DELETE);
94 95
         queryWrapper.eq(!StringUtils.isEmpty(applyType), "apply_type", applyType);
95 96
         queryWrapper.eq(null != applyMethod, "apply_method", applyMethod);
97
+        queryWrapper.eq(null != status, "status", status);
96 98
         queryWrapper.eq(null != payStatus, "pay_status", payStatus);
97 99
         queryWrapper.eq(null != verifyStatus, "verify_status", verifyStatus);
98 100
         queryWrapper.eq(null != isOrg, "is_org", isOrg);

+ 1
- 1
src/main/resources/application-prod.yml View File

@@ -8,7 +8,7 @@ spring:
8 8
       max-file-size: 10MB
9 9
       max-request-size: 50MB
10 10
   datasource:
11
-    url: jdbc:mysql://110.40.183.156:3306/pet_identity?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
11
+    url: jdbc:mysql://localhost:3306/pet_identity?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
12 12
     username: pet_identity
13 13
     password: pet@ABCD1234
14 14
 

+ 3
- 3
src/main/resources/application.yml View File

@@ -72,13 +72,13 @@ aliyun:
72 72
 ###
73 73
 weixin:
74 74
   miniapp:
75
-    appid: wxe44244d1a5ea3364
76
-    secret: b7dbbb7b51d40aa716115e76721ed3ff
75
+    appid: wx0e3d36f7447d9868
76
+    secret: 68b4be08314cf352575e6ef69f0f109d
77 77
     token:
78 78
     aesKey:
79 79
     msgDataFormat: JSON
80 80
   pay:
81
-    appId: wxe44244d1a5ea3364
81
+    appId: wx0e3d36f7447d9868
82 82
     mchId: 1621038483
83 83
     mchKey: #????
84 84
     subAppId: #??????????????ID