Explorar o código

config.json 测试环境修改

hebinlong %!s(int64=4) %!d(string=hai) anos
pai
achega
50878f7592
Modificáronse 3 ficheiros con 7 adicións e 8 borrados
  1. 1 1
      Makefile
  2. 3 4
      config.json
  3. 3 3
      router/RouterManchong/resp.go

+ 1 - 1
Makefile

@@ -24,7 +24,7 @@ FILES = $(call FindGoFile,.)
 
 ${EDIT}:${FILES} Makefile
 	@echo "Lock Files: ${FILES}"
-	CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o $@ ${GO_FLAGS} ./com
+	CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o $@ ${GO_FLAGS} -trimpath ./com
 
 ${FILES}:
 .PHONY: test clean run

+ 3 - 4
config.json

@@ -5,12 +5,11 @@
   "users": {"test": "test"},
   "mysql": {
     "User": "root",
-    "Passwd": "",
+    "Passwd": "nibuzhidaowozhidao",
     "Net": "tcp",
-    "Addr": "127.0.0.1:3306",
-    "DBName": "data",
+    "Addr": "192.168.2.78:3306",
+    "DBName": "fmp",
     "Params": {},
-    "Collation": "utf8mb4_general_ci",
     "MaxAllowedPacket": 4194304,
     "ServerPubKey": "",
     "AllowNativePasswords": true,

+ 3 - 3
router/RouterManchong/resp.go

@@ -8,8 +8,8 @@ import (
 )
 
 type par struct {
-	PackageId interface{} `json:"packageId"`
-	STATUS    int         `json:"STATUS"`
+	PackageId string `json:"packageId"`
+	STATUS    string `json:"STATUS"`
 }
 
 type respBody struct {
@@ -34,7 +34,7 @@ CREATE TABLE `flow_product_manchong_status` (
 func (r *respBody) getData() {
 	r.RESP.RCODE = "00"
 	r.RESP.RMSG = "OK"
-	result, err := DB.Query("select package_id,status from flow_product_status")
+	result, err := DB.Query("select package_id,status from flow_product_manchong_status")
 	if err != nil {
 		r.RESP.RCODE = "99"
 		r.RESP.RMSG = err.Error()