作者 陈志颖

合并分支 'dev' 到 'test'

Dev



查看合并请求 !9
@@ -312,7 +312,7 @@ func (creditAccountService *CreditAccountService) ListCreditAccount(listCreditAc @@ -312,7 +312,7 @@ func (creditAccountService *CreditAccountService) ListCreditAccount(listCreditAc
312 } 312 }
313 } 313 }
314 314
315 -// PayCreditAccount 支付账期结算(支付分红) 315 +// PayCreditAccount 支付分红
316 func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAccountCommand *command.PayCreditAccountCommand) (interface{}, error) { 316 func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAccountCommand *command.PayCreditAccountCommand) (interface{}, error) {
317 if err := payCreditAccountCommand.ValidateCommand(); err != nil { 317 if err := payCreditAccountCommand.ValidateCommand(); err != nil {
318 return nil, application.ThrowError(application.ARG_ERROR, err.Error()) 318 return nil, application.ThrowError(application.ARG_ERROR, err.Error())
@@ -342,7 +342,9 @@ func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAcco @@ -342,7 +342,9 @@ func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAcco
342 } 342 }
343 343
344 // 获取待支付的账期结算单 344 // 获取待支付的账期结算单
345 - creditAccount, err := creditAccountRepository.FindOne(map[string]interface{}{"creditAccountId": creditAccountId}) 345 + creditAccount, err := creditAccountRepository.FindOne(map[string]interface{}{
  346 + "creditAccountId": creditAccountId,
  347 + })
346 if err != nil { 348 if err != nil {
347 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 349 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
348 } 350 }
@@ -360,7 +362,6 @@ func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAcco @@ -360,7 +362,6 @@ func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAcco
360 if creditAccountSaved, err4 := creditAccountRepository.Save(creditAccount); err4 != nil { 362 if creditAccountSaved, err4 := creditAccountRepository.Save(creditAccount); err4 != nil {
361 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err4.Error()) 363 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err4.Error())
362 } else { 364 } else {
363 - // TODO 更新分红预算单结算状态(已支付)  
364 if err3 := transactionContext.CommitTransaction(); err3 != nil { 365 if err3 := transactionContext.CommitTransaction(); err3 != nil {
365 return nil, application.ThrowError(application.TRANSACTION_ERROR, err3.Error()) 366 return nil, application.ThrowError(application.TRANSACTION_ERROR, err3.Error())
366 } 367 }
@@ -413,10 +413,10 @@ func (repository *DividendsReturnedOrderRepository) UpdateMany(dividendsReturned @@ -413,10 +413,10 @@ func (repository *DividendsReturnedOrderRepository) UpdateMany(dividendsReturned
413 for _, dividendsReturnedOrder := range dividendsReturnedOrders { 413 for _, dividendsReturnedOrder := range dividendsReturnedOrders {
414 dividendsReturnedOrderModels = append(dividendsReturnedOrderModels, &models.DividendsReturnedOrder{ 414 dividendsReturnedOrderModels = append(dividendsReturnedOrderModels, &models.DividendsReturnedOrder{
415 DividendsReturnedOrderId: dividendsReturnedOrder.DividendsReturnedOrderId, 415 DividendsReturnedOrderId: dividendsReturnedOrder.DividendsReturnedOrderId,
416 - DividendsReturnedOrderNumber: dividendsReturnedOrder.DividendsOrderNumber, 416 + DividendsReturnedOrderNumber: dividendsReturnedOrder.DividendsReturnedOrderNumber,
417 DividendsReturnedOrderRefund: dividendsReturnedOrder.DividendsReturnedOrderRefund, 417 DividendsReturnedOrderRefund: dividendsReturnedOrder.DividendsReturnedOrderRefund,
418 OriginalOrderNum: dividendsReturnedOrder.OriginalOrderNum, 418 OriginalOrderNum: dividendsReturnedOrder.OriginalOrderNum,
419 - DividendsOrderNumber: dividendsReturnedOrder.DividendsReturnedOrderNumber, 419 + DividendsOrderNumber: dividendsReturnedOrder.DividendsOrderNumber,
420 DividendsReturnedCustomerName: dividendsReturnedOrder.DividendsReturnedCustomerName, 420 DividendsReturnedCustomerName: dividendsReturnedOrder.DividendsReturnedCustomerName,
421 OrderTime: dividendsReturnedOrder.OrderTime, 421 OrderTime: dividendsReturnedOrder.OrderTime,
422 DividendsReturnedDate: dividendsReturnedOrder.DividendsReturnedDate, 422 DividendsReturnedDate: dividendsReturnedOrder.DividendsReturnedDate,