|
@@ -35,11 +35,18 @@ namespace Task
|
|
|
public void DoQueue(string content)
|
|
public void DoQueue(string content)
|
|
|
{
|
|
{
|
|
|
JsonData jsonObj = JsonMapper.ToObject(content);
|
|
JsonData jsonObj = JsonMapper.ToObject(content);
|
|
|
|
|
+ //流水号
|
|
|
string requestId = jsonObj["requestId"].ToString();
|
|
string requestId = jsonObj["requestId"].ToString();
|
|
|
|
|
+ //模板文件路径
|
|
|
string modePath = jsonObj["modePath"].ToString();
|
|
string modePath = jsonObj["modePath"].ToString();
|
|
|
- string templateString = Function.ReadInstance("Template/" + modePath); //读取数据库sql模板
|
|
|
|
|
|
|
+ //附加数据,原样返回
|
|
|
|
|
+ string attach = jsonObj["attach"].ToString();
|
|
|
|
|
+ //读取模板文件内容
|
|
|
|
|
+ string templateString = Function.ReadInstance("Template/" + modePath);
|
|
|
|
|
+ //解析模板内容
|
|
|
string resultString = Util.Maker.StartMake(jsonObj["data"], templateString);
|
|
string resultString = Util.Maker.StartMake(jsonObj["data"], templateString);
|
|
|
- RabbitMQClient.Instance.Push("MakeSqlCallBackQueue", requestId + "#cut#" + resultString);
|
|
|
|
|
|
|
+ //MQ回调解析的结果
|
|
|
|
|
+ RabbitMQClient.Instance.Push("MakeSqlCallBackQueue", requestId + "#cut#" + attach + "#cut#" + resultString);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|