...
|
...
|
@@ -290,10 +290,27 @@ func (creditAccountService *CreditAccountService) SearchCreditAccount(searchCred |
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
var creditAccountRepository domain.CreditAccountRepository
|
|
|
if value, err := factory.CreateCreditAccountRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
}); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
|
|
creditAccountRepository = value
|
|
|
}
|
|
|
if count, creditAccounts, err := creditAccountRepository.Find(tool_funs.SimpleStructToMap(searchCreditAccountQuery)); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return nil, nil
|
|
|
return map[string]interface{}{
|
|
|
"grid": map[string]interface{}{
|
|
|
"total": count,
|
|
|
"list": creditAccounts,
|
|
|
},
|
|
|
}, nil
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// UpdateCreditAccount 更新账期结算单服务
|
...
|
...
|
|