...
|
...
|
@@ -891,15 +891,15 @@ func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeD |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if dividendsOrder == nil {
|
|
|
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(removeDividendsOrderCommand.DividendsOrderId)))
|
|
|
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", strconv.FormatInt(removeDividendsOrderCommand.DividendsOrderId, 10)))
|
|
|
}
|
|
|
if dividendsOrder, err := dividendsOrderRepository.Remove(dividendsOrder); err != nil {
|
|
|
if dividendsOrderRemoved, err := dividendsOrderRepository.Remove(dividendsOrder); 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 dividendsOrder, nil
|
|
|
return dividendsOrderRemoved, nil
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -1058,8 +1058,14 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD |
|
|
}
|
|
|
orderTime := utils.TransformTimestampToTime(orderTimeInt)
|
|
|
|
|
|
// 分红订单ID类型转换
|
|
|
dividendsOrderId, err := strconv.ParseInt(updateDividendsOrderCommand.DividendsOrderId, 10, 64)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
// 获取分红订单
|
|
|
dividendsOrder, err := dividendsOrderRepository.FindOne(map[string]interface{}{"dividendsOrderId": updateDividendsOrderCommand.DividendsOrderId})
|
|
|
dividendsOrder, err := dividendsOrderRepository.FindOne(map[string]interface{}{"dividendsOrderId": dividendsOrderId})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "分红订单不存在")
|
|
|
}
|
...
|
...
|
|