zhangqian
2023-08-10 f67698f7abf35689f24fdb17827249de79034a95
model/salesDetails.go
@@ -77,7 +77,7 @@
   case constvar.SalesDetailsKeywordTypePrincipal:
      db = db.Joins("left join user on user.id = sales_details.member_id").Where("user.username like ?", fmt.Sprintf("%%%s%%", slf.Keyword))
   case constvar.SalesDetailsKeywordTypeProductName:
      //db = db.Joins("left join sales_details_product sdp on sdp.sales_details_id = sales_details.id left join product").Where("user.username like ?", fmt.Sprintf("%%%s%%", slf.Keyword))
      db = db.Joins("left join sales_details_product sdp on sdp.sales_details_id = sales_details.id left join products on sdp.product_id = products.id").Where("products.name like ?", fmt.Sprintf("%%%s%%", slf.Keyword))
   }
   if slf.Preload {