|
@@ -2,7 +2,6 @@ package service |
|
@@ -2,7 +2,6 @@ package service |
2
|
|
2
|
|
3
|
import (
|
3
|
import (
|
4
|
"strconv"
|
4
|
"strconv"
|
5
|
- "time"
|
|
|
6
|
|
5
|
|
7
|
"github.com/linmadan/egglib-go/core/application"
|
6
|
"github.com/linmadan/egglib-go/core/application"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/command"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/command"
|
|
@@ -18,8 +17,7 @@ type DividendsReturnedOrderService struct { |
|
@@ -18,8 +17,7 @@ type DividendsReturnedOrderService struct { |
18
|
// 创建分红退货单服务
|
17
|
// 创建分红退货单服务
|
19
|
func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand *command.CreateDividendsReturnedOrderCommand) (interface{}, error) {
|
18
|
func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand *command.CreateDividendsReturnedOrderCommand) (interface{}, error) {
|
20
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsReturnedOrderCommand.Operator)
|
19
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsReturnedOrderCommand.Operator)
|
21
|
- dividendsReturnedDate := time.Unix(createDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
|
|
|
22
|
- orderDate := time.Unix(createDividendsReturnedOrderCommand.OrderTime/1e3, 0)
|
20
|
+
|
23
|
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
|
21
|
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
|
24
|
for _, v := range createDividendsReturnedOrderCommand.OrderGoods {
|
22
|
for _, v := range createDividendsReturnedOrderCommand.OrderGoods {
|
25
|
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
|
23
|
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
|
|
@@ -37,8 +35,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide |
|
@@ -37,8 +35,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide |
37
|
DividendsOrderNumber: createDividendsReturnedOrderCommand.DividendsOrderNumber,
|
35
|
DividendsOrderNumber: createDividendsReturnedOrderCommand.DividendsOrderNumber,
|
38
|
OriginalOrderNum: createDividendsReturnedOrderCommand.OriginalOrderNum,
|
36
|
OriginalOrderNum: createDividendsReturnedOrderCommand.OriginalOrderNum,
|
39
|
OrderGoods: orderGooods,
|
37
|
OrderGoods: orderGooods,
|
40
|
- DividendsReturnedDate: dividendsReturnedDate,
|
|
|
41
|
- OrderTime: orderDate,
|
38
|
+ DividendsReturnedDate: createDividendsReturnedOrderCommand.DividendsReturnedDate,
|
|
|
39
|
+ OrderTime: createDividendsReturnedOrderCommand.OrderTime,
|
42
|
OrgId: int(createDividendsReturnedOrderCommand.Operator.OrgId),
|
40
|
OrgId: int(createDividendsReturnedOrderCommand.Operator.OrgId),
|
43
|
Remarks: createDividendsReturnedOrderCommand.Remarks,
|
41
|
Remarks: createDividendsReturnedOrderCommand.Remarks,
|
44
|
RegionName: createDividendsReturnedOrderCommand.RegionName,
|
42
|
RegionName: createDividendsReturnedOrderCommand.RegionName,
|
|
@@ -96,8 +94,6 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SearchDivide |
|
@@ -96,8 +94,6 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SearchDivide |
96
|
// 更新分红退货单服务
|
94
|
// 更新分红退货单服务
|
97
|
func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDividendsReturnedOrder(updateDividendsReturnedOrderCommand *command.UpdateDividendsReturnedOrderCommand) (interface{}, error) {
|
95
|
func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDividendsReturnedOrder(updateDividendsReturnedOrderCommand *command.UpdateDividendsReturnedOrderCommand) (interface{}, error) {
|
98
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsReturnedOrderCommand.Operator)
|
96
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsReturnedOrderCommand.Operator)
|
99
|
- dividendsReturnedDate := time.Unix(updateDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
|
|
|
100
|
- orderDate := time.Unix(updateDividendsReturnedOrderCommand.OrderTime/1e3, 0)
|
|
|
101
|
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
|
97
|
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
|
102
|
for _, v := range updateDividendsReturnedOrderCommand.OrderGoods {
|
98
|
for _, v := range updateDividendsReturnedOrderCommand.OrderGoods {
|
103
|
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
|
99
|
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
|
|
@@ -116,8 +112,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide |
|
@@ -116,8 +112,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide |
116
|
DividendsOrderNumber: updateDividendsReturnedOrderCommand.DividendsOrderNumber,
|
112
|
DividendsOrderNumber: updateDividendsReturnedOrderCommand.DividendsOrderNumber,
|
117
|
OriginalOrderNum: updateDividendsReturnedOrderCommand.OriginalOrderNum,
|
113
|
OriginalOrderNum: updateDividendsReturnedOrderCommand.OriginalOrderNum,
|
118
|
OrderGoods: orderGooods,
|
114
|
OrderGoods: orderGooods,
|
119
|
- DividendsReturnedDate: dividendsReturnedDate,
|
|
|
120
|
- OrderTime: orderDate,
|
115
|
+ DividendsReturnedDate: updateDividendsReturnedOrderCommand.DividendsReturnedDate,
|
|
|
116
|
+ OrderTime: updateDividendsReturnedOrderCommand.OrderTime,
|
121
|
OrgId: int(updateDividendsReturnedOrderCommand.Operator.OrgId),
|
117
|
OrgId: int(updateDividendsReturnedOrderCommand.Operator.OrgId),
|
122
|
Remarks: updateDividendsReturnedOrderCommand.Remarks,
|
118
|
Remarks: updateDividendsReturnedOrderCommand.Remarks,
|
123
|
RegionName: updateDividendsReturnedOrderCommand.RegionName,
|
119
|
RegionName: updateDividendsReturnedOrderCommand.RegionName,
|