diff --git a/B3WeChat/Rpcs/WeChatUserRpc.cs b/B3WeChat/Rpcs/WeChatUserRpc.cs index 8a939ea..ae1ce79 100644 --- a/B3WeChat/Rpcs/WeChatUserRpc.cs +++ b/B3WeChat/Rpcs/WeChatUserRpc.cs @@ -4,6 +4,7 @@ using BWP.B3WeChat.BO.NamedValueTemplate; using Forks.EnterpriseServices.DomainObjects2; using Forks.EnterpriseServices.DomainObjects2.DQuery; using Forks.EnterpriseServices.JsonRpc; +using Forks.EnterpriseServices.SqlDoms; using System; using System.Collections.Generic; using System.Linq; @@ -62,6 +63,17 @@ namespace BWP.B3WeChat.Rpcs } + [Rpc] + public static string GetTemplate(string name) + { + var query = new DQueryDom(new JoinAlias(typeof(ContentTemplate))); + query.Columns.Add(DQSelectColumn.Field("Text")); + query.Where.Conditions.Add(DQCondition.EQ("Name", name)); + query.Range = SelectRange.Top(1); + return query.EExecuteScalar(); + + } + } }