...
|
...
|
@@ -5,6 +5,7 @@ import ( |
|
|
"github.com/linmadan/egglib-go/core/application"
|
|
|
coreDomain "github.com/linmadan/egglib-go/core/domain"
|
|
|
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
|
|
|
"github.com/linmadan/egglib-go/utils/tool_funs"
|
|
|
"gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain/event"
|
|
|
"gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/dao"
|
...
|
...
|
@@ -153,8 +154,8 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64 |
|
|
}
|
|
|
systemUnExchangeSuMoney := systemSuMoneyStatistics["systemUnExchangeSuMoney"].(float64)
|
|
|
|
|
|
// 现金池更新命令
|
|
|
cashPool := &domain.CashPool{
|
|
|
CashPoolId: cashPoolFound[0].CashPoolId,
|
|
|
Cash: cashPoolFound[0].Cash,
|
|
|
CompanyId: cashPoolFound[0].CompanyId,
|
|
|
ExchangedCash: cashPoolFound[0].ExchangedCash,
|
...
|
...
|
@@ -163,8 +164,13 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64 |
|
|
UnExchangeSuMoney: systemUnExchangeSuMoney,
|
|
|
Rate: cashPoolFound[0].Rate,
|
|
|
LastRate: cashPoolFound[0].LastRate,
|
|
|
CreateTime: time.Now(),
|
|
|
}
|
|
|
// 更新现金池
|
|
|
if err := cashPoolFound[0].Update(tool_funs.SimpleStructToMap(cashPool)); err != nil {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
// 保存现金池更新
|
|
|
if _, err := cashPoolRepository.Save(cashPool); err != nil {
|
|
|
return nil, err
|
|
|
}
|
...
|
...
|
|