Browse Source

增加得到模版的rpc方法

master
yashen 9 years ago
parent
commit
01d9ddf555
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      B3WeChat/Rpcs/WeChatUserRpc.cs

+ 12
- 0
B3WeChat/Rpcs/WeChatUserRpc.cs View File

@ -4,6 +4,7 @@ using BWP.B3WeChat.BO.NamedValueTemplate;
using Forks.EnterpriseServices.DomainObjects2; using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery; using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.JsonRpc; using Forks.EnterpriseServices.JsonRpc;
using Forks.EnterpriseServices.SqlDoms;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; 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<string>();
}
} }
} }

Loading…
Cancel
Save