|
@@ -33,6 +33,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
@@ -33,6 +33,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
33
|
}()
|
33
|
}()
|
34
|
|
34
|
|
35
|
// TODO 判断公司是否存在
|
35
|
// TODO 判断公司是否存在
|
|
|
36
|
+
|
36
|
//var cashPoolDao *dao.CashPoolDao
|
37
|
//var cashPoolDao *dao.CashPoolDao
|
37
|
//if value, err := factory.CreateCashPoolDao(map[string]interface{}{
|
38
|
//if value, err := factory.CreateCashPoolDao(map[string]interface{}{
|
38
|
// "transactionContext": transactionContext,
|
39
|
// "transactionContext": transactionContext,
|
|
@@ -43,6 +44,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
@@ -43,6 +44,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
43
|
//}
|
44
|
//}
|
44
|
|
45
|
|
45
|
// TODO 统计系统已兑换现金、未兑换现金、已兑换素币、未兑换素币
|
46
|
// TODO 统计系统已兑换现金、未兑换现金、已兑换素币、未兑换素币
|
|
|
47
|
+
|
46
|
var systemUnExchangeCash float64
|
48
|
var systemUnExchangeCash float64
|
47
|
//systemExchangedCash, err := cashPoolDao.CalculateSystemCash(createCashPoolCommand.CompanyId)
|
49
|
//systemExchangedCash, err := cashPoolDao.CalculateSystemCash(createCashPoolCommand.CompanyId)
|
48
|
//if err != nil {
|
50
|
//if err != nil {
|
|
@@ -55,7 +57,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
@@ -55,7 +57,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
55
|
//}
|
57
|
//}
|
56
|
|
58
|
|
57
|
var cashPoolRepository domain.CashPoolRepository
|
59
|
var cashPoolRepository domain.CashPoolRepository
|
58
|
- if value, err := factory.CreateCashPoolRepository(map[string]interface{}{
|
60
|
+ if value, err := factory.CreateCashPoolRepository(map[string] interface{} {
|
59
|
"transactionContext": transactionContext,
|
61
|
"transactionContext": transactionContext,
|
60
|
}); err != nil {
|
62
|
}); err != nil {
|
61
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
63
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
@@ -64,6 +66,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
@@ -64,6 +66,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
64
|
}
|
66
|
}
|
65
|
|
67
|
|
66
|
// TODO 获取系统未兑换现金
|
68
|
// TODO 获取系统未兑换现金
|
|
|
69
|
+
|
67
|
//count, cashPools, err := cashPoolRepository.Find(map[string]interface{}{
|
70
|
//count, cashPools, err := cashPoolRepository.Find(map[string]interface{}{
|
68
|
// "companyId": createCashPoolCommand.CompanyId,
|
71
|
// "companyId": createCashPoolCommand.CompanyId,
|
69
|
//})
|
72
|
//})
|
|
@@ -94,7 +97,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
@@ -94,7 +97,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
94
|
CreateTime: time.Now(),
|
97
|
CreateTime: time.Now(),
|
95
|
}
|
98
|
}
|
96
|
|
99
|
|
97
|
- if value, err := factory.CreateCashPoolRepository(map[string]interface{}{
|
100
|
+ if value, err := factory.CreateCashPoolRepository(map[string] interface{} {
|
98
|
"transactionContext": transactionContext,
|
101
|
"transactionContext": transactionContext,
|
99
|
}); err != nil {
|
102
|
}); err != nil {
|
100
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
103
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
@@ -128,7 +131,7 @@ func (cashPoolService *CashPoolService) GetCashPool(getCashPoolQuery *query.GetC |
|
@@ -128,7 +131,7 @@ func (cashPoolService *CashPoolService) GetCashPool(getCashPoolQuery *query.GetC |
128
|
transactionContext.RollbackTransaction()
|
131
|
transactionContext.RollbackTransaction()
|
129
|
}()
|
132
|
}()
|
130
|
var cashPoolRepository domain.CashPoolRepository
|
133
|
var cashPoolRepository domain.CashPoolRepository
|
131
|
- if value, err := factory.CreateCashPoolRepository(map[string]interface{}{
|
134
|
+ if value, err := factory.CreateCashPoolRepository(map[string] interface{} {
|
132
|
"transactionContext": transactionContext,
|
135
|
"transactionContext": transactionContext,
|
133
|
}); err != nil {
|
136
|
}); err != nil {
|
134
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
137
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
@@ -143,20 +146,21 @@ func (cashPoolService *CashPoolService) GetCashPool(getCashPoolQuery *query.GetC |
|
@@ -143,20 +146,21 @@ func (cashPoolService *CashPoolService) GetCashPool(getCashPoolQuery *query.GetC |
143
|
}
|
146
|
}
|
144
|
// TODO 初始状态下,现金池返回默认值
|
147
|
// TODO 初始状态下,现金池返回默认值
|
145
|
if count == 0 {
|
148
|
if count == 0 {
|
146
|
- return map[string]interface{}{
|
149
|
+ return map[string] interface{} {
|
147
|
"cashPoolId": 0,
|
150
|
"cashPoolId": 0,
|
148
|
"cash": 0,
|
151
|
"cash": 0,
|
149
|
- "companyId": 0,
|
152
|
+ "companyId": getCashPoolQuery.CompanyId,
|
150
|
"exchangedCash": 0,
|
153
|
"exchangedCash": 0,
|
151
|
"unExchangeCash": 0,
|
154
|
"unExchangeCash": 0,
|
152
|
"exchangedSuMoney": 0,
|
155
|
"exchangedSuMoney": 0,
|
153
|
"unExchangeSuMoney": 0,
|
156
|
"unExchangeSuMoney": 0,
|
154
|
"rate": 0,
|
157
|
"rate": 0,
|
155
|
- "createTime": "2020-11-03T17:23:00.848676+08:00",
|
158
|
+ "createTime": time.Now(),
|
156
|
}, nil
|
159
|
}, nil
|
157
|
- }
|
160
|
+ } else {
|
158
|
return cashPools[0], nil
|
161
|
return cashPools[0], nil
|
159
|
}
|
162
|
}
|
|
|
163
|
+ }
|
160
|
}
|
164
|
}
|
161
|
|
165
|
|
162
|
// 新增兑换现金活动
|
166
|
// 新增兑换现金活动
|
|
@@ -254,7 +258,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashActivity(removeExchang |
|
@@ -254,7 +258,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashActivity(removeExchang |
254
|
if err := removeExchangeCashActivityCommand.ValidateCommand(); err != nil {
|
258
|
if err := removeExchangeCashActivityCommand.ValidateCommand(); err != nil {
|
255
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
259
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
256
|
}
|
260
|
}
|
257
|
-
|
|
|
258
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
261
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
259
|
if err != nil {
|
262
|
if err != nil {
|
260
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
263
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
@@ -265,7 +268,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashActivity(removeExchang |
|
@@ -265,7 +268,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashActivity(removeExchang |
265
|
defer func() {
|
268
|
defer func() {
|
266
|
transactionContext.RollbackTransaction()
|
269
|
transactionContext.RollbackTransaction()
|
267
|
}()
|
270
|
}()
|
268
|
-
|
|
|
269
|
var exchangeCashActivityRepository domain.ExchangeActivityRepository
|
271
|
var exchangeCashActivityRepository domain.ExchangeActivityRepository
|
270
|
if value, err := factory.CreateExchangeCashActivityRepository(map[string]interface{}{
|
272
|
if value, err := factory.CreateExchangeCashActivityRepository(map[string]interface{}{
|
271
|
"transactionContext": transactionContext,
|
273
|
"transactionContext": transactionContext,
|
|
@@ -274,7 +276,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashActivity(removeExchang |
|
@@ -274,7 +276,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashActivity(removeExchang |
274
|
} else {
|
276
|
} else {
|
275
|
exchangeCashActivityRepository = value
|
277
|
exchangeCashActivityRepository = value
|
276
|
}
|
278
|
}
|
277
|
-
|
|
|
278
|
activity, err := exchangeCashActivityRepository.FindOne(map[string]interface{}{"activityId": removeExchangeCashActivityCommand.ActivityId})
|
279
|
activity, err := exchangeCashActivityRepository.FindOne(map[string]interface{}{"activityId": removeExchangeCashActivityCommand.ActivityId})
|
279
|
if err != nil {
|
280
|
if err != nil {
|
280
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
281
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
@@ -334,7 +335,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
|
@@ -334,7 +335,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
334
|
if err := updateExchangeCashActivityCommand.ValidateCommand(); err != nil {
|
335
|
if err := updateExchangeCashActivityCommand.ValidateCommand(); err != nil {
|
335
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
336
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
336
|
}
|
337
|
}
|
337
|
-
|
|
|
338
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
338
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
339
|
if err != nil {
|
339
|
if err != nil {
|
340
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
340
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
@@ -345,7 +345,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
|
@@ -345,7 +345,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
345
|
defer func() {
|
345
|
defer func() {
|
346
|
transactionContext.RollbackTransaction()
|
346
|
transactionContext.RollbackTransaction()
|
347
|
}()
|
347
|
}()
|
348
|
-
|
|
|
349
|
var exchangeCashActivityRepository domain.ExchangeActivityRepository
|
348
|
var exchangeCashActivityRepository domain.ExchangeActivityRepository
|
350
|
if value, err := factory.CreateExchangeCashActivityRepository(map[string]interface{}{
|
349
|
if value, err := factory.CreateExchangeCashActivityRepository(map[string]interface{}{
|
351
|
"transactionContext": transactionContext,
|
350
|
"transactionContext": transactionContext,
|
|
@@ -354,7 +353,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
|
@@ -354,7 +353,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
354
|
} else {
|
353
|
} else {
|
355
|
exchangeCashActivityRepository = value
|
354
|
exchangeCashActivityRepository = value
|
356
|
}
|
355
|
}
|
357
|
-
|
|
|
358
|
activity, err := exchangeCashActivityRepository.FindOne(map[string]interface{}{"activityId": updateExchangeCashActivityCommand.ExchangeCashActivityId})
|
356
|
activity, err := exchangeCashActivityRepository.FindOne(map[string]interface{}{"activityId": updateExchangeCashActivityCommand.ExchangeCashActivityId})
|
359
|
if err != nil {
|
357
|
if err != nil {
|
360
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
358
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
@@ -369,6 +367,7 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
|
@@ -369,6 +367,7 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
369
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
367
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
370
|
} else {
|
368
|
} else {
|
371
|
// TODO 更新现金池已兑换素币、已兑换现金值、未兑换素币、未兑换现金值、平均汇率
|
369
|
// TODO 更新现金池已兑换素币、已兑换现金值、未兑换素币、未兑换现金值、平均汇率
|
|
|
370
|
+
|
372
|
//var cashPoolRepository domain.CashPoolRepository
|
371
|
//var cashPoolRepository domain.CashPoolRepository
|
373
|
//if value, err := factory.CreateCashPoolRepository(map[string]interface{}{
|
372
|
//if value, err := factory.CreateCashPoolRepository(map[string]interface{}{
|
374
|
// "transactionContext": transactionContext,
|
373
|
// "transactionContext": transactionContext,
|
|
@@ -390,7 +389,6 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
|
@@ -390,7 +389,6 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
390
|
if err := createExchangeCashPersonCommand.ValidateCommand(); err != nil {
|
389
|
if err := createExchangeCashPersonCommand.ValidateCommand(); err != nil {
|
391
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
390
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
392
|
}
|
391
|
}
|
393
|
-
|
|
|
394
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
392
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
395
|
if err != nil {
|
393
|
if err != nil {
|
396
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
394
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
@@ -403,6 +401,7 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
|
@@ -403,6 +401,7 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
403
|
}()
|
401
|
}()
|
404
|
|
402
|
|
405
|
// TODO 获取兑换活动兑换汇率
|
403
|
// TODO 获取兑换活动兑换汇率
|
|
|
404
|
+
|
406
|
//var exchangeCashActivityRepository domain.ExchangeActivityRepository
|
405
|
//var exchangeCashActivityRepository domain.ExchangeActivityRepository
|
407
|
//activity, err := exchangeCashActivityRepository.FindOne(map[string]interface{}{"exchangeCashActivityId": createExchangeCashPersonCommand.ExchangeCashActivityId})
|
406
|
//activity, err := exchangeCashActivityRepository.FindOne(map[string]interface{}{"exchangeCashActivityId": createExchangeCashPersonCommand.ExchangeCashActivityId})
|
408
|
//if err != nil {
|
407
|
//if err != nil {
|
|
@@ -414,12 +413,11 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
|
@@ -414,12 +413,11 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
414
|
// fmt.Print(activity.Rate)
|
413
|
// fmt.Print(activity.Rate)
|
415
|
//}
|
414
|
//}
|
416
|
|
415
|
|
417
|
-
|
|
|
418
|
// TODO 清单中现金总额超过现金池时创建失败,提示:“已超过投入现金池的未兑换现金”
|
416
|
// TODO 清单中现金总额超过现金池时创建失败,提示:“已超过投入现金池的未兑换现金”
|
419
|
|
417
|
|
|
|
418
|
+ // TODO 新增兑换清单时,根据uid判断成员是否存在,判断素币值是否超过本人持有的素币
|
420
|
|
419
|
|
421
|
- // TODO 新增兑换人员时,判断成员是否存在,判断素币值是否超过本人持有的素币,以手机账号为判断依据
|
|
|
422
|
-
|
420
|
+ // TODO 导入兑换清单时,时根据手机账号判断成员是否存在,判断素币是否超过本人持有的素币
|
423
|
|
421
|
|
424
|
newPerson := &domain.ExchangeCashPersonList{
|
422
|
newPerson := &domain.ExchangeCashPersonList{
|
425
|
EmployeeInfo: &domain.EmployeeInfo{
|
423
|
EmployeeInfo: &domain.EmployeeInfo{
|
|
@@ -444,7 +442,6 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
|
@@ -444,7 +442,6 @@ func (cashPoolService *CashPoolService) CreateExchangeCashPerson(createExchangeC |
444
|
} else {
|
442
|
} else {
|
445
|
// TODO 更新活动已兑换素币值、已兑换现金值、兑换汇率
|
443
|
// TODO 更新活动已兑换素币值、已兑换现金值、兑换汇率
|
446
|
|
444
|
|
447
|
-
|
|
|
448
|
if err := transactionContext.CommitTransaction(); err != nil {
|
445
|
if err := transactionContext.CommitTransaction(); err != nil {
|
449
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
446
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
450
|
}
|
447
|
}
|
|
@@ -457,7 +454,6 @@ func (cashPoolService *CashPoolService) GetExchangeCashPerson(getExchangeCashPer |
|
@@ -457,7 +454,6 @@ func (cashPoolService *CashPoolService) GetExchangeCashPerson(getExchangeCashPer |
457
|
if err := getExchangeCashPersonQuery.ValidateQuery(); err != nil {
|
454
|
if err := getExchangeCashPersonQuery.ValidateQuery(); err != nil {
|
458
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
455
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
459
|
}
|
456
|
}
|
460
|
-
|
|
|
461
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
457
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
462
|
if err != nil {
|
458
|
if err != nil {
|
463
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
459
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
@@ -468,7 +464,6 @@ func (cashPoolService *CashPoolService) GetExchangeCashPerson(getExchangeCashPer |
|
@@ -468,7 +464,6 @@ func (cashPoolService *CashPoolService) GetExchangeCashPerson(getExchangeCashPer |
468
|
defer func() {
|
464
|
defer func() {
|
469
|
transactionContext.RollbackTransaction()
|
465
|
transactionContext.RollbackTransaction()
|
470
|
}()
|
466
|
}()
|
471
|
-
|
|
|
472
|
var exchangeCashPersonListRepository domain.ExchangeCashPersonListRepository
|
467
|
var exchangeCashPersonListRepository domain.ExchangeCashPersonListRepository
|
473
|
if value, err := factory.CreateExchangeCashPersonListRepository(map[string]interface{}{
|
468
|
if value, err := factory.CreateExchangeCashPersonListRepository(map[string]interface{}{
|
474
|
"transactionContext": transactionContext,
|
469
|
"transactionContext": transactionContext,
|
|
@@ -514,7 +509,6 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP |
|
@@ -514,7 +509,6 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP |
514
|
} else {
|
509
|
} else {
|
515
|
exchangeCashPersonListRepository = value
|
510
|
exchangeCashPersonListRepository = value
|
516
|
}
|
511
|
}
|
517
|
-
|
|
|
518
|
if count, people, err := exchangeCashPersonListRepository.Find(tool_funs.SimpleStructToMap(listExchangeCashPersonQuery)); err != nil {
|
512
|
if count, people, err := exchangeCashPersonListRepository.Find(tool_funs.SimpleStructToMap(listExchangeCashPersonQuery)); err != nil {
|
519
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
513
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
520
|
} else {
|
514
|
} else {
|
|
@@ -533,7 +527,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC |
|
@@ -533,7 +527,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC |
533
|
if err := removeExchangeCashPersonCommand.ValidateCommand(); err != nil {
|
527
|
if err := removeExchangeCashPersonCommand.ValidateCommand(); err != nil {
|
534
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
528
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
535
|
}
|
529
|
}
|
536
|
-
|
|
|
537
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
530
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
538
|
if err != nil {
|
531
|
if err != nil {
|
539
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
532
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
@@ -544,7 +537,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC |
|
@@ -544,7 +537,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC |
544
|
defer func() {
|
537
|
defer func() {
|
545
|
transactionContext.RollbackTransaction()
|
538
|
transactionContext.RollbackTransaction()
|
546
|
}()
|
539
|
}()
|
547
|
-
|
|
|
548
|
var exchangeCashPersonListRepository domain.ExchangeCashPersonListRepository
|
540
|
var exchangeCashPersonListRepository domain.ExchangeCashPersonListRepository
|
549
|
if value, err := factory.CreateExchangeCashPersonListRepository(map[string]interface{}{
|
541
|
if value, err := factory.CreateExchangeCashPersonListRepository(map[string]interface{}{
|
550
|
"transactionContext": transactionContext,
|
542
|
"transactionContext": transactionContext,
|
|
@@ -553,7 +545,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC |
|
@@ -553,7 +545,6 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashPerson(removeExchangeC |
553
|
} else {
|
545
|
} else {
|
554
|
exchangeCashPersonListRepository = value
|
546
|
exchangeCashPersonListRepository = value
|
555
|
}
|
547
|
}
|
556
|
-
|
|
|
557
|
person, err := exchangeCashPersonListRepository.FindOne(map[string]interface{}{"id": removeExchangeCashPersonCommand.ListId})
|
548
|
person, err := exchangeCashPersonListRepository.FindOne(map[string]interface{}{"id": removeExchangeCashPersonCommand.ListId})
|
558
|
if err != nil {
|
549
|
if err != nil {
|
559
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
550
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
@@ -611,7 +602,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashPerson(updateExchangeC |
|
@@ -611,7 +602,6 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashPerson(updateExchangeC |
611
|
} else {
|
602
|
} else {
|
612
|
// TODO 更新个人当前可用素币值,生成素币兑换流水记录(获取更新前的已兑换素币值,判断是扣除还是增加),记录描述:参与素币兑换现金活动(红色表示取活动名称)
|
603
|
// TODO 更新个人当前可用素币值,生成素币兑换流水记录(获取更新前的已兑换素币值,判断是扣除还是增加),记录描述:参与素币兑换现金活动(红色表示取活动名称)
|
613
|
|
604
|
|
614
|
-
|
|
|
615
|
// TODO 更新相应兑换活动已兑换素币值、已兑换现金值、兑换汇率
|
605
|
// TODO 更新相应兑换活动已兑换素币值、已兑换现金值、兑换汇率
|
616
|
|
606
|
|
617
|
if err := transactionContext.CommitTransaction(); err != nil {
|
607
|
if err := transactionContext.CommitTransaction(); err != nil {
|