Browse Source

增加查询微信登录用户名的Rpc方法

master
yashen 8 years ago
parent
commit
646b9d1c6c
1 changed files with 22 additions and 3 deletions
  1. +22
    -3
      B3WeChat/Rpcs/WeChatUserRpc.cs

+ 22
- 3
B3WeChat/Rpcs/WeChatUserRpc.cs View File

@ -99,9 +99,8 @@ namespace BWP.B3WeChat.Rpcs
return InOutMessageUtil.GetJsApiSignature(noncestr, timestamp, url);
}
[Rpc]
public static void ScanLoginConfirm(long requestID)
public static string QueryScanLoginInfo(long requestID)
{
var request = WebBLUtil.GetSingleDmo<ScanLoginRequest>(new Tuple<string, object>("ID", requestID));
if (request == null)
@ -109,7 +108,8 @@ namespace BWP.B3WeChat.Rpcs
throw new Exception("不存在的扫码登录号");
}
if(request.Confirmed){
if (request.Confirmed)
{
throw new Exception("已经确认过了");
}
@ -124,6 +124,25 @@ namespace BWP.B3WeChat.Rpcs
throw new Exception("未能发现关联的用户");
}
return username;
}
[Rpc]
public static void ScanLoginConfirm(long requestID)
{
var request = WebBLUtil.GetSingleDmo<ScanLoginRequest>(new Tuple<string, object>("ID", requestID));
if (request == null)
{
throw new Exception("不存在的扫码登录号");
}
if(request.Confirmed){
throw new Exception("已经确认过了");
}
var username = QueryScanLoginInfo(requestID);
request.Confirmed = true;
request.CustomerUsername = username;


Loading…
Cancel
Save