|
@ -1892,52 +1892,6 @@ public class SysService {
|
1892
|
1892
|
}
|
1893
|
1893
|
return key;
|
1894
|
1894
|
}
|
1895
|
|
// /**
|
1896
|
|
// * 发送手机验证码
|
1897
|
|
// *
|
1898
|
|
// * @param con
|
1899
|
|
// * @param mobilePhone
|
1900
|
|
// * 验证的手机号
|
1901
|
|
// * @return
|
1902
|
|
// * @throws JfwBaseException
|
1903
|
|
// * @throws SQLException
|
1904
|
|
// */
|
1905
|
|
// @Get
|
1906
|
|
// @Path("/regmobilephone_onlyphone")
|
1907
|
|
// public String regMobilePhone(@JdbcConn(false) Connection con, String mobilePhone, @DefaultValue("true") boolean checkExists)
|
1908
|
|
// throws JfwBaseException, SQLException {
|
1909
|
|
// if (checkExists) {
|
1910
|
|
// User user = this.userDao.queryByEmailOrMobilePhone(con, mobilePhone);
|
1911
|
|
// if (null != user) {
|
1912
|
|
// return null;
|
1913
|
|
// }
|
1914
|
|
// }
|
1915
|
|
// StateCode<String, String> sc = new StateCode<String, String>();
|
1916
|
|
// final String key = JfwAppContext.cacheObjectAndGenKey(sc);
|
1917
|
|
// try {
|
1918
|
|
// Random rd = new Random();
|
1919
|
|
// int vi = rd.nextInt(10000);
|
1920
|
|
// String vc = String.format("%04d", vi);
|
1921
|
|
// sc.setKey(mobilePhone);
|
1922
|
|
// sc.setValue(vc);
|
1923
|
|
// this.mobilePhoneServcie.sendMessage(mobilePhone, this.regMobilePhoneContentTemplate, this.regMobilePhoneReplaceKey, vc);
|
1924
|
|
// long ct = System.currentTimeMillis();
|
1925
|
|
// long et = ct + this.timeLimitWithRegMobilePhone + 5000;
|
1926
|
|
// sc.setBuildTime(ct);
|
1927
|
|
// sc.setExpiredTime(et);
|
1928
|
|
// JfwAppContext.getScheduledExecutorService().schedule(new Runnable() {
|
1929
|
|
// @Override
|
1930
|
|
// public void run() {
|
1931
|
|
// JfwAppContext.removeCachedObject(key);
|
1932
|
|
// }
|
1933
|
|
// }, this.timeLimitWithRegMobilePhone + 10000, TimeUnit.MILLISECONDS);
|
1934
|
|
// } catch (Exception e) {
|
1935
|
|
// JfwAppContext.removeCachedObject(key);
|
1936
|
|
// throw new JfwBaseException(10012, "send mobile phone message to " + mobilePhone + " error", e);
|
1937
|
|
// }
|
1938
|
|
// return key;
|
1939
|
|
// }
|
1940
|
|
|
1941
|
1895
|
|
1942
|
1896
|
@Get
|
1943
|
1897
|
@Path("/phoneValidCode")
|