From f366fea2c6c83020c1e6423e2c66242678b8f877 Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期四, 11 四月 2024 14:26:41 +0800 Subject: [PATCH] 修改用户推广搜索 --- CoreCms.Net.Web.Admin/Controllers/User/CoreCmsUserController.cs | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/CoreCms.Net.Web.Admin/Controllers/User/CoreCmsUserController.cs b/CoreCms.Net.Web.Admin/Controllers/User/CoreCmsUserController.cs index d4b76cf..9689dab 100644 --- a/CoreCms.Net.Web.Admin/Controllers/User/CoreCmsUserController.cs +++ b/CoreCms.Net.Web.Admin/Controllers/User/CoreCmsUserController.cs @@ -174,6 +174,15 @@ { where = where.And(p => p.grade == grade); } + //鐢ㄦ埛绛夌骇 int + var isBaifenPromotion = Request.Form["isBaifenPromotion"].FirstOrDefault(); + if (!string.IsNullOrEmpty(isBaifenPromotion)) + { + if(isBaifenPromotion=="1") + where = where.And(p => p.IsBaifenPromotion == true); + else + where = where.And(p => p.IsBaifenPromotion == false); + } //鍒涘缓鏃堕棿 datetime var createTime = Request.Form["createTime"].FirstOrDefault(); if (!string.IsNullOrEmpty(createTime)) @@ -1554,5 +1563,34 @@ } #endregion + #region 璁剧疆鏄惁鎴愪负鎺ㄥ箍浜哄憳鐧惧垎鍏垫硶 + /// <summary> + /// 璁剧疆鏄惁鎴愪负鎺ㄥ箍浜哄憳 + /// </summary> + /// <param name="entity"></param> + /// <returns></returns> + [HttpPost] + [Description("璁剧疆鏄惁鎴愪负鎺ㄥ箍浜哄憳")] + public async Task<AdminUiCallBack> DoSetIsBaiFenBingfaP([FromBody] FMUpdateBoolDataByIntId entity) + { + var jm = new AdminUiCallBack(); + + var oldModel = await _coreCmsUserServices.QueryByIdAsync(entity.id); + if (oldModel == null) + { + jm.msg = "涓嶅瓨鍦ㄦ淇℃伅"; + return jm; + } + + oldModel.IsBaifenPromotion = entity.data; + + var bl = await _coreCmsUserServices.UpdateAsync(oldModel); + jm.code = bl ? 0 : 1; + jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure; + + return jm; + } + #endregion + } } \ No newline at end of file -- Gitblit v1.9.1