Skip to content

Commit

Permalink
修改转发通知接口
Browse files Browse the repository at this point in the history
  • Loading branch information
renyh committed Nov 8, 2020
1 parent 8726d38 commit 2f9dfbc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,4 @@ ChordInstaller/*_app/
/WebZ/DongshifangMessageInterface.dll.config
/dp2weixinP2P/DongshifangMessageInterface.dll.config
/dp2Mini/代码签名证书-2019.p12
/dp2weixinP2P/LmxxReceiveNoticeInterface.dll.config
2 changes: 2 additions & 0 deletions DigitalPlatform.Interfaces/NoticeInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ public class NoticeInterface
/// -1 出错
/// </returns>
public virtual int SendNotice(string noticeXml,
out string info,
out string strError)
{
info = "";
strError = "";
return 0;
}
Expand Down
12 changes: 9 additions & 3 deletions dp2weixin.service/dp2WeiXinService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1105,14 +1105,17 @@ public int InternalDoMessage(MessageRecord record,
LibModel libCfg= this._areaMgr.GetLibCfg(lib.id, libraryCode);
if (libCfg !=null && string.IsNullOrEmpty(libCfg.noticedll) == false)
{
nRet = this.TransNotice(strBody, libCfg.noticedll, out strError);
string tempInfo = "";

nRet = this.TransNotice(strBody, libCfg.noticedll, out tempInfo,
out strError);
if (nRet == -1)
{
WriteErrorLog("向"+libCfg.noticedll+ "转发'"+strType+"'通知出错:" + strError);
WriteErrorLog("向"+libCfg.noticedll+ "转发'"+strType+"'通知出错:" + strError+"["+tempInfo+"]");
}
else
{
WriteDebug("向" + libCfg.noticedll + "转发'" + strType + "'通知成功。");
WriteDebug("向" + libCfg.noticedll + "转发'" + strType + "'通知成功。["+tempInfo+"]");
//WriteDebug(strBody);
}
}
Expand Down Expand Up @@ -3039,9 +3042,11 @@ private int SendArrived(XmlDocument bodyDom,
/// <returns></returns>
public int TransNotice(string noticeXml,
string assemblyName,
out string info,
out string strError)
{
strError = "";
info = "";
int nRet = 0;
//string assemblyName = "LmxxReceiveNoticeInterface";
if (string.IsNullOrEmpty(assemblyName) == true)
Expand All @@ -3064,6 +3069,7 @@ public int TransNotice(string noticeXml,

// 外部接口发送通知
nRet = external_interface.SendNotice(noticeXml,
out info,
out strError);
if (nRet == -1)
{
Expand Down
8 changes: 4 additions & 4 deletions dp2weixinP2P/dp2weixinWeb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@
<Content Include="Content\themes\base\tabs.css" />
<Content Include="Content\themes\base\theme.css" />
<Content Include="Content\themes\base\tooltip.css" />
<Content Include="DongshifangMessageInterface.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="fonts\glyphicons-halflings-regular.svg" />
<Content Include="Global.asax" />
<Content Include="img\1.jpg" />
Expand Down Expand Up @@ -240,7 +237,10 @@
<Content Include="img\search2.jfif" />
<Content Include="img\wait2.gif" />
<Content Include="fonts\mui-icons-extra.ttf" />
<Content Include="DongshifangMessageInterface.dll.config">
<Content Include="LmxxReceiveNoticeInterface.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="LmxxReceiveNoticeInterface.dll.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="Scripts\jquery-3.4.1.intellisense.js" />
Expand Down

0 comments on commit 2f9dfbc

Please sign in to comment.