...
|
...
|
@@ -57,7 +57,6 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "无效的公司id")
|
|
|
}
|
|
|
|
|
|
// 获取平台素币兑换情况
|
|
|
var employeeDao *dao.EmployeeDao
|
|
|
if value, err := factory.CreateEmployeeDao(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
...
|
...
|
@@ -66,7 +65,7 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
|
} else {
|
|
|
employeeDao = value
|
|
|
}
|
|
|
|
|
|
// 获取平台素币兑换情况
|
|
|
systemSuMoneyStatistics, err := employeeDao.CalculateSystemSuMoney(createCashPoolCommand.CompanyId)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
...
|
...
|
@@ -93,7 +92,6 @@ func (cashPoolService *CashPoolService) CreateCashPool(createCashPoolCommand *co |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
// 新建现金池
|
|
|
newCashPool := &domain.CashPool{
|
|
|
CompanyId: createCashPoolCommand.CompanyId,
|
|
|
Cash: createCashPoolCommand.Cash,
|
...
|
...
|
@@ -1028,9 +1026,7 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP |
|
|
exchangeCashPersonListRepository = value
|
|
|
}
|
|
|
|
|
|
fmt.Print(listExchangeCashPersonQuery, "\n")
|
|
|
|
|
|
// TODO 返回兑换现金活动总榜
|
|
|
// 返回兑换现金活动总榜
|
|
|
if listExchangeCashPersonQuery.ExchangeCashActivityId == 0 && listExchangeCashPersonQuery.CompanyId != 0 {
|
|
|
// 找到该公司下的所有活动id
|
|
|
var exchangeActivityRepository domain.ExchangeActivityRepository
|
...
|
...
|
@@ -1042,7 +1038,6 @@ func (cashPoolService *CashPoolService) ListExchangeCashPerson(listExchangeCashP |
|
|
exchangeActivityRepository = value
|
|
|
}
|
|
|
|
|
|
// TODO 需要改为获取所有活动,去除分页
|
|
|
if _, activities, err := exchangeActivityRepository.FindAll(map[string]interface{}{
|
|
|
"companyId": listExchangeCashPersonQuery.CompanyId,
|
|
|
}); err != nil {
|
...
|
...
|
|