|
|
@@ -70,15 +70,15 @@ namespace HySoftSMS
|
|
70
|
70
|
public bool SetSMSTaskItemSendResult(int taskid, int itemid, bool result, string errinfo,string content, string balance)
|
|
71
|
71
|
{
|
|
72
|
72
|
bool bl = false;
|
|
73
|
|
- var item = new 阿里短信任务执行表().GetModelList(" ID=" + itemid + " and 任务ID=" + taskid).FirstOrDefault();
|
|
|
73
|
+ var item = new 阿里短信任务执行表().GetModelList(" 任务条目ID=" + itemid + " and 任务ID=" + taskid).FirstOrDefault();
|
|
74
|
74
|
var tablename = DbHelperSQL.GetSingle("SELECT [任务条目子表名称] FROM [阿里短信任务表] WHERE [ID]=" + taskid);
|
|
75
|
|
- string sql1 = "DELETE FROM [阿里短信任务执行表] WHERE [任务ID]=" + taskid + " AND [ID]=" + itemid;
|
|
|
75
|
+ string sql1 = "DELETE FROM [阿里短信任务执行表] WHERE [任务ID]=" + taskid + " AND [任务条目ID]=" + itemid;
|
|
76
|
76
|
string sql2 = "UPDATE " + tablename + " SET [已执行次数]=[已执行次数]+1,状态=" + (result ? 3 : 2)
|
|
77
|
77
|
+ ",最后执行方式=2,最后执行时间=GETDATE(),最后执行是否成功=" + (result ? 1 : -1) + ",最后执行失败原因='" + errinfo
|
|
78
|
78
|
+ "' WHERE 任务ID=" + taskid + " AND [ID]=" + itemid;
|
|
79
|
79
|
string sql3 = "UPDATE 阿里短信任务表 SET [执行完成数量]=[执行完成数量]+1,[未执行数量]=[未执行数量]-1,[短信已执行完成数量]=[短信已执行完成数量]+1 WHERE ID=" + taskid;
|
|
80
|
80
|
string sql4 = "INSERT INTO [任务执行历史表] ([任务ID],[任务条目表名],[任务条目ID],[号码],[结果],[执行方式],[执行时间],[执行内容]) VALUES ('"
|
|
81
|
|
- + taskid + "','" + tablename + "','" + item.任务条目ID + "','" + item.号码 + "','" + (result ? 3 : 2) + "',2,GETDATE(),N'" + content + "')";
|
|
|
81
|
+ + taskid + "','" + tablename + "','" + itemid + "','" + item.号码 + "','" + (result ? 3 : 2) + "',2,GETDATE(),N'" + content + "')";
|
|
82
|
82
|
|
|
83
|
83
|
|
|
84
|
84
|
List<string> sqls = new List<string> { sql1, sql2, sql3, sql4 };
|