|
@@ -889,15 +889,15 @@ func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeD |
|
@@ -889,15 +889,15 @@ func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeD |
889
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
889
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
890
|
}
|
890
|
}
|
891
|
if dividendsOrder == nil {
|
891
|
if dividendsOrder == nil {
|
892
|
- return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(removeDividendsOrderCommand.DividendsOrderId)))
|
892
|
+ return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", strconv.FormatInt(removeDividendsOrderCommand.DividendsOrderId, 10)))
|
893
|
}
|
893
|
}
|
894
|
- if dividendsOrder, err := dividendsOrderRepository.Remove(dividendsOrder); err != nil {
|
894
|
+ if dividendsOrderRemoved, err := dividendsOrderRepository.Remove(dividendsOrder); err != nil {
|
895
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
895
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
896
|
} else {
|
896
|
} else {
|
897
|
if err := transactionContext.CommitTransaction(); err != nil {
|
897
|
if err := transactionContext.CommitTransaction(); err != nil {
|
898
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
898
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
899
|
}
|
899
|
}
|
900
|
- return dividendsOrder, nil
|
900
|
+ return dividendsOrderRemoved, nil
|
901
|
}
|
901
|
}
|
902
|
}
|
902
|
}
|
903
|
|
903
|
|
|
@@ -1056,8 +1056,14 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD |
|
@@ -1056,8 +1056,14 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD |
1056
|
}
|
1056
|
}
|
1057
|
orderTime := utils.TransformTimestampToTime(orderTimeInt)
|
1057
|
orderTime := utils.TransformTimestampToTime(orderTimeInt)
|
1058
|
|
1058
|
|
|
|
1059
|
+ // 分红订单ID类型转换
|
|
|
1060
|
+ dividendsOrderId, err := strconv.ParseInt(updateDividendsOrderCommand.DividendsOrderId, 10, 64)
|
|
|
1061
|
+ if err != nil {
|
|
|
1062
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
1063
|
+ }
|
|
|
1064
|
+
|
1059
|
// 获取分红订单
|
1065
|
// 获取分红订单
|
1060
|
- dividendsOrder, err := dividendsOrderRepository.FindOne(map[string]interface{}{"dividendsOrderId": updateDividendsOrderCommand.DividendsOrderId})
|
1066
|
+ dividendsOrder, err := dividendsOrderRepository.FindOne(map[string]interface{}{"dividendsOrderId": dividendsOrderId})
|
1061
|
if err != nil {
|
1067
|
if err != nil {
|
1062
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "分红订单不存在")
|
1068
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "分红订单不存在")
|
1063
|
}
|
1069
|
}
|