From d25d4a3c3fb3acb86c221dae4aa4c60a5892ceaa Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Fri, 18 Oct 2024 08:58:00 +0800 Subject: [PATCH] 2 --- api/dao/User.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/dao/User.go b/api/dao/User.go index a02b0d5..ebdd44a 100644 --- a/api/dao/User.go +++ b/api/dao/User.go @@ -186,8 +186,11 @@ func (r *UserDao) GetUserPageSearch(req requests.GetUserPage, page, pageSize int if req.IsInfoComplete != nil { subQuery := global.Db.Model(&model.UserInfo{}). Where("user_info.user_id = user.user_id"). - Where("user_info.nation_id is not NULL"). - Where("user_info.disease_class_id is not NULL").Select("1") + Where("user_info.height != '' "). + Where("user_info.weight != '' "). + Where("user_info.is_family_history is not NULL"). + Where("user_info.province_id is not NULL"). + Select("1") query = query.Where("EXISTS (?)", subQuery) }