Bläddra i källkod

id类型修改

WH01243 1 år sedan
förälder
incheckning
2672a8a8ee
3 ändrade filer med 5 tillägg och 5 borttagningar
  1. 1 1
      api/bicenter.api
  2. 1 1
      api/internal/service/sqlService.go
  3. 3 3
      api/internal/types/types.go

+ 1 - 1
api/bicenter.api

@@ -6,7 +6,7 @@ type (
 		Data       interface{} `json:"data"`
 	}
 	SqlManageReq {
-		Id     int64   `json:"id"`
+		Id     float64 `json:"id"`
 		Params []Param `json:"params"`
 	}
 	Param {

+ 1 - 1
api/internal/service/sqlService.go

@@ -14,7 +14,7 @@ type SqlService struct {
 
 func (l SqlService) SqlManage(in *types.SqlManageReq) *[]map[string]interface{} {
 	sqlData := MC.BaseMysql.FindOne("sql_manage", map[string]interface{}{
-		"id": in.Id,
+		"id": common.Int64All(in.Id),
 	}, "", "")
 	if sqlData == nil || len(*sqlData) == 0 {
 		return &[]map[string]interface{}{}

+ 3 - 3
api/internal/types/types.go

@@ -8,7 +8,7 @@ type Reply struct {
 }
 
 type SqlManageReq struct {
-	Id     int64   `json:"id"`
+	Id     float64 `json:"id"`
 	Params []Param `json:"params"`
 }
 
@@ -18,6 +18,6 @@ type Param struct {
 }
 
 type MyInfoReq struct {
-	Bid string `json:"bid "`
-	Sid string `json:"sid "`
+	Bid string `json:"bid,optional"`
+	Sid string `json:"sid"`
 }