手机号授权:编辑备注功能
This commit is contained in:
@@ -106,4 +106,14 @@ public class PhoneAuthApplyRecordAdiminService extends BaseService {
|
||||
jedisLockService.unlock(lockeKey,lockVal);
|
||||
}
|
||||
}
|
||||
|
||||
public void remark(Long id, String message, String adminName) {
|
||||
PhoneAuthApplyRecord record = phoneAuthApplyRecordService.getById(id);
|
||||
if (record == null) {
|
||||
throw new ServiceException("该记录不存在或已删除");
|
||||
}
|
||||
record.setRemark(message);
|
||||
record.setOperator(adminName);
|
||||
phoneAuthApplyRecordService.saveOrUpdate(record);
|
||||
}
|
||||
}
|
||||
|
@@ -2,8 +2,10 @@ package com.accompany.admin.controller.user;
|
||||
|
||||
import com.accompany.admin.controller.BaseController;
|
||||
import com.accompany.admin.service.user.PhoneAuthApplyRecordAdiminService;
|
||||
import com.accompany.admin.util.StringUtil;
|
||||
import com.accompany.business.dto.SkillCardAuidoVerifyDto;
|
||||
import com.accompany.business.vo.skillcard.SkillCardAuidoVerifyVo;
|
||||
import com.accompany.common.utils.StringUtils;
|
||||
import com.accompany.core.model.phone.PhoneAuthApplyRecord;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@@ -48,4 +50,20 @@ public class PhoneAuthApplyRecordAdminController extends BaseController {
|
||||
writeJson(false, "操作失败");
|
||||
}
|
||||
|
||||
@RequestMapping("/remark")
|
||||
public void remark(Long id, String message){
|
||||
if(id == null || id == 0 || StringUtils.isEmpty(message)) {
|
||||
writeJson(false, "参数不能为空");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
phoneAuthApplyRecordAdiminService.remark(id, message, getAdminName());
|
||||
writeJson(true,"操作成功");
|
||||
} catch (Exception e) {
|
||||
logger.error("Failed to change dynamic status, Cause by:", e);
|
||||
writeJson(false, e.getMessage());
|
||||
}
|
||||
writeJson(false, "操作失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -50,6 +50,32 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<div class="modal fade" id="messageModel" tabindex="-2" role="dialog" aria-labelledby="modalLabel2">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
|
||||
<h4 class="modal-title" id="channelModelModalLabel">编辑备注</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="messageForm" class="form-inline">
|
||||
<input type="hidden" id="id"/>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control validate[required]" name="remark" id="remark" placeholder="备注"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" id="create">新建</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var picker1 = $("#beginDate").datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
@@ -137,7 +163,7 @@
|
||||
formatter: function (val, row, index) {
|
||||
var pass = '<button class="btn btn-sm btn-primary opt-pass" data-id=' + val + ' data-status=1>通 过</button>';
|
||||
var noPass = '<button class="btn btn-sm btn-danger opt-not-pass" data-id=' + val + ' data-status=2>不通过</button>';
|
||||
var remark = '<button class="btn btn-sm btn-primary opt-remark" data-id=' + val + ' data-status=3>编辑备注</button>';
|
||||
var remark = '<button class="btn btn-sm btn-primary opt-remark" data-remark=' + row.remark + ' + data-id=' + val + ' data-status=3>编辑备注</button>';
|
||||
// var unshelve = '<button class="btn btn-sm btn-danger opt-not-pass" data-id=' + val + ' data-status=5>下 架</button>';
|
||||
if (row.status == 0){
|
||||
return pass + '</br>' + noPass + '</br>' + remark;
|
||||
@@ -242,6 +268,40 @@
|
||||
$('#exportBtn').on('click', function () {
|
||||
$("#searchForm").submit();
|
||||
});
|
||||
|
||||
//备注
|
||||
$('#table').on('click','.opt-remark',function () {
|
||||
var id = $(this).attr('data-id');
|
||||
var remark = $(this).attr('data-remark');
|
||||
$('#messageForm')[0].reset();
|
||||
$('#id').val(id);
|
||||
$('#remark').val(remark);
|
||||
$('#messageModel').modal('show');
|
||||
});
|
||||
|
||||
//审核不通过保存原因
|
||||
$('#create').on('click', function () {
|
||||
var pid = $('#pid').val();
|
||||
var message = $('#message').val();
|
||||
if($("#messageForm").validationEngine('validate')){
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '/admin/phone/auth/apply/remark.action',
|
||||
data: {id: id, remark: remark},
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
if (res.success) {
|
||||
$("#tipMsg").text("操作成功");
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
} else {
|
||||
$("#tipMsg").text("操作失败," + res.message);
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
//判断空值
|
||||
function isEmpty(data) {
|
||||
|
Reference in New Issue
Block a user