소스 검색

注册信息列表

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