|
@@ -94,18 +94,18 @@ func (this *XcxApiController) GetUserRegister() {
|
94
|
94
|
if errcode == gorm.ErrRecordNotFound {
|
95
|
95
|
err := service.CreateXcxAdminUser(role)
|
96
|
96
|
if err == nil {
|
97
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
98
|
|
- return
|
|
97
|
+ mobilePatient, _ := service.GetMobilePatient(id_card_no)
|
|
98
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
99
|
+ "role": role,
|
|
100
|
+ "is_bind": true,
|
|
101
|
+ "patient": mobilePatient,
|
|
102
|
+ })
|
99
|
103
|
} else {
|
100
|
104
|
this.ServeSuccessJSON(map[string]interface{}{
|
101
|
105
|
"is_bind": false,
|
102
|
106
|
"msg": "绑定失败",
|
103
|
107
|
})
|
104
|
108
|
}
|
105
|
|
- this.ServeSuccessJSON(map[string]interface{}{
|
106
|
|
- "role": role,
|
107
|
|
- })
|
108
|
|
-
|
109
|
109
|
} else if errcode == nil {
|
110
|
110
|
mobilePatient, _ := service.GetMobilePatient(id_card_no)
|
111
|
111
|
this.ServeSuccessJSON(map[string]interface{}{
|