|
|
|
@ -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)) |
|
|
|
|