2
3
Quellcode durchsuchen

注册信息列表

lining vor 6 Jahren
Ursprung
Commit
f3db4363f8

+ 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