|
@@ -165,322 +165,340 @@ func (this *PublicApiController) GetJson() {
|
165
|
165
|
func (c *PublicApiController) HandleData() {
|
166
|
166
|
//service.HandleData()
|
167
|
167
|
|
168
|
|
- //org_app, _ := service.GetAllAppOrg()
|
|
168
|
+ org_app, _ := service.GetAllAppOrg()
|
169
|
169
|
//org_role, _ := service.GetAllRole()
|
170
|
170
|
//
|
171
|
171
|
//var org_ids []int64
|
172
|
172
|
|
173
|
|
- //for _, apps := range org_app {
|
174
|
|
- // xt_org_app, _ := service.GetAppByType(int64(apps.OrgId), 3)
|
175
|
|
- // scrm_org_app, _ := service.GetAppByType(int64(apps.OrgId), 1)
|
176
|
|
- // cdm_org_app, _ := service.GetAppByType(int64(apps.OrgId), 4)
|
177
|
|
- // mall_org_app, _ := service.GetAppByType(int64(apps.OrgId), 5)
|
178
|
|
- // org_app_6, _ := service.GetAppByType(int64(apps.OrgId), 6)
|
179
|
|
- // org_app_7, _ := service.GetAppByType(int64(apps.OrgId), 7)
|
180
|
|
- // org_app_8, _ := service.GetAppByType(int64(apps.OrgId), 8)
|
181
|
|
- // org_app_9, _ := service.GetAppByType(int64(apps.OrgId), 9)
|
182
|
|
- // org_app_10, _ := service.GetAppByType(int64(apps.OrgId), 10)
|
183
|
|
- // org_app_11, _ := service.GetAppByType(int64(apps.OrgId), 11)
|
184
|
|
- // org_app_12, _ := service.GetAppByType(int64(apps.OrgId), 12)
|
185
|
|
- // org_app_13, _ := service.GetAppByType(int64(apps.OrgId), 13)
|
186
|
|
- // org_app_14, _ := service.GetAppByType(int64(apps.OrgId), 14)
|
187
|
|
- // org_app_15, _ := service.GetAppByType(int64(apps.OrgId), 15)
|
188
|
|
- //
|
189
|
|
- // var xt_temp_org_app *models.OrgApp
|
190
|
|
- // var mall_temp_org_app *models.OrgApp
|
191
|
|
- //
|
192
|
|
- // if xt_org_app == nil || xt_org_app.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
193
|
|
- //
|
194
|
|
- // app, _ := service.GetOrgAppA(0, 3)
|
195
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
196
|
|
- // if org == nil || org.Id == 0 {
|
197
|
|
- // continue
|
198
|
|
- // }
|
199
|
|
- //
|
200
|
|
- // app.Id = 0
|
201
|
|
- // app.OrgId = apps.OrgId
|
202
|
|
- // app.Creator = int(org.Creator)
|
203
|
|
- // app.Number = 0
|
204
|
|
- // app.Status = 1
|
205
|
|
- // app.ModifyTime = time.Now().Unix()
|
206
|
|
- // app.CreateTime = time.Now().Unix()
|
207
|
|
- // service.CreateOrgApp(app)
|
208
|
|
- // xt_temp_org_app = app
|
209
|
|
- // } else {
|
210
|
|
- //
|
211
|
|
- // xt_temp_org_app = xt_org_app
|
212
|
|
- //
|
213
|
|
- // }
|
214
|
|
- //
|
215
|
|
- // if scrm_org_app == nil || scrm_org_app.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
216
|
|
- //
|
217
|
|
- // app, _ := service.GetOrgAppA(0, 1)
|
218
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
219
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
220
|
|
- // if org == nil || org.Id == 0 {
|
221
|
|
- // continue
|
222
|
|
- // }
|
223
|
|
- //
|
224
|
|
- //
|
225
|
|
- // app.OrgId = apps.OrgId
|
226
|
|
- // app.Id = 0
|
227
|
|
- //
|
228
|
|
- // app.Creator = int(org.Creator)
|
229
|
|
- // app.Number = 0
|
230
|
|
- // app.Status = 1
|
231
|
|
- // app.ModifyTime = time.Now().Unix()
|
232
|
|
- // app.CreateTime = time.Now().Unix()
|
233
|
|
- // service.CreateOrgApp(app)
|
234
|
|
- //
|
235
|
|
- // }
|
236
|
|
- //
|
237
|
|
- // if cdm_org_app == nil || cdm_org_app.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
238
|
|
- // app, _ := service.GetOrgAppA(0, 4)
|
239
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
240
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
241
|
|
- // if org == nil || org.Id == 0 {
|
242
|
|
- // continue
|
243
|
|
- // }
|
244
|
|
- //
|
245
|
|
- //
|
246
|
|
- // app.OrgId = apps.OrgId
|
247
|
|
- // app.Creator = int(org.Creator)
|
248
|
|
- // app.Number = 0
|
249
|
|
- // app.Id = 0
|
250
|
|
- //
|
251
|
|
- // app.Status = 1
|
252
|
|
- // app.ModifyTime = time.Now().Unix()
|
253
|
|
- // app.CreateTime = time.Now().Unix()
|
254
|
|
- // service.CreateOrgApp(app)
|
255
|
|
- // }
|
256
|
|
- //
|
257
|
|
- // if mall_org_app == nil || mall_org_app.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
258
|
|
- // app, _ := service.GetOrgAppA(0, 5)
|
259
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
260
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
261
|
|
- //
|
262
|
|
- // if org == nil || org.Id == 0 {
|
263
|
|
- // continue
|
264
|
|
- // }
|
265
|
|
- //
|
266
|
|
- // app.OrgId = apps.OrgId
|
267
|
|
- // app.Creator = int(org.Creator)
|
268
|
|
- // app.Number = 0
|
269
|
|
- // app.Id = 0
|
270
|
|
- //
|
271
|
|
- // app.Status = 1
|
272
|
|
- // app.ModifyTime = time.Now().Unix()
|
273
|
|
- // app.CreateTime = time.Now().Unix()
|
274
|
|
- // service.CreateOrgApp(app)
|
275
|
|
- // mall_temp_org_app = app
|
276
|
|
- // } else {
|
277
|
|
- // mall_temp_org_app = mall_org_app
|
278
|
|
- // }
|
279
|
|
- //
|
280
|
|
- // if org_app_6 == nil || org_app_6.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
281
|
|
- // app, _ := service.GetOrgAppA(0, 6)
|
282
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
283
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
284
|
|
- // if org == nil || org.Id == 0 {
|
285
|
|
- // continue
|
286
|
|
- // }
|
287
|
|
- //
|
288
|
|
- //
|
289
|
|
- // app.OrgId = apps.OrgId
|
290
|
|
- // app.Creator = int(org.Creator)
|
291
|
|
- // app.Number = 1
|
292
|
|
- // app.Id = 0
|
293
|
|
- //
|
294
|
|
- // app.Status = 1
|
295
|
|
- // app.ModifyTime = time.Now().Unix()
|
296
|
|
- // app.CreateTime = time.Now().Unix()
|
297
|
|
- // app.Pid = xt_temp_org_app.Id
|
298
|
|
- // service.CreateOrgApp(app)
|
299
|
|
- //
|
300
|
|
- // }
|
301
|
|
- // if org_app_7 == nil || org_app_7.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
302
|
|
- // app, _ := service.GetOrgAppA(0, 7)
|
303
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
304
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
305
|
|
- // if org == nil || org.Id == 0 {
|
306
|
|
- // continue
|
307
|
|
- // }
|
308
|
|
- //
|
309
|
|
- //
|
310
|
|
- // app.OrgId = apps.OrgId
|
311
|
|
- // app.Creator = int(org.Creator)
|
312
|
|
- // app.Number = 2
|
313
|
|
- // app.Status = 2
|
314
|
|
- // app.Id = 0
|
315
|
|
- //
|
316
|
|
- // app.ModifyTime = time.Now().Unix()
|
317
|
|
- // app.CreateTime = time.Now().Unix()
|
318
|
|
- // app.Pid = xt_temp_org_app.Id
|
319
|
|
- //
|
320
|
|
- // service.CreateOrgApp(app)
|
321
|
|
- // }
|
322
|
|
- // if org_app_8 == nil || org_app_8.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
323
|
|
- // app, _ := service.GetOrgAppA(0, 8)
|
324
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
325
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
326
|
|
- // if org == nil || org.Id == 0 {
|
327
|
|
- // continue
|
328
|
|
- // }
|
329
|
|
- //
|
330
|
|
- //
|
331
|
|
- // app.OrgId = apps.OrgId
|
332
|
|
- // app.Creator = int(org.Creator)
|
333
|
|
- // app.Number = 3
|
334
|
|
- // app.Id = 0
|
335
|
|
- //
|
336
|
|
- // app.Pid = mall_temp_org_app.Id
|
337
|
|
- //
|
338
|
|
- // app.Status = 1
|
339
|
|
- // app.ModifyTime = time.Now().Unix()
|
340
|
|
- // app.CreateTime = time.Now().Unix()
|
341
|
|
- // service.CreateOrgApp(app)
|
342
|
|
- // }
|
343
|
|
- // if org_app_9 == nil || org_app_9.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
344
|
|
- // app, _ := service.GetOrgAppA(0, 9)
|
345
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
346
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
347
|
|
- // if org == nil || org.Id == 0 {
|
348
|
|
- // continue
|
349
|
|
- // }
|
350
|
|
- //
|
351
|
|
- //
|
352
|
|
- // app.OrgId = apps.OrgId
|
353
|
|
- // app.Pid = xt_temp_org_app.Id
|
354
|
|
- //
|
355
|
|
- // app.Creator = int(org.Creator)
|
356
|
|
- // app.Number = 4
|
357
|
|
- // app.Id = 0
|
358
|
|
- //
|
359
|
|
- // app.Status = 1
|
360
|
|
- // app.ModifyTime = time.Now().Unix()
|
361
|
|
- // app.CreateTime = time.Now().Unix()
|
362
|
|
- // service.CreateOrgApp(app)
|
363
|
|
- //
|
364
|
|
- // }
|
365
|
|
- // if org_app_10 == nil || org_app_10.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
366
|
|
- // app, _ := service.GetOrgAppA(0, 10)
|
367
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
368
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
369
|
|
- // if org == nil || org.Id == 0 {
|
370
|
|
- // continue
|
371
|
|
- // }
|
372
|
|
- //
|
373
|
|
- //
|
374
|
|
- // app.OrgId = apps.OrgId
|
375
|
|
- // app.Creator = int(org.Creator)
|
376
|
|
- // app.Pid = xt_temp_org_app.Id
|
377
|
|
- //
|
378
|
|
- // app.Number = 5
|
379
|
|
- // app.Id = 0
|
380
|
|
- //
|
381
|
|
- // app.Status = 1
|
382
|
|
- // app.ModifyTime = time.Now().Unix()
|
383
|
|
- // app.CreateTime = time.Now().Unix()
|
384
|
|
- // service.CreateOrgApp(app)
|
385
|
|
- // }
|
386
|
|
- // if org_app_11 == nil || org_app_11.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
387
|
|
- // app, _ := service.GetOrgAppA(0, 11)
|
388
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
389
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
390
|
|
- // if org == nil || org.Id == 0 {
|
391
|
|
- // continue
|
392
|
|
- // }
|
393
|
|
- //
|
394
|
|
- //
|
395
|
|
- // app.OrgId = apps.OrgId
|
396
|
|
- // app.Creator = int(org.Creator)
|
397
|
|
- // app.Pid = xt_temp_org_app.Id
|
398
|
|
- // app.Id = 0
|
399
|
|
- //
|
400
|
|
- // app.Number = 6
|
401
|
|
- // app.Status = 1
|
402
|
|
- // app.ModifyTime = time.Now().Unix()
|
403
|
|
- // app.CreateTime = time.Now().Unix()
|
404
|
|
- // service.CreateOrgApp(app)
|
405
|
|
- // }
|
406
|
|
- // if org_app_12 == nil || org_app_12.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
407
|
|
- // app, _ := service.GetOrgAppA(0, 12)
|
408
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
409
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
410
|
|
- // if org == nil || org.Id == 0 {
|
411
|
|
- // continue
|
412
|
|
- // }
|
413
|
|
- //
|
414
|
|
- //
|
415
|
|
- // app.OrgId = apps.OrgId
|
416
|
|
- // app.Creator = int(org.Creator)
|
417
|
|
- // app.Pid = xt_temp_org_app.Id
|
418
|
|
- // app.Number = 7
|
419
|
|
- // app.Status = 1
|
420
|
|
- // app.Id = 0
|
421
|
|
- //
|
422
|
|
- // app.ModifyTime = time.Now().Unix()
|
423
|
|
- // app.CreateTime = time.Now().Unix()
|
424
|
|
- // service.CreateOrgApp(app)
|
425
|
|
- // }
|
426
|
|
- // if org_app_13 == nil || org_app_13.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
427
|
|
- // app, _ := service.GetOrgAppA(0, 13)
|
428
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
429
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
430
|
|
- // if org == nil || org.Id == 0 {
|
431
|
|
- // continue
|
432
|
|
- // }
|
433
|
|
- //
|
434
|
|
- //
|
435
|
|
- // app.OrgId = apps.OrgId
|
436
|
|
- // app.Creator = int(org.Creator)
|
437
|
|
- // app.Pid = xt_temp_org_app.Id
|
438
|
|
- // app.Number = 8
|
439
|
|
- // app.Id = 0
|
440
|
|
- // app.Status = 1
|
441
|
|
- // app.ModifyTime = time.Now().Unix()
|
442
|
|
- // app.CreateTime = time.Now().Unix()
|
443
|
|
- // service.CreateOrgApp(app)
|
444
|
|
- // }
|
445
|
|
- // if org_app_14 == nil || org_app_14.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
446
|
|
- // app, _ := service.GetOrgAppA(0, 14)
|
447
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
448
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
449
|
|
- // if org == nil || org.Id == 0 {
|
450
|
|
- // continue
|
451
|
|
- // }
|
452
|
|
- //
|
453
|
|
- //
|
454
|
|
- // app.OrgId = apps.OrgId
|
455
|
|
- // app.Creator = int(org.Creator)
|
456
|
|
- // app.Pid = xt_temp_org_app.Id
|
457
|
|
- // app.Id = 0
|
458
|
|
- // app.Number = 9
|
459
|
|
- // app.Status = 1
|
460
|
|
- // app.ModifyTime = time.Now().Unix()
|
461
|
|
- // app.CreateTime = time.Now().Unix()
|
462
|
|
- // service.CreateOrgApp(app)
|
463
|
|
- // }
|
464
|
|
- //
|
465
|
|
- // if org_app_15 == nil || org_app_15.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
466
|
|
- // app, _ := service.GetOrgAppA(0, 15)
|
467
|
|
- // //org, _ := service.GetOrgById(int64(12))
|
468
|
|
- // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
469
|
|
- // if org == nil || org.Id == 0 {
|
470
|
|
- // continue
|
471
|
|
- // }
|
472
|
|
- //
|
473
|
|
- // app.OrgId = apps.OrgId
|
474
|
|
- // app.Creator = int(org.Creator)
|
475
|
|
- // app.Pid = xt_temp_org_app.Id
|
476
|
|
- // app.Number = 10
|
477
|
|
- // app.Status = 1
|
478
|
|
- // app.Id = 0
|
479
|
|
- // app.ModifyTime = time.Now().Unix()
|
480
|
|
- // app.CreateTime = time.Now().Unix()
|
481
|
|
- // service.CreateOrgApp(app)
|
482
|
|
- // }
|
483
|
|
- //}
|
|
173
|
+ for _, apps := range org_app {
|
|
174
|
+ xt_org_app, _ := service.GetAppByType(int64(apps.OrgId), 3)
|
|
175
|
+ //org_app_6, _ := service.GetAppByType(int64(apps.OrgId), 6)
|
|
176
|
+ //org_app_7, _ := service.GetAppByType(int64(apps.OrgId), 7)
|
|
177
|
+ //org_app_8, _ := service.GetAppByType(int64(apps.OrgId), 8)
|
|
178
|
+ //org_app_9, _ := service.GetAppByType(int64(apps.OrgId), 9)
|
|
179
|
+ //org_app_10, _ := service.GetAppByType(int64(apps.OrgId), 10)
|
|
180
|
+ //org_app_11, _ := service.GetAppByType(int64(apps.OrgId), 11)
|
|
181
|
+ //org_app_12, _ := service.GetAppByType(int64(apps.OrgId), 12)
|
|
182
|
+ //org_app_13, _ := service.GetAppByType(int64(apps.OrgId), 13)
|
|
183
|
+ //org_app_14, _ := service.GetAppByType(int64(apps.OrgId), 14)
|
|
184
|
+ //org_app_15, _ := service.GetAppByType(int64(apps.OrgId), 15)
|
|
185
|
+
|
|
186
|
+ org_app_16, _ := service.GetAppByType(int64(apps.OrgId), 16)
|
|
187
|
+ org_app_17, _ := service.GetAppByType(int64(apps.OrgId), 17)
|
|
188
|
+
|
|
189
|
+ var xt_temp_org_app *models.OrgApp
|
|
190
|
+ //var mall_temp_org_app *models.OrgApp
|
|
191
|
+
|
|
192
|
+ if xt_org_app == nil || xt_org_app.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
193
|
+
|
|
194
|
+ app, _ := service.GetOrgAppA(0, 3)
|
|
195
|
+ org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
196
|
+ if org == nil || org.Id == 0 {
|
|
197
|
+ continue
|
|
198
|
+ }
|
|
199
|
+
|
|
200
|
+ app.Id = 0
|
|
201
|
+ app.OrgId = apps.OrgId
|
|
202
|
+ app.Creator = int(org.Creator)
|
|
203
|
+ app.Number = 0
|
|
204
|
+ app.Status = 1
|
|
205
|
+ app.ModifyTime = time.Now().Unix()
|
|
206
|
+ app.CreateTime = time.Now().Unix()
|
|
207
|
+ service.CreateOrgApp(app)
|
|
208
|
+ xt_temp_org_app = app
|
|
209
|
+ } else {
|
|
210
|
+
|
|
211
|
+ xt_temp_org_app = xt_org_app
|
|
212
|
+
|
|
213
|
+ }
|
|
214
|
+
|
|
215
|
+ //if scrm_org_app == nil || scrm_org_app.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
216
|
+ //
|
|
217
|
+ // app, _ := service.GetOrgAppA(0, 1)
|
|
218
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
219
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
220
|
+ // if org == nil || org.Id == 0 {
|
|
221
|
+ // continue
|
|
222
|
+ // }
|
|
223
|
+ //
|
|
224
|
+ //
|
|
225
|
+ // app.OrgId = apps.OrgId
|
|
226
|
+ // app.Id = 0
|
|
227
|
+ //
|
|
228
|
+ // app.Creator = int(org.Creator)
|
|
229
|
+ // app.Number = 0
|
|
230
|
+ // app.Status = 1
|
|
231
|
+ // app.ModifyTime = time.Now().Unix()
|
|
232
|
+ // app.CreateTime = time.Now().Unix()
|
|
233
|
+ // service.CreateOrgApp(app)
|
|
234
|
+ //
|
|
235
|
+ //}
|
|
236
|
+ //
|
|
237
|
+ //if cdm_org_app == nil || cdm_org_app.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
238
|
+ // app, _ := service.GetOrgAppA(0, 4)
|
|
239
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
240
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
241
|
+ // if org == nil || org.Id == 0 {
|
|
242
|
+ // continue
|
|
243
|
+ // }
|
|
244
|
+ //
|
|
245
|
+ //
|
|
246
|
+ // app.OrgId = apps.OrgId
|
|
247
|
+ // app.Creator = int(org.Creator)
|
|
248
|
+ // app.Number = 0
|
|
249
|
+ // app.Id = 0
|
|
250
|
+ //
|
|
251
|
+ // app.Status = 1
|
|
252
|
+ // app.ModifyTime = time.Now().Unix()
|
|
253
|
+ // app.CreateTime = time.Now().Unix()
|
|
254
|
+ // service.CreateOrgApp(app)
|
|
255
|
+ //}
|
|
256
|
+ //
|
|
257
|
+ //if mall_org_app == nil || mall_org_app.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
258
|
+ // app, _ := service.GetOrgAppA(0, 5)
|
|
259
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
260
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
261
|
+ //
|
|
262
|
+ // if org == nil || org.Id == 0 {
|
|
263
|
+ // continue
|
|
264
|
+ // }
|
|
265
|
+ //
|
|
266
|
+ // app.OrgId = apps.OrgId
|
|
267
|
+ // app.Creator = int(org.Creator)
|
|
268
|
+ // app.Number = 0
|
|
269
|
+ // app.Id = 0
|
|
270
|
+ //
|
|
271
|
+ // app.Status = 1
|
|
272
|
+ // app.ModifyTime = time.Now().Unix()
|
|
273
|
+ // app.CreateTime = time.Now().Unix()
|
|
274
|
+ // service.CreateOrgApp(app)
|
|
275
|
+ // mall_temp_org_app = app
|
|
276
|
+ //} else {
|
|
277
|
+ // mall_temp_org_app = mall_org_app
|
|
278
|
+ //}
|
|
279
|
+ //
|
|
280
|
+ if org_app_16 == nil || org_app_16.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
281
|
+ app, _ := service.GetOrgAppA(0, 16)
|
|
282
|
+ //org, _ := service.GetOrgById(int64(12))
|
|
283
|
+ org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
284
|
+ if org == nil || org.Id == 0 {
|
|
285
|
+ continue
|
|
286
|
+ }
|
|
287
|
+
|
|
288
|
+ app.OrgId = apps.OrgId
|
|
289
|
+ app.Creator = int(org.Creator)
|
|
290
|
+ app.Number = 11
|
|
291
|
+ app.Id = 0
|
|
292
|
+ app.Status = 1
|
|
293
|
+ app.ModifyTime = time.Now().Unix()
|
|
294
|
+ app.CreateTime = time.Now().Unix()
|
|
295
|
+ app.Pid = xt_temp_org_app.Id
|
|
296
|
+ service.CreateOrgApp(app)
|
|
297
|
+
|
|
298
|
+ }
|
|
299
|
+
|
|
300
|
+ if org_app_17 == nil || org_app_17.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
301
|
+ app, _ := service.GetOrgAppA(0, 17)
|
|
302
|
+ //org, _ := service.GetOrgById(int64(12))
|
|
303
|
+ org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
304
|
+ if org == nil || org.Id == 0 {
|
|
305
|
+ continue
|
|
306
|
+ }
|
|
307
|
+
|
|
308
|
+ app.OrgId = apps.OrgId
|
|
309
|
+ app.Creator = int(org.Creator)
|
|
310
|
+ app.Number = 12
|
|
311
|
+ app.Id = 0
|
|
312
|
+ app.Status = 1
|
|
313
|
+ app.ModifyTime = time.Now().Unix()
|
|
314
|
+ app.CreateTime = time.Now().Unix()
|
|
315
|
+ app.Pid = xt_temp_org_app.Id
|
|
316
|
+ service.CreateOrgApp(app)
|
|
317
|
+
|
|
318
|
+ }
|
|
319
|
+ //if org_app_7 == nil || org_app_7.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
320
|
+ // app, _ := service.GetOrgAppA(0, 7)
|
|
321
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
322
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
323
|
+ // if org == nil || org.Id == 0 {
|
|
324
|
+ // continue
|
|
325
|
+ // }
|
|
326
|
+ //
|
|
327
|
+ //
|
|
328
|
+ // app.OrgId = apps.OrgId
|
|
329
|
+ // app.Creator = int(org.Creator)
|
|
330
|
+ // app.Number = 2
|
|
331
|
+ // app.Status = 2
|
|
332
|
+ // app.Id = 0
|
|
333
|
+ //
|
|
334
|
+ // app.ModifyTime = time.Now().Unix()
|
|
335
|
+ // app.CreateTime = time.Now().Unix()
|
|
336
|
+ // app.Pid = xt_temp_org_app.Id
|
|
337
|
+ //
|
|
338
|
+ // service.CreateOrgApp(app)
|
|
339
|
+ //}
|
|
340
|
+ //if org_app_8 == nil || org_app_8.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
341
|
+ // app, _ := service.GetOrgAppA(0, 8)
|
|
342
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
343
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
344
|
+ // if org == nil || org.Id == 0 {
|
|
345
|
+ // continue
|
|
346
|
+ // }
|
|
347
|
+ //
|
|
348
|
+ //
|
|
349
|
+ // app.OrgId = apps.OrgId
|
|
350
|
+ // app.Creator = int(org.Creator)
|
|
351
|
+ // app.Number = 3
|
|
352
|
+ // app.Id = 0
|
|
353
|
+ //
|
|
354
|
+ // app.Pid = mall_temp_org_app.Id
|
|
355
|
+ //
|
|
356
|
+ // app.Status = 1
|
|
357
|
+ // app.ModifyTime = time.Now().Unix()
|
|
358
|
+ // app.CreateTime = time.Now().Unix()
|
|
359
|
+ // service.CreateOrgApp(app)
|
|
360
|
+ //}
|
|
361
|
+ //if org_app_9 == nil || org_app_9.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
362
|
+ // app, _ := service.GetOrgAppA(0, 9)
|
|
363
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
364
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
365
|
+ // if org == nil || org.Id == 0 {
|
|
366
|
+ // continue
|
|
367
|
+ // }
|
|
368
|
+ //
|
|
369
|
+ //
|
|
370
|
+ // app.OrgId = apps.OrgId
|
|
371
|
+ // app.Pid = xt_temp_org_app.Id
|
|
372
|
+ //
|
|
373
|
+ // app.Creator = int(org.Creator)
|
|
374
|
+ // app.Number = 4
|
|
375
|
+ // app.Id = 0
|
|
376
|
+ //
|
|
377
|
+ // app.Status = 1
|
|
378
|
+ // app.ModifyTime = time.Now().Unix()
|
|
379
|
+ // app.CreateTime = time.Now().Unix()
|
|
380
|
+ // service.CreateOrgApp(app)
|
|
381
|
+ //
|
|
382
|
+ //}
|
|
383
|
+ //if org_app_10 == nil || org_app_10.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
384
|
+ // app, _ := service.GetOrgAppA(0, 10)
|
|
385
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
386
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
387
|
+ // if org == nil || org.Id == 0 {
|
|
388
|
+ // continue
|
|
389
|
+ // }
|
|
390
|
+ //
|
|
391
|
+ //
|
|
392
|
+ // app.OrgId = apps.OrgId
|
|
393
|
+ // app.Creator = int(org.Creator)
|
|
394
|
+ // app.Pid = xt_temp_org_app.Id
|
|
395
|
+ //
|
|
396
|
+ // app.Number = 5
|
|
397
|
+ // app.Id = 0
|
|
398
|
+ //
|
|
399
|
+ // app.Status = 1
|
|
400
|
+ // app.ModifyTime = time.Now().Unix()
|
|
401
|
+ // app.CreateTime = time.Now().Unix()
|
|
402
|
+ // service.CreateOrgApp(app)
|
|
403
|
+ //}
|
|
404
|
+ //if org_app_11 == nil || org_app_11.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
405
|
+ // app, _ := service.GetOrgAppA(0, 11)
|
|
406
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
407
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
408
|
+ // if org == nil || org.Id == 0 {
|
|
409
|
+ // continue
|
|
410
|
+ // }
|
|
411
|
+ //
|
|
412
|
+ //
|
|
413
|
+ // app.OrgId = apps.OrgId
|
|
414
|
+ // app.Creator = int(org.Creator)
|
|
415
|
+ // app.Pid = xt_temp_org_app.Id
|
|
416
|
+ // app.Id = 0
|
|
417
|
+ //
|
|
418
|
+ // app.Number = 6
|
|
419
|
+ // app.Status = 1
|
|
420
|
+ // app.ModifyTime = time.Now().Unix()
|
|
421
|
+ // app.CreateTime = time.Now().Unix()
|
|
422
|
+ // service.CreateOrgApp(app)
|
|
423
|
+ //}
|
|
424
|
+ //if org_app_12 == nil || org_app_12.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
425
|
+ // app, _ := service.GetOrgAppA(0, 12)
|
|
426
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
427
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
428
|
+ // if org == nil || org.Id == 0 {
|
|
429
|
+ // continue
|
|
430
|
+ // }
|
|
431
|
+ //
|
|
432
|
+ //
|
|
433
|
+ // app.OrgId = apps.OrgId
|
|
434
|
+ // app.Creator = int(org.Creator)
|
|
435
|
+ // app.Pid = xt_temp_org_app.Id
|
|
436
|
+ // app.Number = 7
|
|
437
|
+ // app.Status = 1
|
|
438
|
+ // app.Id = 0
|
|
439
|
+ //
|
|
440
|
+ // app.ModifyTime = time.Now().Unix()
|
|
441
|
+ // app.CreateTime = time.Now().Unix()
|
|
442
|
+ // service.CreateOrgApp(app)
|
|
443
|
+ //}
|
|
444
|
+ //if org_app_13 == nil || org_app_13.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
445
|
+ // app, _ := service.GetOrgAppA(0, 13)
|
|
446
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
447
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
448
|
+ // if org == nil || org.Id == 0 {
|
|
449
|
+ // continue
|
|
450
|
+ // }
|
|
451
|
+ //
|
|
452
|
+ //
|
|
453
|
+ // app.OrgId = apps.OrgId
|
|
454
|
+ // app.Creator = int(org.Creator)
|
|
455
|
+ // app.Pid = xt_temp_org_app.Id
|
|
456
|
+ // app.Number = 8
|
|
457
|
+ // app.Id = 0
|
|
458
|
+ // app.Status = 1
|
|
459
|
+ // app.ModifyTime = time.Now().Unix()
|
|
460
|
+ // app.CreateTime = time.Now().Unix()
|
|
461
|
+ // service.CreateOrgApp(app)
|
|
462
|
+ //}
|
|
463
|
+ //if org_app_14 == nil || org_app_14.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
464
|
+ // app, _ := service.GetOrgAppA(0, 14)
|
|
465
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
466
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
467
|
+ // if org == nil || org.Id == 0 {
|
|
468
|
+ // continue
|
|
469
|
+ // }
|
|
470
|
+ //
|
|
471
|
+ //
|
|
472
|
+ // app.OrgId = apps.OrgId
|
|
473
|
+ // app.Creator = int(org.Creator)
|
|
474
|
+ // app.Pid = xt_temp_org_app.Id
|
|
475
|
+ // app.Id = 0
|
|
476
|
+ // app.Number = 9
|
|
477
|
+ // app.Status = 1
|
|
478
|
+ // app.ModifyTime = time.Now().Unix()
|
|
479
|
+ // app.CreateTime = time.Now().Unix()
|
|
480
|
+ // service.CreateOrgApp(app)
|
|
481
|
+ //}
|
|
482
|
+
|
|
483
|
+ //if org_app_15 == nil || org_app_15.Id == 0 { //判断之前是否有创建该app类型,如果没有则插入数据
|
|
484
|
+ // app, _ := service.GetOrgAppA(0, 15)
|
|
485
|
+ // //org, _ := service.GetOrgById(int64(12))
|
|
486
|
+ // org, _ := service.GetOrgByIdB(int64(apps.OrgId))
|
|
487
|
+ // if org == nil || org.Id == 0 {
|
|
488
|
+ // continue
|
|
489
|
+ // }
|
|
490
|
+ //
|
|
491
|
+ // app.OrgId = apps.OrgId
|
|
492
|
+ // app.Creator = int(org.Creator)
|
|
493
|
+ // app.Pid = xt_temp_org_app.Id
|
|
494
|
+ // app.Number = 10
|
|
495
|
+ // app.Status = 1
|
|
496
|
+ // app.Id = 0
|
|
497
|
+ // app.ModifyTime = time.Now().Unix()
|
|
498
|
+ // app.CreateTime = time.Now().Unix()
|
|
499
|
+ // service.CreateOrgApp(app)
|
|
500
|
+ //}
|
|
501
|
+ }
|
484
|
502
|
|
485
|
503
|
//for _, role := range org_role {
|
486
|
504
|
// org_ids = append(org_ids, role.OrgId)
|