正在显示
1 个修改的文件
包含
8 行增加
和
2 行删除
@@ -5,6 +5,7 @@ import ( | @@ -5,6 +5,7 @@ import ( | ||
5 | "github.com/linmadan/egglib-go/core/application" | 5 | "github.com/linmadan/egglib-go/core/application" |
6 | coreDomain "github.com/linmadan/egglib-go/core/domain" | 6 | coreDomain "github.com/linmadan/egglib-go/core/domain" |
7 | pgTransaction "github.com/linmadan/egglib-go/transaction/pg" | 7 | pgTransaction "github.com/linmadan/egglib-go/transaction/pg" |
8 | + "github.com/linmadan/egglib-go/utils/tool_funs" | ||
8 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain" | 9 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain" |
9 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain/event" | 10 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain/event" |
10 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/dao" | 11 | "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/dao" |
@@ -153,8 +154,8 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64 | @@ -153,8 +154,8 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64 | ||
153 | } | 154 | } |
154 | systemUnExchangeSuMoney := systemSuMoneyStatistics["systemUnExchangeSuMoney"].(float64) | 155 | systemUnExchangeSuMoney := systemSuMoneyStatistics["systemUnExchangeSuMoney"].(float64) |
155 | 156 | ||
157 | + // 现金池更新命令 | ||
156 | cashPool := &domain.CashPool{ | 158 | cashPool := &domain.CashPool{ |
157 | - CashPoolId: cashPoolFound[0].CashPoolId, | ||
158 | Cash: cashPoolFound[0].Cash, | 159 | Cash: cashPoolFound[0].Cash, |
159 | CompanyId: cashPoolFound[0].CompanyId, | 160 | CompanyId: cashPoolFound[0].CompanyId, |
160 | ExchangedCash: cashPoolFound[0].ExchangedCash, | 161 | ExchangedCash: cashPoolFound[0].ExchangedCash, |
@@ -163,8 +164,13 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64 | @@ -163,8 +164,13 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64 | ||
163 | UnExchangeSuMoney: systemUnExchangeSuMoney, | 164 | UnExchangeSuMoney: systemUnExchangeSuMoney, |
164 | Rate: cashPoolFound[0].Rate, | 165 | Rate: cashPoolFound[0].Rate, |
165 | LastRate: cashPoolFound[0].LastRate, | 166 | LastRate: cashPoolFound[0].LastRate, |
166 | - CreateTime: time.Now(), | ||
167 | } | 167 | } |
168 | + // 更新现金池 | ||
169 | + if err := cashPoolFound[0].Update(tool_funs.SimpleStructToMap(cashPool)); err != nil { | ||
170 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
171 | + } | ||
172 | + | ||
173 | + // 保存现金池更新 | ||
168 | if _, err := cashPoolRepository.Save(cashPool); err != nil { | 174 | if _, err := cashPoolRepository.Save(cashPool); err != nil { |
169 | return nil, err | 175 | return nil, err |
170 | } | 176 | } |
-
请 注册 或 登录 后发表评论