|
@@ -136,9 +136,12 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD |
|
@@ -136,9 +136,12 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD |
136
|
dividendsOrderAmount = dividendsOrderAmount + orderGood.OrderGoodAmount
|
136
|
dividendsOrderAmount = dividendsOrderAmount + orderGood.OrderGoodAmount
|
137
|
}
|
137
|
}
|
138
|
|
138
|
|
139
|
- //// 订单时间转换
|
|
|
140
|
- //orderTimeInt, _ := strconv.ParseInt(createDividendsOrderCommand.OrderTime, 10, 64)
|
|
|
141
|
- //orderTime := utils.TransformTimestampToTime(orderTimeInt)
|
139
|
+ // 订单时间转换
|
|
|
140
|
+ orderTimeInt, err := strconv.ParseInt(createDividendsOrderCommand.OrderTime, 10, 64)
|
|
|
141
|
+ if err != nil {
|
|
|
142
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "订单时间错误")
|
|
|
143
|
+ }
|
|
|
144
|
+ orderTime := utils.TransformTimestampToTime(orderTimeInt)
|
142
|
|
145
|
|
143
|
// 新增分红订单
|
146
|
// 新增分红订单
|
144
|
newDividendsOrder := &domain.DividendsOrder{
|
147
|
newDividendsOrder := &domain.DividendsOrder{
|
|
@@ -146,7 +149,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD |
|
@@ -146,7 +149,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD |
146
|
DividendsOrderNumber: dividendsOrderNumber,
|
149
|
DividendsOrderNumber: dividendsOrderNumber,
|
147
|
DividendsOriginalOrderNum: createDividendsOrderCommand.DividendsOriginalOrderNum,
|
150
|
DividendsOriginalOrderNum: createDividendsOrderCommand.DividendsOriginalOrderNum,
|
148
|
DividendsOrderAmount: dividendsOrderAmount,
|
151
|
DividendsOrderAmount: dividendsOrderAmount,
|
149
|
- OrderTime: createDividendsOrderCommand.OrderTime,
|
152
|
+ OrderTime: orderTime,
|
150
|
DividendTime: time.Time{},
|
153
|
DividendTime: time.Time{},
|
151
|
DividendStatus: domain.TO_BE_DIVIDEND,
|
154
|
DividendStatus: domain.TO_BE_DIVIDEND,
|
152
|
Region: &domain.RegionInfo{
|
155
|
Region: &domain.RegionInfo{
|