zhoufan лет назад: 4
Родитель
Сommit
3475424342

+ 1 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/CallCenterApi.Interface.csproj

299
     <Compile Include="Models\Input\QuesttionInput.cs" />
299
     <Compile Include="Models\Input\QuesttionInput.cs" />
300
     <Compile Include="Models\Input\QuesttionItemInput.cs" />
300
     <Compile Include="Models\Input\QuesttionItemInput.cs" />
301
     <Compile Include="Models\Input\RoleInput.cs" />
301
     <Compile Include="Models\Input\RoleInput.cs" />
302
+    <Compile Include="Models\Input\SmsInput.cs" />
302
     <Compile Include="Models\Input\SysConfigInput.cs" />
303
     <Compile Include="Models\Input\SysConfigInput.cs" />
303
     <Compile Include="Models\Input\UserAccountInput.cs" />
304
     <Compile Include="Models\Input\UserAccountInput.cs" />
304
     <Compile Include="Models\Input\VoiceCategoryInput.cs" />
305
     <Compile Include="Models\Input\VoiceCategoryInput.cs" />

+ 3 - 3
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/HomeController.cs

445
         /// 发送短信
445
         /// 发送短信
446
         /// </summary>
446
         /// </summary>
447
         /// <returns></returns>
447
         /// <returns></returns>
448
-        public ActionResult Send()
448
+        public ActionResult Send(string phones, string templateCode, string templateParam)
449
         {
449
         {
450
-            string result=SmsHelper.Send("15515701425", "614915038222241792");
451
-
450
+            //string result=SmsHelper.Send("15838094023", "614915038222241792");
451
+            string result = SmsHelper.Send(phones, templateCode, templateParam);
452
             return Success(result);
452
             return Success(result);
453
         }
453
         }
454
     }
454
     }

+ 12 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Sms/SmsNewController.cs

1
 using CallCenterApi.Interface.Controllers.Base;
1
 using CallCenterApi.Interface.Controllers.Base;
2
+using CallCenterApi.Interface.Models.Input;
2
 using System;
3
 using System;
3
 using System.Collections.Generic;
4
 using System.Collections.Generic;
4
 using System.Linq;
5
 using System.Linq;
14
         {
15
         {
15
             return Content("Index");
16
             return Content("Index");
16
         }
17
         }
18
+
19
+        /// <summary>
20
+        /// 接收短信
21
+        /// </summary>
22
+        /// <param name="data"></param>
23
+        /// <returns></returns>
24
+        public ActionResult Receive(SmsInput data)
25
+        {
26
+            //存入数据库
27
+            return Content("");
28
+        }
17
     }
29
     }
18
 }
30
 }

+ 21 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/SmsInput.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Web;
5
+
6
+namespace CallCenterApi.Interface.Models.Input
7
+{
8
+    public class SmsInput
9
+    {
10
+        public string apiKey { get; set; }
11
+        public List<SmsDetailInput> data { get; set; }
12
+    }
13
+
14
+    public class SmsDetailInput
15
+    {
16
+        public string srcId { get; set; }
17
+        public string tel { get; set; }
18
+        public string content { get; set; }
19
+        public string arriveTime { get; set; }
20
+    }
21
+}

+ 3 - 3
CallCenterCommon/CallCenter.Utility/Sms/SmsHelper.cs

16
         /// <summary>
16
         /// <summary>
17
         /// 发送短信
17
         /// 发送短信
18
         /// </summary>
18
         /// </summary>
19
-        /// <param name="phones"></param>
20
-        /// <param name="templateCode"></param>
21
-        /// <param name="templateParam"></param>
19
+        /// <param name="phones">手机号、多个手机号英文逗号隔开</param>
20
+        /// <param name="templateCode">模板编号</param>
21
+        /// <param name="templateParam">[\"工单号\"]、[\"工单号\",\"工单号\",\"工单号\",...]</param>
22
         /// <returns></returns>
22
         /// <returns></returns>
23
         public static string Send(string phones,string templateCode,string templateParam="")
23
         public static string Send(string phones,string templateCode,string templateParam="")
24
         {
24
         {