作者 tangxuhui

修正退货单无法 添加 更新

@@ -11,7 +11,6 @@ type CreateDividendsReturnedOrderCommand struct { @@ -11,7 +11,6 @@ type CreateDividendsReturnedOrderCommand struct {
11 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号 11 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
12 OriginalOrderNum string `json:"originalOrderNum"` //源单号 12 OriginalOrderNum string `json:"originalOrderNum"` //源单号
13 OrderGoods []struct { 13 OrderGoods []struct {
14 - OrderGoodId int64 `json:"orderGoodId,string"` // 订单产品id  
15 CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号 14 CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
16 // OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额 15 // OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
17 OrderGoodName string `json:"orderGoodName"` //订单产品名称 16 OrderGoodName string `json:"orderGoodName"` //订单产品名称
@@ -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,
@@ -206,8 +206,9 @@ func (gateway HttplibAlliedCreationCooperation) DividendsOrderGet(param ReqDivid @@ -206,8 +206,9 @@ func (gateway HttplibAlliedCreationCooperation) DividendsOrderGet(param ReqDivid
206 if len(param.DividendsOrderNumber) > 0 { 206 if len(param.DividendsOrderNumber) > 0 {
207 req.Param("dividendsOrderNumber", param.DividendsOrderNumber) 207 req.Param("dividendsOrderNumber", param.DividendsOrderNumber)
208 } 208 }
  209 + fmt.Printf("=========>param %+v", param)
209 log.Logger.Debug("向业务模块请求数据:返回分红订单详情。", map[string]interface{}{ 210 log.Logger.Debug("向业务模块请求数据:返回分红订单详情。", map[string]interface{}{
210 - "api": method + ":" + url, 211 + "api": method + ":" + req.GetRequest().URL.String(),
211 "param": param, 212 "param": param,
212 }) 213 })
213 req, err := req.JSONBody(param) 214 req, err := req.JSONBody(param)
@@ -61,8 +61,8 @@ type ( @@ -61,8 +61,8 @@ type (
61 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号 61 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
62 OriginalOrderNum string `json:"originalOrderNum"` 62 OriginalOrderNum string `json:"originalOrderNum"`
63 OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"` 63 OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
64 - DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`  
65 - OrderTime time.Time `json:"orderTime"` 64 + DividendsReturnedDate int64 `json:"dividendsReturnedDate,string"`
  65 + OrderTime int64 `json:"orderTime,string"`
66 OrgId int `json:"orgId"` 66 OrgId int `json:"orgId"`
67 Remarks string `json:"remarks"` 67 Remarks string `json:"remarks"`
68 RegionName string `json:"regionName"` 68 RegionName string `json:"regionName"`
@@ -81,8 +81,8 @@ type ( @@ -81,8 +81,8 @@ type (
81 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号 81 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
82 OriginalOrderNum string `json:"originalOrderNum"` 82 OriginalOrderNum string `json:"originalOrderNum"`
83 OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"` 83 OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
84 - DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`  
85 - OrderTime time.Time `json:"orderTime"` 84 + DividendsReturnedDate int64 `json:"dividendsReturnedDate,string"`
  85 + OrderTime int64 `json:"orderTime,string"`
86 OrgId int `json:"orgId"` 86 OrgId int `json:"orgId"`
87 Remarks string `json:"remarks"` 87 Remarks string `json:"remarks"`
88 RegionName string `json:"regionName"` 88 RegionName string `json:"regionName"`