作者 tangxuhui

数据结构调整

... ... @@ -29,7 +29,7 @@ func ToCooperationContractItem(param *allied_creation_cooperation.CooperationCon
CooperationContractName: param.CooperationContractName,
CooperationContractNumber: param.CooperationContractNumber,
Status: param.Status,
CreateTtime: int(param.CreatedAt.Unix()),
CreateTtime: int(param.CreatedAt.UnixNano() / 1e6),
}
data.CooperationContractSponsor.UserId = param.CooperationContractSponsor.UserId
data.CooperationContractSponsor.UserName = param.CooperationContractSponsor.UserInfo.UserName
... ... @@ -122,8 +122,8 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
SalesmanPercentage: v.SalesmanPercentage,
DividendsIncentivesPercentage: v.DividendsIncentivesPercentage,
DividendsIncentivesStage: v.DividendsIncentivesStage,
DividendsIncentivesStageEnd: v.DividendsIncentivesStageEnd.Unix(),
DividendsIncentivesStageStart: v.DividendsIncentivesStageStart.Unix(),
DividendsIncentivesStageEnd: v.DividendsIncentivesStageEnd.UnixNano() / 1e6,
DividendsIncentivesStageStart: v.DividendsIncentivesStageStart.UnixNano() / 1e6,
}
dividendsIncentivesRules = append(dividendsIncentivesRules, r)
}
... ... @@ -134,7 +134,7 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
CooperationContractNumber: v.CooperationContractNumber,
MoneyIncentivesAmount: v.MoneyIncentivesAmount,
MoneyIncentivesStage: v.MoneyIncentivesStage,
MoneyIncentivesTime: v.MoneyIncentivesTime.Unix(),
MoneyIncentivesTime: v.MoneyIncentivesTime.UnixNano() / 1e6,
ReferrerPercentage: v.ReferrerPercentage,
SalesmanPercentage: v.SalesmanPercentage,
}
... ...
... ... @@ -49,7 +49,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
underTakers := []allied_creation_cooperation.Undertaker{}
for _, v := range createCooperationContractCommand.Undertakers {
u := allied_creation_cooperation.Undertaker{
UndertakerId: v.UndertakerId,
UserId: v.UndertakerId,
RerferrerId: v.RerferrerId,
SalesmanId: v.SalesmanId,
Attachment: v.Attachment,
... ... @@ -164,7 +164,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
underTakers := []allied_creation_cooperation.Undertaker{}
for _, v := range updateCooperationContractCommand.Undertakers {
u := allied_creation_cooperation.Undertaker{
UndertakerId: v.UndertakerId,
UserId: v.UndertakerId,
RerferrerId: v.RerferrerId,
SalesmanId: v.SalesmanId,
Attachment: v.Attachment,
... ...
... ... @@ -35,7 +35,7 @@ func ToDividendsOrder(param *allied_creation_cooperation.DividendsOrder) *Divide
Company: param.Company,
CustomerName: param.CustomerName,
DividendStatus: param.DividendStatus,
DividendTime: param.DividendTime.Unix(),
DividendTime: param.DividendTime.UnixNano() / 1e6,
DividendsOrderAmount: param.DividendsOrderAmount,
DividendsOrderID: param.DividendsOrderID,
DividendsOrderNumber: param.DividendsOrderNumber,
... ...
... ... @@ -41,12 +41,12 @@ func ToDividendsReturnedOrderInfo(param *allied_creation_cooperation.DividendsRe
Org: param.Org,
Region: param.Region,
Company: param.Company,
CreatedAt: param.CreatedAt.Unix(),
CreatedAt: param.CreatedAt.UnixNano() / 1e6,
DividendStatus: param.DividendStatus,
DividendTime: param.DividendTime.Unix(),
DividendTime: param.DividendTime.UnixNano() / 1e6,
DividendsOrderNumber: param.DividendsOrderNumber,
DividendsReturnedCustomerName: param.DividendsReturnedCustomerName,
DividendsReturnedDate: param.DividendsReturnedDate.Unix(),
DividendsReturnedDate: param.DividendsReturnedDate.UnixNano() / 1e6,
DividendsReturnedOrderID: param.DividendsReturnedOrderID,
DividendsReturnedOrderNumber: param.DividendsReturnedOrderNumber,
DividendsReturnedOrderRefund: param.DividendsReturnedOrderRefund,
... ...
... ... @@ -18,8 +18,8 @@ type DividendsReturnedOrderService struct {
// 创建分红退货单服务
func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand *command.CreateDividendsReturnedOrderCommand) (interface{}, error) {
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsReturnedOrderCommand.Operator)
dividendsReturnedDate := time.Unix(createDividendsReturnedOrderCommand.DividendsReturnedDate, 0)
orderDate := time.Unix(createDividendsReturnedOrderCommand.OrderDate, 0)
dividendsReturnedDate := time.Unix(createDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
orderDate := time.Unix(createDividendsReturnedOrderCommand.OrderDate/1e3, 0)
result, err := creationCooperationGateway.DividendsReturnedOrderAdd(allied_creation_cooperation.ReqDividendsReturnedOrderAdd{
DividendsReturnedCustomerName: createDividendsReturnedOrderCommand.DividendsReturnedCustomerName,
DividendsOrderNumber: createDividendsReturnedOrderCommand.DividendsOrderNumber,
... ... @@ -89,8 +89,8 @@ 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, 0)
orderDate := time.Unix(updateDividendsReturnedOrderCommand.OrderDate, 0)
dividendsReturnedDate := time.Unix(updateDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
orderDate := time.Unix(updateDividendsReturnedOrderCommand.OrderDate/1e3, 0)
_, err := creationCooperationGateway.DividendsReturnedOrderUpdate(allied_creation_cooperation.ReqDividendsReturnedOrderUpdate{
DividendsReturnedOrderID: updateDividendsReturnedOrderCommand.DividendsReturnedOrderID,
DividendsReturnedCustomerName: updateDividendsReturnedOrderCommand.DividendsReturnedCustomerName,
... ...
... ... @@ -142,7 +142,7 @@ type (
//合约承接方
Undertaker struct {
UndertakerId string `json:"undertakerId"` //承接人用户id
UserId string `json:"userId"` //承接人用户id
RerferrerId string `json:"rerferrerId"` //推荐人用户id
SalesmanId string `json:"salesmanId"` //关联业务员id
Attachment []domain.Attachment `json:"attachment"`
... ...