Browse Source

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 years ago
parent
commit
3cdaf59edc
2 changed files with 13 additions and 7 deletions
  1. 6 1
      controllers/sg/his_api_controller.go
  2. 7 6
      main.go

+ 6 - 1
controllers/sg/his_api_controller.go View File

5354
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
5354
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
5355
 			return
5355
 			return
5356
 		}
5356
 		}
5357
+		fmt.Println("-------")
5358
+		fmt.Println(respJSON["data"])
5359
+		fmt.Println(respJSON["data"].(map[string]interface{})["time_stamp"])
5360
+		fmt.Println(respJSON["data"].(map[string]interface{})["time_stamp"].(float64))
5361
+		fmt.Println("-------")
5357
 
5362
 
5358
-		time_stamp = int64(respJSON["data"].(map[string]interface{})["time_stamp"].(float64))
5363
+		//time_stamp = int64(respJSON["data"].(map[string]interface{})["time_stamp"].(float64))
5359
 
5364
 
5360
 		respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
5365
 		respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
5361
 		userJSONBytes, _ := json.Marshal(respJSON)
5366
 		userJSONBytes, _ := json.Marshal(respJSON)

+ 7 - 6
main.go View File

4
 	"context"
4
 	"context"
5
 	"fmt"
5
 	"fmt"
6
 	"gdyb/models"
6
 	"gdyb/models"
7
-	//_ "gdyb/routers"
7
+	_ "gdyb/routers"
8
+	"gdyb/service"
8
 	"github.com/astaxie/beego"
9
 	"github.com/astaxie/beego"
9
 	"github.com/qiniu/api.v7/auth/qbox"
10
 	"github.com/qiniu/api.v7/auth/qbox"
10
 	"github.com/qiniu/api.v7/storage"
11
 	"github.com/qiniu/api.v7/storage"
14
 )
15
 )
15
 
16
 
16
 func init() {
17
 func init() {
17
-	//service.ConnectDB()
18
-	//org_id, _ := beego.AppConfig.Int64("org_id")
19
-	//miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
20
-	//CreateLog(miConfig)
21
-	//UploadLog(miConfig)
18
+	service.ConnectDB()
19
+	org_id, _ := beego.AppConfig.Int64("org_id")
20
+	miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
21
+	CreateLog(miConfig)
22
+	UploadLog(miConfig)
22
 
23
 
23
 }
24
 }
24
 func main() {
25
 func main() {