예제 #1
0
 public ReturnDTO login(UserToken token, string account, string password)
 {
     if (account == null || password == null)
     {
         return(new ReturnDTO(RETURN_CODE.INPUT_IS_ILLEGAL));
     }
     if (accountCache.isOnline(account))
     {
         return(new ReturnDTO(RETURN_CODE.ACCOUNT_HAS_ONLINE));
     }
     if (!accountCache.isMatch(account, password))
     {
         return(new ReturnDTO(RETURN_CODE.ACCOUNT_IS_NOT_MATCH));
     }
     accountCache.online(token, account);
     roleBiz.Online(token);
     return(new ReturnDTO(RETURN_CODE.SUCCESS));
 }