Esempio n. 1
0
 /*    */ public String createAuthcode(Long uid, String userToken) /*    */ {
   /* 26 */ String str = MaxString.getUUID() + "@@" + uid + "_" + DateUtil.getNowTime();
   /* 27 */ String authcodeStr = MaxMD5Util.toMD5(str);
   /* 28 */ Authcode authcode = new Authcode();
   /* 29 */ authcode.setAuthcodeStr(authcodeStr);
   /* 30 */ authcode.setUid(uid);
   /* 31 */ authcode.setUserToken(userToken);
   /* 32 */ this.authcodeMapper.createAuthcode(authcode);
   /* 33 */ return authcodeStr;
   /*    */ }
Esempio n. 2
0
 /*    */ public Boolean verrifyAuthcode(String phoneNumber, String authcodeStr) {
   /* 54 */ Boolean ret = Boolean.valueOf(false);
   /* 55 */ Authcode authcode = new Authcode();
   /* 56 */ authcode.setPhoneNumber(phoneNumber);
   /* 57 */ authcode.setAuthcodeStr(authcodeStr);
   /* 58 */ Authcode ac = this.authcodeMapper.getAuthcodeByPhoneNumber(authcode);
   /* 59 */ if (ac != null) {
     /* 60 */ ret = Boolean.valueOf(true);
     /*    */ }
   /* 62 */ return ret;
   /*    */ }
Esempio n. 3
0
 /*    */ public String createAuthcode(String phoneNumber) /*    */ {
   /* 39 */ String authcodeStr = AuthcodeGen.genPassword(6, 0);
   /* 40 */ Authcode authcode = new Authcode();
   /* 41 */ authcode.setPhoneNumber(phoneNumber);
   /* 42 */ authcode.setAuthcodeStr(authcodeStr);
   /* 43 */ this.authcodeMapper.createAuthcode(authcode);
   /*    */
   /* 45 */ SmsMT smsMT = new SmsMT();
   /* 46 */ smsMT.setContent(
       authcodeStr + "(微管家验证码,请勿泄露),需要你进行身份校验。如非本人操作,请致电0571-86999823【微管家一卡通】");
   /* 47 */ smsMT.setMobile(phoneNumber);
   /* 48 */ this.smsMapper.createSmsMT(smsMT);
   /* 49 */ this.smsMapper.createSmsMTBuffer(smsMT);
   /* 50 */ return authcodeStr;
   /*    */ }