作者 陈志颖

fix:删除订单产品

@@ -477,7 +477,7 @@ func (repository *DividendsOrderRepository) BatchRemove(dividendsOrders []*domai @@ -477,7 +477,7 @@ func (repository *DividendsOrderRepository) BatchRemove(dividendsOrders []*domai
477 if _, err := tx.Model(&orderGoodModels). 477 if _, err := tx.Model(&orderGoodModels).
478 Where("company_id = ?", dividendsOrder.Company.CompanyId). 478 Where("company_id = ?", dividendsOrder.Company.CompanyId).
479 Where("org_id = ?", dividendsOrder.Org.OrgId). 479 Where("org_id = ?", dividendsOrder.Org.OrgId).
480 - Where("dividends_order_number = ?", dividendsOrder.DividendsOrderNumber).Delete(); err != nil { 480 + Where("dividends_order_number = ?", dividendsOrder.DividendsOrderNumber).WherePK().Delete(); err != nil {
481 return nil, err 481 return nil, err
482 } 482 }
483 } 483 }