Sfoglia il codice sorgente

调整欢迎词管理和token期限

zhengbingbing 7 anni fa
parent
commit
f8c395bb7f

+ 7 - 7
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/IVRWelcomeController.cs

@@ -165,7 +165,7 @@ namespace CallCenterApi.Interface.Controllers
165 165
             string filename, string loadpath, string path, int type=2, int isstate=0)
166 166
         {
167 167
             bool res = false;
168
-            int iss = returnisadd(id, itemid, sdate, edate);
168
+            int iss = returnisadd(id, item.Trim(), sdate, edate);
169 169
             if (iss <= 0)
170 170
             {
171 171
                 Model.T_Sys_IVRWords dModel = new Model.T_Sys_IVRWords();
@@ -246,7 +246,7 @@ namespace CallCenterApi.Interface.Controllers
246 246
         }
247 247
 
248 248
         //获取ivr欢迎词是否有添加权限
249
-        private int returnisadd(string id,string itemid, string sdate, string edate)
249
+        private int returnisadd(string id,string item, string sdate, string edate)
250 250
         {
251 251
 
252 252
             DateTime ssdate = Utils.StrToDateTime(sdate, DateTime.Now);
@@ -256,9 +256,9 @@ namespace CallCenterApi.Interface.Controllers
256 256
             {
257 257
                 sql += " and F_ID<>" + id;
258 258
             }
259
-            if (itemid != null && itemid != "")
259
+            if (item != null && item != "")
260 260
             {
261
-                sql += " and F_ItemID<>" + itemid;
261
+                sql += " and F_Item<>'" + item + "'";
262 262
             }
263 263
             sql += " and( "
264 264
                 + "('" + ssdate.ToString("yyyy-MM-dd HH:mm:ss") + "' between F_StartDate and F_EndDate) "
@@ -282,9 +282,9 @@ namespace CallCenterApi.Interface.Controllers
282 282
             if (_upFile != null)
283 283
             {
284 284
 
285
-                string datename = DateTime.Now.ToString("yyyyMMddHHMMss");
285
+                string datename = DateTime.Now.ToString("yyyyMMddHHMMssfff");
286 286
                 string filename = _upFile.FileName.Substring(_upFile.FileName.LastIndexOf('\\') + 1);
287
-                string fullFileName = datename + "_" + filename;
287
+                string fullFileName = datename + ".wav";// + "_" + filename;
288 288
                 string ffmpegLocation = Server.MapPath("~/");
289 289
 
290 290
                 #region 读取配置的上传路径-原文件和修改过格式的文件均上传至此
@@ -334,7 +334,7 @@ namespace CallCenterApi.Interface.Controllers
334 334
                         var obj = new
335 335
                         {
336 336
                             filename = fullFileName,
337
-                            loadpath = path + ".wav",
337
+                            loadpath = path,
338 338
                             wavpath = savedir + fullFileName + ".wav"
339 339
                         };
340 340
                         return Success("文件上传成功", obj);

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/FormsPrincipal.cs

@@ -67,7 +67,7 @@ namespace CallCenterApi.Interface.Models.Common
67 67
 
68 68
             // 2. 创建一个FormsAuthenticationTicket,它包含登录名以及额外的用户数据。
69 69
             FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
70
-                2, loginName, DateTime.Now, DateTime.Now.AddDays(1), true, data);
70
+                2, loginName, DateTime.Now, DateTime.Now.AddDays(7), true, data);
71 71
 
72 72
 
73 73
             // 3. 加密Ticket,变成一个加密的字符串。