Browse Source

防止同一个openID绑定两个用户

heyiwen 1 month ago
parent
commit
aa7499e5b3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      EMIS.CommonLogic/SystemServices/WechatMPServices.cs

+ 2 - 0
EMIS.CommonLogic/SystemServices/WechatMPServices.cs

@@ -64,6 +64,8 @@ namespace EMIS.CommonLogic.SystemServices
             {
                 return;
             }
+            //防止同一个openID绑定两个用户
+            UnitOfWork.Remove<CF_WechatSubscribe>(x => x.OpenID == openID);
             var subscribe = WechatMPDAL.WechatSubscripbeRepository.GetSingle(x => x.UserID == user.UserID);
             if (subscribe == null)
             {