Zhou Xiaoning 5 tahun lalu
induk
melakukan
d8c99090ea
4 mengubah file dengan 83 tambahan dan 3 penghapusan
  1. 5 1
      docs/docs.go
  2. 5 1
      docs/swagger.json
  3. 4 1
      docs/swagger.yaml
  4. 69 0
      sh/mtp2.0_QueryService_linux.sh

+ 5 - 1
docs/docs.go

@@ -294,9 +294,13 @@ var doc = `{
                     "type": "string"
                 },
                 "creatorid": {
-                    "description": "创建人",
+                    "description": "创建人ID",
                     "type": "integer"
                 },
+                "creatorname": {
+                    "description": "创建人",
+                    "type": "string"
+                },
                 "goodscode": {
                     "description": "订单商品代码",
                     "type": "string"

+ 5 - 1
docs/swagger.json

@@ -278,9 +278,13 @@
                     "type": "string"
                 },
                 "creatorid": {
-                    "description": "创建人",
+                    "description": "创建人ID",
                     "type": "integer"
                 },
+                "creatorname": {
+                    "description": "创建人",
+                    "type": "string"
+                },
                 "goodscode": {
                     "description": "订单商品代码",
                     "type": "string"

+ 4 - 1
docs/swagger.yaml

@@ -30,8 +30,11 @@ definitions:
         description: 创建时间
         type: string
       creatorid:
-        description: 创建人
+        description: 创建人ID
         type: integer
+      creatorname:
+        description: 创建人
+        type: string
       goodscode:
         description: 订单商品代码
         type: string

+ 69 - 0
sh/mtp2.0_QueryService_linux.sh

@@ -0,0 +1,69 @@
+#!/bin/bash
+
+export base=$HOME/build/git/MTP20_IF
+
+export GOROOT=/home/pub/pathhome/go1.14.4.linux-amd64
+export GOPATH=/home/pub/go:/home/pub/build/git/websocket2tcp:/home/pub/build/git/OpenAccount_WebAPI/WebAPI
+export GOBIN=$GOPATH/bin
+export GO111MODULE=on
+export GOPROXY=https://goproxy.cn
+export PATH=$PATH:$GOROOT/bin:$GOBIN
+
+export PKG_CONFIG_PATH=/usr/lib64/pkgconfig
+export LD_LIBRARY_PATH=/opt/instantclient_11_2/
+
+function build()
+{
+  local src=$1
+  local oldpwd=`pwd`
+  cd $src
+
+  echo "Before switching: "
+  git branch
+  git reset --hard
+  git clean -fdx
+  git pull --rebase
+  git checkout $branch_name
+  echo "After switching: "
+  git branch 
+
+  if [ $? -ne 0  ]; then
+    echo "git update err:1"
+    exit 1
+  fi
+  
+  cd $src
+  #sh $HOME/build/scripts/xml_to_j2.sh openaccount_api $src/src/OpenAccountApi/
+  echo "path:"$src
+  go build -o bin/QueryService
+  if [ $? -ne 0  ]; then
+    echo "go build err: 2"
+    exit 2
+  fi
+  #cp -r config bin/
+  mkdir -p bin/config
+  cp config/config.xml bin/config
+
+  local datestr=`date +%Y%m%d%H%M%S`
+  
+  cd $src/bin/
+
+  local zipfile=mtp2_queryservice_r20_${datestr}.zip
+  local rsync_ip=192.168.30.153
+  local rsync_project=mtp2.0_release
+  
+  zip -r $zipfile ./
+    
+  rsync -avh $src/bin/${zipfile} $rsync_ip::build/$rsync_project/${zipfile}
+  echo "Storage path: \\\\$rsync_ip\\share\\build\\$rsync_project\\$zipfile"
+  
+  rm -rf $src/bin
+}
+
+#######################main function#########################
+build $base
+if [ $? -ne 0  ]; then
+    exit -1
+fi
+
+