浏览代码

更新数据

XMLWAN 4 年前
父节点
当前提交
786d4013b8

+ 10 - 0
controllers/new_mobile_api_controllers/new_dialysis_api_controller.go 查看文件

@@ -2037,4 +2037,14 @@ func (this *NewDialysisApiController) GetMyOrganazition() {
2037 2037
 
2038 2038
 func (this *NewDialysisApiController) GetOrgInformation() {
2039 2039
 
2040
+	adminUser := this.GetMobileAdminUserInfo()
2041
+	id := adminUser.Org.Id
2042
+	information, err := service.GetOrgInformation(id)
2043
+	if err != nil {
2044
+		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2045
+		return
2046
+	}
2047
+	this.ServeSuccessJSON(map[string]interface{}{
2048
+		"information": information,
2049
+	})
2040 2050
 }

+ 8 - 0
service/patientmanage_service.go 查看文件

@@ -1170,3 +1170,11 @@ func GetMyOrganaziton(id int64) (org []*models.SgjUserOrg, err error) {
1170 1170
 	err = db.Select("x.id,x.creator,x.org_name,x.org_short_name,x.org_logo,x.org_introduction,x.illness,x.province,x.city,x.district,x.address,x.longitude,x.latitude,x.org_type,x.comments,x.evaluate,x.gallery,x.business_week,x.business_time,x.contact_name,x.telephone,x.claim,x.operating_state,x.source,x.ttype,x.ttid,x.tuid,x.reason,x.level,x.website,x.import,x.sortno,a.is_super_admin").Joins("left join sgj_user_admin as a on a.id = x.creator").Where("x.creator = ?", id).Scan(&org).Error
1171 1171
 	return org, err
1172 1172
 }
1173
+
1174
+func GetOrgInformation(id int64) (models.SgjUserOrg, error) {
1175
+
1176
+	org := models.SgjUserOrg{}
1177
+	fmt.Println("hhh")
1178
+	err := UserReadDB().Where("id=? and status = 1", id).Find(&org).Error
1179
+	return org, err
1180
+}