...
|
...
|
@@ -208,7 +208,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) GetDividends |
|
|
}
|
|
|
}
|
|
|
|
|
|
// ImportDividendsReturnedOrder 导入分红退货单
|
|
|
// ImportDividendsReturnedOrder TODO 导入分红退货单
|
|
|
func (dividendsReturnedOrderService *DividendsReturnedOrderService) ImportDividendsReturnedOrder(importDividendsReturnedOrderCommand *command.ImportDividendsReturnedOrderCommand) (interface{}, error) {
|
|
|
if err := importDividendsReturnedOrderCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
...
|
...
|
@@ -367,10 +367,27 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SearchDivide |
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
var dividendsReturnedOrderRepository domain.DividendsReturnedOrderRepository
|
|
|
if value, err := factory.CreateDividendsReturnedOrderRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
}); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
|
|
dividendsReturnedOrderRepository = value
|
|
|
}
|
|
|
if count, dividendsReturnedOrders, err := dividendsReturnedOrderRepository.Find(tool_funs.SimpleStructToMap(searchDividendsReturnedOrderQuery)); 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 map[string]interface{}{
|
|
|
"grid": map[string]interface{}{
|
|
|
"total": count,
|
|
|
"list": dividendsReturnedOrders,
|
|
|
},
|
|
|
}, nil
|
|
|
}
|
|
|
return nil, nil
|
|
|
}
|
|
|
|
|
|
// UpdateDividendsReturnedOrder 更新分红退货单服务
|
...
|
...
|
|