Bladeren bron

体积小

XMLWAN 3 jaren geleden
bovenliggende
commit
8092674619

+ 1 - 1
controllers/xcx_mobile_api_controller.go/xcx_api_controller.go Bestand weergeven

@@ -681,7 +681,7 @@ func (this *XcxApiController) GetDataConfig() {
681 681
 
682 682
 	patient_id, _ := this.GetInt64("patient_id")
683 683
 	fmt.Println("patient_id", patient_id)
684
-	info, _ := service.GetXcxPatientInfo(patient_id)
684
+	info, _ := service.GetXcxPatientInfo(1)
685 685
 	list, _ := service.GetDataConfig(info.UserOrgId)
686 686
 	this.ServeSuccessJSON(map[string]interface{}{
687 687
 		"list": list,

+ 1 - 1
service/xcx_mobile_api_service.go Bestand weergeven

@@ -562,6 +562,6 @@ func GetTreatMentConfig(orgid int64) (list []*models.XcxFiledConfig, err error)
562 562
 
563 563
 func GetDataConfig(orgid int64) (list []*models.XcxDataConfig, err error) {
564 564
 
565
-	err = XTReadDB().Model(&list).Where("org_id = ? and org_id = 0 and status = 1", orgid).Find(&list).Error
565
+	err = XTReadDB().Model(&list).Where("(org_id = ? or org_id = 0) and status = 1", orgid).Find(&list).Error
566 566
 	return list, err
567 567
 }