作者 陈志颖

fix:分红退货单产品查询

... ... @@ -341,7 +341,7 @@ func (repository *DividendsReturnedOrderRepository) Remove(dividendsReturnedOrde
var orderGoodModels []*models.OrderGood
if _, err := tx.Model(&orderGoodModels).
Where("company_id = ?", dividendsReturnedOrder.Company.CompanyId).
Where("org_id' = ?", dividendsReturnedOrder.Org.OrgId).
Where("org_id = ?", dividendsReturnedOrder.Org.OrgId).
Where("dividends_returned_order_number = ?", dividendsReturnedOrder.DividendsReturnedOrderNumber).Delete(); err != nil {
return nil, err
}
... ... @@ -365,7 +365,7 @@ func (repository *DividendsReturnedOrderRepository) BatchRemove(dividendsReturne
var orderGoodModels []*models.OrderGood
if _, err := tx.Model(&orderGoodModels).
Where("company_id = ?", dividendsReturnedOrder.Company.CompanyId).
Where("org_id' = ?", dividendsReturnedOrder.Org.OrgId).
Where("org_id = ?", dividendsReturnedOrder.Org.OrgId).
Where("dividends_returned_order_number = ?", dividendsReturnedOrder.DividendsReturnedOrderNumber).Delete(); err != nil {
return nil, err
}
... ... @@ -395,7 +395,7 @@ func (repository *DividendsReturnedOrderRepository) FindOne(queryOptions map[str
orderGoodModelQuery := tx.Model(&orderGoodModels)
if err := orderGoodModelQuery.
Where("company_id = ?", dividendsReturnedOrderModel.Company.CompanyId).
Where("org_id' = ?", dividendsReturnedOrderModel.Org.OrgId).
Where("org_id = ?", dividendsReturnedOrderModel.Org.OrgId).
Where("dividends_returned_order_number = ?", dividendsReturnedOrderModel.DividendsReturnedOrderNumber).Select(); err != nil {
return nil, err
}
... ... @@ -446,7 +446,7 @@ func (repository *DividendsReturnedOrderRepository) Find(queryOptions map[string
orderGoodModelQuery := tx.Model(&orderGoodModels)
if err := orderGoodModelQuery.
Where("company_id = ?", dividendsReturnedOrderModel.Company.CompanyId).
Where("org_id' = ?", dividendsReturnedOrderModel.Org.OrgId).
Where("org_id = ?", dividendsReturnedOrderModel.Org.OrgId).
Where("dividends_returned_order_number = ?", dividendsReturnedOrderModel.DividendsReturnedOrderNumber).
Select(); err != nil {
return 0, nil, err
... ...