正在显示
2 个修改的文件
包含
15 行增加
和
6 行删除
@@ -4,9 +4,6 @@ import ( | @@ -4,9 +4,6 @@ import ( | ||
4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
5 | ) | 5 | ) |
6 | 6 | ||
7 | -type DividendsReturnedOrderItem struct { | ||
8 | -} | ||
9 | - | ||
10 | type DividendsReturnedOrderInfo struct { | 7 | type DividendsReturnedOrderInfo struct { |
11 | // 公司 | 8 | // 公司 |
12 | Company struct { | 9 | Company struct { |
@@ -23,7 +20,6 @@ type DividendsReturnedOrderInfo struct { | @@ -23,7 +20,6 @@ type DividendsReturnedOrderInfo struct { | ||
23 | DividendsReturnedOrderID string `json:"dividendsReturnedOrderId"` //分红退货单记录id | 20 | DividendsReturnedOrderID string `json:"dividendsReturnedOrderId"` //分红退货单记录id |
24 | DividendsReturnedOrderNumber string `json:"dividendsReturnedOrderNumber"` //分红退货单号 | 21 | DividendsReturnedOrderNumber string `json:"dividendsReturnedOrderNumber"` //分红退货单号 |
25 | DividendsReturnedOrderRefund float64 `json:"dividendsReturnedOrderRefund"` //退货金额 | 22 | DividendsReturnedOrderRefund float64 `json:"dividendsReturnedOrderRefund"` //退货金额 |
26 | - OperateTime string `json:"operateTime"` //操作时间 | ||
27 | OriginalOrderNum string `json:"originalOrderNum"` //源单号(原始订单号) | 23 | OriginalOrderNum string `json:"originalOrderNum"` //源单号(原始订单号) |
28 | Remarks string `json:"remarks"` //备注 | 24 | Remarks string `json:"remarks"` //备注 |
29 | //更新时间 | 25 | //更新时间 |
@@ -49,6 +45,13 @@ func ToDividendsReturnedOrderInfo(param *allied_creation_cooperation.DividendsRe | @@ -49,6 +45,13 @@ func ToDividendsReturnedOrderInfo(param *allied_creation_cooperation.DividendsRe | ||
49 | DividendStatus: param.DividendStatus, | 45 | DividendStatus: param.DividendStatus, |
50 | DividendTime: param.DividendTime.Unix(), | 46 | DividendTime: param.DividendTime.Unix(), |
51 | DividendsOrderNumber: param.DividendsOrderNumber, | 47 | DividendsOrderNumber: param.DividendsOrderNumber, |
48 | + DividendsReturnedCustomerName: param.DividendsReturnedCustomerName, | ||
49 | + DividendsReturnedDate: param.DividendsReturnedDate.Unix(), | ||
50 | + DividendsReturnedOrderID: param.DividendsReturnedOrderID, | ||
51 | + DividendsReturnedOrderNumber: param.DividendsReturnedOrderNumber, | ||
52 | + DividendsReturnedOrderRefund: param.DividendsReturnedOrderRefund, | ||
53 | + OriginalOrderNum: param.OriginalOrderNum, | ||
54 | + Remarks: param.Remarks, | ||
52 | } | 55 | } |
53 | return &data | 56 | return &data |
54 | } | 57 | } |
@@ -5,6 +5,7 @@ import ( | @@ -5,6 +5,7 @@ import ( | ||
5 | 5 | ||
6 | "github.com/linmadan/egglib-go/core/application" | 6 | "github.com/linmadan/egglib-go/core/application" |
7 | "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" |
8 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/dto" | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/query" | 9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/query" |
9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | 10 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
10 | ) | 11 | ) |
@@ -33,7 +34,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) GetDividends | @@ -33,7 +34,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) GetDividends | ||
33 | if err != nil { | 34 | if err != nil { |
34 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 35 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
35 | } | 36 | } |
36 | - return result, nil | 37 | + return dto.ToDividendsReturnedOrderInfo(&result.DividendsReturnedOrder), nil |
37 | } | 38 | } |
38 | 39 | ||
39 | // 移除分红退货单服务 | 40 | // 移除分红退货单服务 |
@@ -65,7 +66,12 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SearchDivide | @@ -65,7 +66,12 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SearchDivide | ||
65 | if err != nil { | 66 | if err != nil { |
66 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 67 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
67 | } | 68 | } |
68 | - return result.Total, result.List, nil | 69 | + dataList := []dto.DividendsReturnedOrderInfo{} |
70 | + for i := range result.List { | ||
71 | + item := dto.ToDividendsReturnedOrderInfo(&result.List[i]) | ||
72 | + dataList = append(dataList, *item) | ||
73 | + } | ||
74 | + return result.Total, dataList, nil | ||
69 | } | 75 | } |
70 | 76 | ||
71 | // 更新分红退货单服务 | 77 | // 更新分红退货单服务 |
-
请 注册 或 登录 后发表评论