|
|
@@ -1,8 +1,10 @@
|
|
|
using System.Collections;
|
|
|
using System.Text.RegularExpressions;
|
|
|
using Common;
|
|
|
+using Infrastructure;
|
|
|
using LitJson;
|
|
|
using Microsoft.CodeAnalysis.CSharp.Scripting;
|
|
|
+using Services;
|
|
|
|
|
|
namespace Tasks
|
|
|
{
|
|
|
@@ -42,7 +44,11 @@ namespace Tasks
|
|
|
//附加数据,原样返回
|
|
|
string attach = jsonObj["attach"].ToString();
|
|
|
//读取模板文件内容
|
|
|
- string templateString = Function.ReadInstance("Template/" + modePath);
|
|
|
+ // string templateString = Function.ReadInstance("Template/" + modePath);
|
|
|
+ var templateService = App.GetRequiredService<IMakeTemplateService>();
|
|
|
+ var template = templateService.GetFirst(m => m.templateName == modePath);
|
|
|
+ if(template == null) return;
|
|
|
+ string templateString = template.templateContent;
|
|
|
//解析模板内容
|
|
|
string resultString = Util.Maker.StartMake(jsonObj["data"], templateString);
|
|
|
//MQ回调解析的结果
|