2
3
lining преди 6 години
родител
ревизия
f3db4363f8
променени са 1 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. 9 3
      src/dashoo.cn/backend/api/controllers/register/oilcorporateinfo.go

+ 9 - 3
src/dashoo.cn/backend/api/controllers/register/oilcorporateinfo.go

@@ -3,6 +3,7 @@ package register
 import (
 	msg2 "dashoo.cn/backend/api/business/msg"
 	"dashoo.cn/backend/api/business/oilrtx"
+	"dashoo.cn/business2/permission"
 	"encoding/json"
 	"fmt"
 	"math/rand"
@@ -39,11 +40,16 @@ func (this *OilCorporateInfoController) GetCompanyList() {
 	SupplierName := this.GetString("Name")
 
 	where := " 1=1 "
-	if SupplierName != "" {
-		where = where + " and SupplierName like '%" + SupplierName + "%' "
+	svcPerm := permission.GetPermissionService(utils.DBE)
+	isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.checkallRegister")
+	if !isauth {
+		if SupplierName != "" {
+			where = where + " and SupplierName like '%" + SupplierName + "%' "
+		}
+
+		where = where + " and CheckUserId like '%" + this.User.Id + "%' "
 	}
 
-	where = where + " and CheckUserId like '%" + this.User.Id + "%' "
 
 	svc := register.GetOilCorporateInfoService(utils.DBE)
 	var list []register.OilCorporateInfo