作者 陈志颖

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

@@ -1096,6 +1096,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD @@ -1096,6 +1096,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD
1096 DividendsReturnedOrderNumber: "", 1096 DividendsReturnedOrderNumber: "",
1097 CooperationContractNumber: orderGood.CooperationContractNumber, 1097 CooperationContractNumber: orderGood.CooperationContractNumber,
1098 OrderGoodExpense: orderGood.OrderGoodExpense, 1098 OrderGoodExpense: orderGood.OrderGoodExpense,
  1099 + OrderGoodDividendsStatus: 0,
1099 OrgId: updateDividendsOrderCommand.OrgId, 1100 OrgId: updateDividendsOrderCommand.OrgId,
1100 CompanyId: updateDividendsOrderCommand.CompanyId, 1101 CompanyId: updateDividendsOrderCommand.CompanyId,
1101 CreatedAt: time.Time{}, 1102 CreatedAt: time.Time{},
@@ -122,7 +122,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend @@ -122,7 +122,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
122 CompanyId: good.CompanyId, 122 CompanyId: good.CompanyId,
123 OrgId: good.OrgId, 123 OrgId: good.OrgId,
124 OrderGoodExpense: good.OrderGoodExpense, 124 OrderGoodExpense: good.OrderGoodExpense,
125 - OrderGoodDividendsStatus: good.OrderGoodDividendsStatus, 125 + OrderGoodDividendsStatus: 1,
126 CreatedAt: time.Now(), 126 CreatedAt: time.Now(),
127 DeletedAt: time.Time{}, 127 DeletedAt: time.Time{},
128 UpdatedAt: time.Time{}, 128 UpdatedAt: time.Time{},
@@ -228,7 +228,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend @@ -228,7 +228,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
228 OrderGoodExpense: goodDomain.OrderGoodExpense, 228 OrderGoodExpense: goodDomain.OrderGoodExpense,
229 OrgId: goodDomain.OrgId, 229 OrgId: goodDomain.OrgId,
230 CompanyId: goodDomain.CompanyId, 230 CompanyId: goodDomain.CompanyId,
231 - OrderGoodDividendsStatus: goodDomain.OrderGoodDividendsStatus, 231 + OrderGoodDividendsStatus: 1,
232 CreatedAt: time.Now(), 232 CreatedAt: time.Now(),
233 DeletedAt: time.Time{}, 233 DeletedAt: time.Time{},
234 UpdatedAt: time.Time{}, 234 UpdatedAt: time.Time{},
@@ -266,20 +266,20 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend @@ -266,20 +266,20 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
266 for _, orderGood := range dividendsOrder.Goods { 266 for _, orderGood := range dividendsOrder.Goods {
267 if orderGood.OrderGoodId == orderGoodModelToUpdate.OrderGoodId { 267 if orderGood.OrderGoodId == orderGoodModelToUpdate.OrderGoodId {
268 orderGoodModelsToUpdate[i] = &models.OrderGood{ 268 orderGoodModelsToUpdate[i] = &models.OrderGood{
269 - OrderGoodId: orderGood.OrderGoodId, 269 + OrderGoodId: orderGoodModelToUpdate.OrderGoodId,
270 OrderGoodAmount: orderGood.OrderGoodAmount, 270 OrderGoodAmount: orderGood.OrderGoodAmount,
271 OrderGoodName: orderGood.OrderGoodName, 271 OrderGoodName: orderGood.OrderGoodName,
272 OrderGoodPrice: orderGood.OrderGoodPrice, 272 OrderGoodPrice: orderGood.OrderGoodPrice,
273 OrderGoodQuantity: orderGood.OrderGoodQuantity, 273 OrderGoodQuantity: orderGood.OrderGoodQuantity,
274 DividendsOrderNumber: orderGood.DividendsOrderNumber, 274 DividendsOrderNumber: orderGood.DividendsOrderNumber,
275 - DividendsReturnedOrderNumber: orderGood.DividendsReturnedOrderNumber, 275 + DividendsReturnedOrderNumber: "",
276 CooperationContractNumber: orderGood.CooperationContractNumber, 276 CooperationContractNumber: orderGood.CooperationContractNumber,
277 - OrgId: orderGood.OrgId,  
278 - CompanyId: orderGood.CompanyId, 277 + OrgId: orderGoodModelToUpdate.OrgId,
  278 + CompanyId: orderGoodModelToUpdate.CompanyId,
279 OrderGoodExpense: orderGood.OrderGoodExpense, 279 OrderGoodExpense: orderGood.OrderGoodExpense,
280 - OrderGoodDividendsStatus: orderGood.OrderGoodDividendsStatus,  
281 - CreatedAt: orderGood.CreatedAt,  
282 - DeletedAt: orderGood.DeletedAt, 280 + OrderGoodDividendsStatus: orderGoodModelToUpdate.OrderGoodDividendsStatus,
  281 + CreatedAt: orderGoodModelToUpdate.CreatedAt,
  282 + DeletedAt: orderGoodModelToUpdate.DeletedAt,
283 UpdatedAt: time.Now(), 283 UpdatedAt: time.Now(),
284 } 284 }
285 } 285 }