|
@@ -57,7 +57,6 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
@@ -57,7 +57,6 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
57
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "无效的公司id")
|
57
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "无效的公司id")
|
58
|
}
|
58
|
}
|
59
|
|
59
|
|
60
|
- // 获取平台素币兑换情况
|
|
|
61
|
var employeeDao *dao.EmployeeDao
|
60
|
var employeeDao *dao.EmployeeDao
|
62
|
if value, err := factory.CreateEmployeeDao(map[string]interface{}{
|
61
|
if value, err := factory.CreateEmployeeDao(map[string]interface{}{
|
63
|
"transactionContext": transactionContext,
|
62
|
"transactionContext": transactionContext,
|
|
@@ -66,7 +65,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
@@ -66,7 +65,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
66
|
} else {
|
65
|
} else {
|
67
|
employeeDao = value
|
66
|
employeeDao = value
|
68
|
}
|
67
|
}
|
69
|
-
|
68
|
+ // 获取平台素币兑换情况
|
70
|
systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(createCashPoolCommand.CompanyId)
|
69
|
systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(createCashPoolCommand.CompanyId)
|
71
|
if err != nil {
|
70
|
if err != nil {
|
72
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
71
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
@@ -93,7 +92,6 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
@@ -93,7 +92,6 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
93
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
92
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
94
|
}
|
93
|
}
|
95
|
|
94
|
|
96
|
- // 新建现金池
|
|
|
97
|
newCashPool := &domain.CashPool{
|
95
|
newCashPool := &domain.CashPool{
|
98
|
CompanyId: createCashPoolCommand.CompanyId,
|
96
|
CompanyId: createCashPoolCommand.CompanyId,
|
99
|
Cash: createCashPoolCommand.Cash,
|
97
|
Cash: createCashPoolCommand.Cash,
|
|
@@ -1028,9 +1026,7 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP |
|
@@ -1028,9 +1026,7 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP |
1028
|
exchangeCashPersonListRepository = value
|
1026
|
exchangeCashPersonListRepository = value
|
1029
|
}
|
1027
|
}
|
1030
|
|
1028
|
|
1031
|
- fmt.Print(listExchangeCashPersonQuery, "\n")
|
|
|
1032
|
-
|
|
|
1033
|
- // TODO 返回兑换现金活动总榜
|
1029
|
+ // 返回兑换现金活动总榜
|
1034
|
if listExchangeCashPersonQuery.ExchangeCashActivityId == 0 && listExchangeCashPersonQuery.CompanyId != 0 {
|
1030
|
if listExchangeCashPersonQuery.ExchangeCashActivityId == 0 && listExchangeCashPersonQuery.CompanyId != 0 {
|
1035
|
// 找到该公司下的所有活动id
|
1031
|
// 找到该公司下的所有活动id
|
1036
|
var exchangeActivityRepository domain.ExchangeActivityRepository
|
1032
|
var exchangeActivityRepository domain.ExchangeActivityRepository
|
|
@@ -1042,7 +1038,6 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP |
|
@@ -1042,7 +1038,6 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP |
1042
|
exchangeActivityRepository = value
|
1038
|
exchangeActivityRepository = value
|
1043
|
}
|
1039
|
}
|
1044
|
|
1040
|
|
1045
|
- // TODO 需要改为获取所有活动,去除分页
|
|
|
1046
|
if _, activities, err := exchangeActivityRepository.FindAll(map[string]interface{}{
|
1041
|
if _, activities, err := exchangeActivityRepository.FindAll(map[string]interface{}{
|
1047
|
"companyId": listExchangeCashPersonQuery.CompanyId,
|
1042
|
"companyId": listExchangeCashPersonQuery.CompanyId,
|
1048
|
}); err != nil {
|
1043
|
}); err != nil {
|