Parcourir la source

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

csx il y a 4 ans
Parent
révision
8e193ee9cd

+ 5 - 0
controllers/new_mobile_api_controllers/mobile_regist_controller.go Voir le fichier

@@ -242,6 +242,7 @@ func (this *MobileRegistController) CreateOrg() {
242 242
 		//初始化设备管理org
243 243
 		InitEquitMentInformation(org)
244 244
 		//初始化显示配置
245
+		InitShowConfig(org)
245 246
 
246 247
 		//创建完机构后进行登录验证操作
247 248
 		ip := utils.GetIP(this.Ctx.Request)
@@ -1172,3 +1173,7 @@ func InitEquitMentInformation(org *models.Org) {
1172 1173
 	}
1173 1174
 	service.CreatedTreateMode(&treatmentmodefive)
1174 1175
 }
1176
+
1177
+func InitShowConfig(org *models.Org) {
1178
+	service.BatchInsertFiledSystemConfig(org.Id)
1179
+}

+ 5 - 0
service/data.go Voir le fichier

@@ -185,3 +185,8 @@ func FindSysDialysisFiledByOrgId() (filedConfig []*models.FiledConfig, err error
185 185
 	err = readDb.Model(&models.FiledConfig{}).Where("org_id =? AND id in (11250,11251,11252,11253,11254,11255,11256,11257,11258,11259,11260,11261,11262)", 0).Find(&filedConfig).Error
186 186
 	return
187 187
 }
188
+
189
+func BatchInsertFiledSystemConfig(org_id int64) (err error) {
190
+	err = readDb.Exec("INSERT  INTO sgj_xt.xt_filed_config  ( org_id,  module,  filed_name,  filed_name_cn,  is_show ) SELECT ?,  module,  filed_name,  filed_name_cn,  is_show FROM sgj_xt.xt_filed_config  WHERE org_id = 9442  AND sys_module = 2", org_id).Error
191
+	return
192
+}