Browse Source

获取oppenid方法修改

master
[zhengchao] 9 years ago
parent
commit
65381e8c48
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      B3WeChat/Rpcs/ClientRpc.cs

+ 4
- 4
B3WeChat/Rpcs/ClientRpc.cs View File

@ -49,10 +49,10 @@ namespace BWP.B3WeChat.Rpcs
static string GetOpenId(string username)
{
string customer = GetDeviceNumber();
var query = new DQueryDom(new JoinAlias(typeof(QRCode)));
query.Columns.Add(DQSelectColumn.Field("OppenId"));
query.Where.Conditions.Add(DQCondition.EQ("Customer", customer));
query.Where.Conditions.Add(DQCondition.EQ("UserId", username));
var query = new DQueryDom(new JoinAlias(typeof(CustomerUser)));
query.Columns.Add(DQSelectColumn.Field("OpenID"));
query.Where.Conditions.Add(DQCondition.EQ("CustomerCode", customer));
query.Where.Conditions.Add(DQCondition.EQ("CustomerUsername", username));
query.Range = SelectRange.Top(1);
var OppenId = query.EExecuteScalar<string>();
if (string.IsNullOrEmpty(OppenId))


Loading…
Cancel
Save