瀏覽代碼

修改客户信息获取

MicroWin10-1604\Administrator 7 年之前
父節點
當前提交
9ed575f132

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.DAL/T_Cus_CustomerBase.cs

@@ -573,7 +573,7 @@ namespace CallCenterApi.DAL
573 573
 
574 574
             StringBuilder strSql = new StringBuilder();
575 575
             strSql.Append("select top 1 * from T_Cus_CustomerBase ");
576
-            strSql.Append(" where F_Mobile=@F_Mobile");
576
+            strSql.Append(" where F_Telephone=@F_Mobile");
577 577
             SqlParameter[] parameters = {
578 578
                     new SqlParameter("@F_Mobile", SqlDbType.NVarChar,200)
579 579
             };

+ 4 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerController.cs

@@ -149,18 +149,18 @@ namespace CallCenterApi.Interface.Controllers.customer
149 149
             ActionResult res = NoToken("未知错误,请重新登录");
150 150
             if (Request.IsAuthenticated)
151 151
             {
152
-
153
-                string tel = RequestString.GetQueryString("tel");
152
+                string tel = HttpUtility.UrlDecode(RequestString.GetQueryString("tel"));
154 153
                 if (!string.IsNullOrEmpty(tel))
155 154
                 {
156
-                    Model.T_Cus_CustomerBase userModel = new BLL.T_Cus_CustomerBase().GetModel(tel);
155
+                    Model.T_Cus_CustomerBase userModel = new BLL.T_Cus_CustomerBase().GetModelList(" F_Telephone like '%" + tel + "%' or F_Mobile like '%" + tel + "%' ").Last();
157 156
                     if (userModel != null)
158 157
                     {
159 158
                         res = Success("获取成功", userModel);
160 159
                     }
161 160
                     else
162 161
                     {
163
-                        res = Error("获取失败");
162
+
163
+                        res = Success("获取成功");
164 164
                     }
165 165
                 }
166 166
                 else