Browse Source

feature(招标信息):权限查看失败问题

Z\zhang 2 years ago
parent
commit
744e4269b4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      opms_parent/app/service/cust/cust_customer_bid_record.go

+ 2 - 2
opms_parent/app/service/cust/cust_customer_bid_record.go

@@ -56,8 +56,8 @@ func (s CustCustomerBidRecordService) Get(ctx context.Context, id int) (*model.C
 
 func (s CustCustomerBidRecordService) List(ctx context.Context, req *model.CustCustomerBidRecordListReq) (int, []*model.CustCustomerBidRecord, error) {
 	ctx = context.WithValue(ctx, "contextService", s)
-	dao := s.Dao.As("bid").DataScope(ctx, "customer", "sales_id").Unscoped().WhereNull("bid.deleted_time").
-		LeftJoin(s.CustomerDao.Table, "customer", "bid.cust_id=customer.id AND `customer`.`deleted_time` IS NULL ")
+	dao := s.CustomerDao.As("customer").DataScope(ctx, "sales_id").
+		LeftJoin(s.Dao.Table, "bid", "bid.cust_id=customer.id").WhereNot("bid.id", 0)
 	if req.SearchText != "" {
 		likestr := fmt.Sprintf("%%%s%%", req.SearchText)
 		dao = dao.Where("(bid.cuct_name LIKE ? || bid.product_name LIKE ? || bid.title LIKE ? || bid.bidder LIKE ?)", likestr, likestr, likestr, likestr)