作者 tangxuhui

修正退货单无法 添加 更新

... ... @@ -11,7 +11,6 @@ type CreateDividendsReturnedOrderCommand struct {
DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
OriginalOrderNum string `json:"originalOrderNum"` //源单号
OrderGoods []struct {
OrderGoodId int64 `json:"orderGoodId,string"` // 订单产品id
CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
// OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
OrderGoodName string `json:"orderGoodName"` //订单产品名称
... ...
... ... @@ -2,7 +2,6 @@ package service
import (
"strconv"
"time"
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/command"
... ... @@ -18,8 +17,7 @@ type DividendsReturnedOrderService struct {
// 创建分红退货单服务
func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand *command.CreateDividendsReturnedOrderCommand) (interface{}, error) {
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsReturnedOrderCommand.Operator)
dividendsReturnedDate := time.Unix(createDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
orderDate := time.Unix(createDividendsReturnedOrderCommand.OrderTime/1e3, 0)
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
for _, v := range createDividendsReturnedOrderCommand.OrderGoods {
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
... ... @@ -37,8 +35,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide
DividendsOrderNumber: createDividendsReturnedOrderCommand.DividendsOrderNumber,
OriginalOrderNum: createDividendsReturnedOrderCommand.OriginalOrderNum,
OrderGoods: orderGooods,
DividendsReturnedDate: dividendsReturnedDate,
OrderTime: orderDate,
DividendsReturnedDate: createDividendsReturnedOrderCommand.DividendsReturnedDate,
OrderTime: createDividendsReturnedOrderCommand.OrderTime,
OrgId: int(createDividendsReturnedOrderCommand.Operator.OrgId),
Remarks: createDividendsReturnedOrderCommand.Remarks,
RegionName: createDividendsReturnedOrderCommand.RegionName,
... ... @@ -96,8 +94,6 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SearchDivide
// 更新分红退货单服务
func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDividendsReturnedOrder(updateDividendsReturnedOrderCommand *command.UpdateDividendsReturnedOrderCommand) (interface{}, error) {
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsReturnedOrderCommand.Operator)
dividendsReturnedDate := time.Unix(updateDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
orderDate := time.Unix(updateDividendsReturnedOrderCommand.OrderTime/1e3, 0)
var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
for _, v := range updateDividendsReturnedOrderCommand.OrderGoods {
good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
... ... @@ -116,8 +112,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide
DividendsOrderNumber: updateDividendsReturnedOrderCommand.DividendsOrderNumber,
OriginalOrderNum: updateDividendsReturnedOrderCommand.OriginalOrderNum,
OrderGoods: orderGooods,
DividendsReturnedDate: dividendsReturnedDate,
OrderTime: orderDate,
DividendsReturnedDate: updateDividendsReturnedOrderCommand.DividendsReturnedDate,
OrderTime: updateDividendsReturnedOrderCommand.OrderTime,
OrgId: int(updateDividendsReturnedOrderCommand.Operator.OrgId),
Remarks: updateDividendsReturnedOrderCommand.Remarks,
RegionName: updateDividendsReturnedOrderCommand.RegionName,
... ...
... ... @@ -206,8 +206,9 @@ func (gateway HttplibAlliedCreationCooperation) DividendsOrderGet(param ReqDivid
if len(param.DividendsOrderNumber) > 0 {
req.Param("dividendsOrderNumber", param.DividendsOrderNumber)
}
fmt.Printf("=========>param %+v", param)
log.Logger.Debug("向业务模块请求数据:返回分红订单详情。", map[string]interface{}{
"api": method + ":" + url,
"api": method + ":" + req.GetRequest().URL.String(),
"param": param,
})
req, err := req.JSONBody(param)
... ...
... ... @@ -61,8 +61,8 @@ type (
DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
OriginalOrderNum string `json:"originalOrderNum"`
OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`
OrderTime time.Time `json:"orderTime"`
DividendsReturnedDate int64 `json:"dividendsReturnedDate,string"`
OrderTime int64 `json:"orderTime,string"`
OrgId int `json:"orgId"`
Remarks string `json:"remarks"`
RegionName string `json:"regionName"`
... ... @@ -81,8 +81,8 @@ type (
DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
OriginalOrderNum string `json:"originalOrderNum"`
OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`
OrderTime time.Time `json:"orderTime"`
DividendsReturnedDate int64 `json:"dividendsReturnedDate,string"`
OrderTime int64 `json:"orderTime,string"`
OrgId int `json:"orgId"`
Remarks string `json:"remarks"`
RegionName string `json:"regionName"`
... ...