Przeglądaj źródła

调整欢迎词管理和token期限

zhengbingbing 7 lat temu
rodzic
commit
f8c395bb7f

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

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

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

67
 
67
 
68
             // 2. 创建一个FormsAuthenticationTicket,它包含登录名以及额外的用户数据。
68
             // 2. 创建一个FormsAuthenticationTicket,它包含登录名以及额外的用户数据。
69
             FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
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
             // 3. 加密Ticket,变成一个加密的字符串。
73
             // 3. 加密Ticket,变成一个加密的字符串。