From 115bd9b51f5d8eade4658f844de37516486c60e7 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期六, 18 十一月 2023 17:25:25 +0800
Subject: [PATCH] crm获取aps项目模块信息

---
 model/client.go |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/model/client.go b/model/client.go
index cafe6cb..dea1044 100644
--- a/model/client.go
+++ b/model/client.go
@@ -117,16 +117,16 @@
 					db = db.Joins("Member").Where("Member.username LIKE ?", "%"+v+"%")
 				}
 
-			case int, uint, int64, float64:
+			case int, uint, int64, float64, bool:
 				if key == "id" || key == "client_type_id" || key == "client_status_id" || key == "member_id" {
 					db = db.Where(key+" = ?", v)
 				}
 
-				if key == "not_admin" {
-					if v == float64(constvar.NotAdminYes) {
-						db = db.Where("clients.member_id != ?", constvar.UserTypeSuper)
-					} else {
-						db = db.Where("clients.member_id = ?", constvar.UserTypeSuper)
+				if key == "is_public" {
+					if val, ok := v.(bool); ok {
+						if val {
+							db = db.Where("clients.member_id = ?", 0)
+						}
 					}
 				}
 			case []int:

--
Gitblit v1.8.0