Browse Source

Merge branch 'master' of http://git.shengws.com/zhangbj/scrm-go

xiaoming_global 5 years ago
parent
commit
4dcb3f689a
1 changed files with 19 additions and 1 deletions
  1. 19 1
      controllers/micro/micro_controller.go

+ 19 - 1
controllers/micro/micro_controller.go View File

@@ -23,6 +23,7 @@ func microRouters(){
23 23
 	beego.Router("/api/site/singleactivitinfo",&Micro{},"Get:GetActivitDetail")
24 24
 	beego.Router("/api/site/singlearticleinfo",&Micro{},"Get:GetArticlesDetail")
25 25
    beego.Router("/api/site/singledoctorinfo",&Micro{},"Get:GetDoctorInfo")
26
+   beego.Router("/api/site/getdata",&Micro,"Get:GetData")
26 27
 }
27 28
 
28 29
 type Micro struct {
@@ -41,7 +42,24 @@ func (this *Micro) ServeSuccessJSON(data map[string]interface{}) {
41 42
 
42 43
 
43 44
 func (this *Micro) GetDataByOrgId(){
44
-	fmt.Println("我和我的祖国")
45
+	fmt.Println("我的 ")
46
+	orgid, _ := this.GetInt64("orgid")
47
+	fmt.Println("小明id",orgid)
48
+	model, err := micro_service.GetData(orgid)
49
+	fmt.Println("model是什么",model)
50
+	fmt.Println("err",err)
51
+	if err !=nil{
52
+		this.ServeFailJsonSend(enums.ErrorCodeDataException, "删除回复成功")
53
+		return
54
+	}
55
+	this.ServeSuccessJSON(map[string]interface{}{
56
+		"patientModels":model,
57
+	})
58
+}
59
+
60
+func (this *Micro) GetData(){
61
+	// fmt.Println("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")
62
+	fmt.Println("我的 ")
45 63
 	orgid, _ := this.GetInt64("orgid")
46 64
 	fmt.Println("小明id",orgid)
47 65
 	model, err := micro_service.GetData(orgid)