...
|
...
|
@@ -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,
|
...
|
...
|
|