Procházet zdrojové kódy

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

csx před 5 roky
rodič
revize
8e193ee9cd

+ 5 - 0
controllers/new_mobile_api_controllers/mobile_regist_controller.go Zobrazit soubor

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

+ 5 - 0
service/data.go Zobrazit soubor

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
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
 	return
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
+}