作者 陈志颖

fix:修复分红订单产品编辑

... ... @@ -1096,6 +1096,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD
DividendsReturnedOrderNumber: "",
CooperationContractNumber: orderGood.CooperationContractNumber,
OrderGoodExpense: orderGood.OrderGoodExpense,
OrderGoodDividendsStatus: 0,
OrgId: updateDividendsOrderCommand.OrgId,
CompanyId: updateDividendsOrderCommand.CompanyId,
CreatedAt: time.Time{},
... ...
... ... @@ -122,7 +122,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
CompanyId: good.CompanyId,
OrgId: good.OrgId,
OrderGoodExpense: good.OrderGoodExpense,
OrderGoodDividendsStatus: good.OrderGoodDividendsStatus,
OrderGoodDividendsStatus: 1,
CreatedAt: time.Now(),
DeletedAt: time.Time{},
UpdatedAt: time.Time{},
... ... @@ -228,7 +228,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
OrderGoodExpense: goodDomain.OrderGoodExpense,
OrgId: goodDomain.OrgId,
CompanyId: goodDomain.CompanyId,
OrderGoodDividendsStatus: goodDomain.OrderGoodDividendsStatus,
OrderGoodDividendsStatus: 1,
CreatedAt: time.Now(),
DeletedAt: time.Time{},
UpdatedAt: time.Time{},
... ... @@ -266,20 +266,20 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
for _, orderGood := range dividendsOrder.Goods {
if orderGood.OrderGoodId == orderGoodModelToUpdate.OrderGoodId {
orderGoodModelsToUpdate[i] = &models.OrderGood{
OrderGoodId: orderGood.OrderGoodId,
OrderGoodId: orderGoodModelToUpdate.OrderGoodId,
OrderGoodAmount: orderGood.OrderGoodAmount,
OrderGoodName: orderGood.OrderGoodName,
OrderGoodPrice: orderGood.OrderGoodPrice,
OrderGoodQuantity: orderGood.OrderGoodQuantity,
DividendsOrderNumber: orderGood.DividendsOrderNumber,
DividendsReturnedOrderNumber: orderGood.DividendsReturnedOrderNumber,
DividendsReturnedOrderNumber: "",
CooperationContractNumber: orderGood.CooperationContractNumber,
OrgId: orderGood.OrgId,
CompanyId: orderGood.CompanyId,
OrgId: orderGoodModelToUpdate.OrgId,
CompanyId: orderGoodModelToUpdate.CompanyId,
OrderGoodExpense: orderGood.OrderGoodExpense,
OrderGoodDividendsStatus: orderGood.OrderGoodDividendsStatus,
CreatedAt: orderGood.CreatedAt,
DeletedAt: orderGood.DeletedAt,
OrderGoodDividendsStatus: orderGoodModelToUpdate.OrderGoodDividendsStatus,
CreatedAt: orderGoodModelToUpdate.CreatedAt,
DeletedAt: orderGoodModelToUpdate.DeletedAt,
UpdatedAt: time.Now(),
}
}
... ...