手机号授权:编辑功能及校验手机日志追加
This commit is contained in:
@@ -51,13 +51,13 @@ public class PhoneAuthApplyRecordAdminController extends BaseController {
|
||||
}
|
||||
|
||||
@RequestMapping("/remark")
|
||||
public void remark(Long id, String message){
|
||||
if(id == null || id == 0 || StringUtils.isEmpty(message)) {
|
||||
public void remark(Long id, String remark){
|
||||
if(id == null || id == 0 || StringUtils.isEmpty(remark)) {
|
||||
writeJson(false, "参数不能为空");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
phoneAuthApplyRecordAdiminService.remark(id, message, getAdminName());
|
||||
phoneAuthApplyRecordAdiminService.remark(id, remark, getAdminName());
|
||||
writeJson(true,"操作成功");
|
||||
} catch (Exception e) {
|
||||
logger.error("Failed to change dynamic status, Cause by:", e);
|
||||
|
@@ -26,6 +26,8 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<label class="col-sm-1 control-label">申请时间</label>
|
||||
<div class="col-sm-2"><input type="text" class="form-control" name="beginDate"
|
||||
id="beginDate"></div><span class="col-sm-1">至</span>
|
||||
@@ -272,17 +274,20 @@
|
||||
//备注
|
||||
$('#table').on('click','.opt-remark',function () {
|
||||
var id = $(this).attr('data-id');
|
||||
var remark = $(this).attr('data-remark');
|
||||
let remark = $(this).attr('data-remark');
|
||||
$('#messageForm')[0].reset();
|
||||
$('#id').val(id);
|
||||
$('#remark').val(remark);
|
||||
if (remark && !remark.match(/undefined/)) {
|
||||
$('#remark').val(remark);
|
||||
}
|
||||
|
||||
$('#messageModel').modal('show');
|
||||
});
|
||||
|
||||
//审核不通过保存原因
|
||||
$('#create').on('click', function () {
|
||||
var pid = $('#pid').val();
|
||||
var message = $('#message').val();
|
||||
var id = $('#id').val();
|
||||
var remark = $('#remark').val();
|
||||
if($("#messageForm").validationEngine('validate')){
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
|
@@ -274,7 +274,9 @@ public class CommonUtil {
|
||||
try {
|
||||
log.info("checkPhoneFormat, phone {}", phone);
|
||||
Phonenumber.PhoneNumber swissNumberProto = phoneUtil.parse(phone, null);
|
||||
return phoneUtil.isValidNumber(swissNumberProto);
|
||||
boolean validNumber = phoneUtil.isValidNumber(swissNumberProto);
|
||||
log.info("checkPhoneFormat, phone {}, swissNumberProto:{}, result:{}", phone,swissNumberProto,validNumber);
|
||||
return validNumber;
|
||||
} catch (NumberParseException e) {
|
||||
log.error("checkPhoneFormat error", e);
|
||||
return false;
|
||||
|
@@ -82,6 +82,7 @@ public class SmsController extends BaseController {
|
||||
@RequestParam("code") String code,HttpServletRequest request) {
|
||||
Long uid = getUid(request);
|
||||
mobile = decryptSensitiveInfo(request, mobile);
|
||||
log.info("sms/verify mobile {} phoneAreaCode {}",mobile,phoneAreaCode);
|
||||
if(uid != null){
|
||||
Users users = usersBaseService.getUsersByUid(uid);
|
||||
mobile = users == null ? mobile : users.getPhone();
|
||||
|
@@ -192,7 +192,7 @@ public class AccountH5LoginService {
|
||||
if (null != account) {
|
||||
throw new ServiceException(BusiStatus.PHONE_REGISTERED);
|
||||
}
|
||||
if (CommonUtil.checkPhoneFormat(phoneAreaCode,mobile)){
|
||||
if (!CommonUtil.checkPhoneFormat(phoneAreaCode,mobile)){
|
||||
throw new ServiceException(BusiStatus.PHONEINVALID);
|
||||
}
|
||||
|
||||
|
@@ -209,7 +209,7 @@ public class AccountController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
if (CommonUtil.checkPhoneFormat(phoneAreaCode,phone)){
|
||||
if (!CommonUtil.checkPhoneFormat(phoneAreaCode,phone)){
|
||||
throw new ServiceException(BusiStatus.PHONEINVALID);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user