sms일괄저장 추가
This commit is contained in:
@@ -22,16 +22,12 @@ $routes->get('/home', 'Home\Home::dashboard');
|
|||||||
*/
|
*/
|
||||||
$routes->group('board', ['namespace' => 'App\Controllers\Board'], function ($routes) {
|
$routes->group('board', ['namespace' => 'App\Controllers\Board'], function ($routes) {
|
||||||
|
|
||||||
// /board/notice/lists
|
/**
|
||||||
|
* 공지사항
|
||||||
|
*/
|
||||||
$routes->get('notice/lists', 'Notice::notice');
|
$routes->get('notice/lists', 'Notice::notice');
|
||||||
|
|
||||||
// /board/notice/detail/(:num)
|
|
||||||
$routes->get('notice/detail/(:num)', 'Notice::detail/$1');
|
$routes->get('notice/detail/(:num)', 'Notice::detail/$1');
|
||||||
|
|
||||||
// /board/notice/write
|
|
||||||
$routes->get('notice/write', 'Notice::write');
|
$routes->get('notice/write', 'Notice::write');
|
||||||
|
|
||||||
// /board/notice/modify/(:num)
|
|
||||||
$routes->get('notice/modify/(:num)', 'Notice::modify/$1');
|
$routes->get('notice/modify/(:num)', 'Notice::modify/$1');
|
||||||
|
|
||||||
// API
|
// API
|
||||||
@@ -66,6 +62,7 @@ $routes->group('manage', ['namespace' => 'App\Controllers\Manage'], function ($r
|
|||||||
$routes->post('user/save', 'User::saveUser');
|
$routes->post('user/save', 'User::saveUser');
|
||||||
$routes->post('user/remove', 'User::removeUser');
|
$routes->post('user/remove', 'User::removeUser');
|
||||||
$routes->get('user/excel', 'User::excel');
|
$routes->get('user/excel', 'User::excel');
|
||||||
|
$routes->post('user/saveSms', 'User::saveSms');
|
||||||
|
|
||||||
/** API - 조직관리 */
|
/** API - 조직관리 */
|
||||||
$routes->get('dept/getDeptList', 'Dept::getDeptList');
|
$routes->get('dept/getDeptList', 'Dept::getDeptList');
|
||||||
|
|||||||
@@ -155,6 +155,30 @@ class User extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// SMS 인증여부 일괄저장
|
||||||
|
public function saveSms()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$useYn = $this->request->getPost('useYn') ?: 'Y';
|
||||||
|
|
||||||
|
// UPDATE users
|
||||||
|
$this->userModel->updateUserSmsYn($useYn);
|
||||||
|
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '0',
|
||||||
|
'msg' => 'success'
|
||||||
|
]);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'code' => '9',
|
||||||
|
'msg' => $e->getMessage(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 엑셀다운로드
|
// 엑셀다운로드
|
||||||
public function excel()
|
public function excel()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -349,6 +349,28 @@ class UserModel extends Model
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 유저 SMS 인증정보 일괄 수정
|
||||||
|
public function updateUserSmsYn($useYn)
|
||||||
|
{
|
||||||
|
$sql = "UPDATE users
|
||||||
|
SET sms_auth_yn = {$useYn}}
|
||||||
|
WHERE use_yn = 'Y' ";
|
||||||
|
|
||||||
|
$this->db->query($sql);
|
||||||
|
|
||||||
|
if ($this->db->transStatus() === false) {
|
||||||
|
return [
|
||||||
|
'success' => false,
|
||||||
|
'msg' => '저장실패',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 성공
|
||||||
|
return [
|
||||||
|
'success' => true,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// 엑셀 다운로드 조회
|
// 엑셀 다운로드 조회
|
||||||
public function getExcelUserList($data)
|
public function getExcelUserList($data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,11 @@
|
|||||||
.blockUI {
|
.blockUI {
|
||||||
z-index: 1500 !important;
|
z-index: 1500 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.swal2-cancel {
|
||||||
|
background-color: #ff0000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h1>조직 관리</h1>
|
<h1>조직 관리</h1>
|
||||||
|
|||||||
@@ -33,10 +33,8 @@
|
|||||||
<div class="col-md-7 col-xl-7">
|
<div class="col-md-7 col-xl-7">
|
||||||
<div class="main-card mb-3 card">
|
<div class="main-card mb-3 card">
|
||||||
<div class="card-header d-flex align-items-center">
|
<div class="card-header d-flex align-items-center">
|
||||||
<!-- 제목 -->
|
|
||||||
<h3 class="card-title mb-0">메뉴 목록</h3>
|
<h3 class="card-title mb-0">메뉴 목록</h3>
|
||||||
|
|
||||||
<!-- 오른쪽 툴 영역 -->
|
|
||||||
<div class="card-tools d-flex align-items-center ms-auto gap-2">
|
<div class="card-tools d-flex align-items-center ms-auto gap-2">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
<select class="form-control" id="usrlevel">
|
<select class="form-control" id="usrlevel">
|
||||||
|
|||||||
@@ -13,6 +13,11 @@
|
|||||||
.blockUI {
|
.blockUI {
|
||||||
z-index: 1500 !important;
|
z-index: 1500 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.swal2-cancel {
|
||||||
|
background-color: #ff0000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h1>전화확인 관리</h1>
|
<h1>전화확인 관리</h1>
|
||||||
|
|||||||
@@ -13,6 +13,11 @@
|
|||||||
.blockUI {
|
.blockUI {
|
||||||
z-index: 1500 !important;
|
z-index: 1500 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.swal2-cancel {
|
||||||
|
background-color: #ff0000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h1>특이단지 관리</h1>
|
<h1>특이단지 관리</h1>
|
||||||
|
|||||||
@@ -13,6 +13,11 @@
|
|||||||
.blockUI {
|
.blockUI {
|
||||||
z-index: 1500 !important;
|
z-index: 1500 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.swal2-cancel {
|
||||||
|
background-color: #ff0000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h1>사용자 관리</h1>
|
<h1>사용자 관리</h1>
|
||||||
@@ -23,7 +28,6 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form class="row align-items-end" id="frm_srch_info" onsubmit="return false;">
|
<form class="row align-items-end" id="frm_srch_info" onsubmit="return false;">
|
||||||
|
|
||||||
<!-- 등급 -->
|
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<label class="form-label mb-1">등급</label>
|
<label class="form-label mb-1">등급</label>
|
||||||
<select class="form-control" name="srchLevel">
|
<select class="form-control" name="srchLevel">
|
||||||
@@ -103,7 +107,27 @@
|
|||||||
|
|
||||||
<div class="col-md-12 col-xl-12">
|
<div class="col-md-12 col-xl-12">
|
||||||
<div class="main-card mb-3 card">
|
<div class="main-card mb-3 card">
|
||||||
<div class="card-header">사용자 관리</div>
|
<div class="card-header d-flex align-items-center">
|
||||||
|
<h3 class="card-title mb-0">사용자 목록</h3>
|
||||||
|
|
||||||
|
<!-- 오른쪽 영역 -->
|
||||||
|
<div class="ms-auto d-flex align-items-center gap-3">
|
||||||
|
|
||||||
|
<label class="mb-0 fw-semibold">
|
||||||
|
SMS인증여부 일괄변경
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group input-group-sm" style="width: 200px;">
|
||||||
|
<select class="form-select" id="srcUseYn">
|
||||||
|
<option value="Y">사용</option>
|
||||||
|
<option value="N">미사용</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" class="btn btn-primary" id="btnSmsSave">
|
||||||
|
저장
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table id="userList" class="table table-hover table-striped table-bordered">
|
<table id="userList" class="table table-hover table-striped table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -412,6 +436,71 @@
|
|||||||
myModal.show();
|
myModal.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// SMS 일괄저장
|
||||||
|
$("#btnSmsSave").on("click", function () {
|
||||||
|
|
||||||
|
swal.fire({
|
||||||
|
text: "저장 하시겠습니까?",
|
||||||
|
type: "warning",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: "예",
|
||||||
|
cancelButtonText: "아니오",
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: true,
|
||||||
|
confirmButtonColor: "#3085d6",
|
||||||
|
cancelButtonColor: "#d33",
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
$.ajax({
|
||||||
|
url: '/manage/user/saveSms',
|
||||||
|
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||||
|
method: 'POST',
|
||||||
|
data: { 'useYn': $("#srcUseYn").val() },
|
||||||
|
beforeSend: function () {
|
||||||
|
blockUI.blockPage({
|
||||||
|
message: tpl
|
||||||
|
})
|
||||||
|
},
|
||||||
|
complete: function () {
|
||||||
|
blockUI.unblockPage()
|
||||||
|
},
|
||||||
|
error: function (xhr, error, thrown) {
|
||||||
|
blockUI.unblockPage()
|
||||||
|
var msg = "";
|
||||||
|
if (xhr.responseText != null) {
|
||||||
|
msg = xhr.responseText
|
||||||
|
} else {
|
||||||
|
msg = "잠시후 다시 시도해 주세요."
|
||||||
|
}
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
title: msg,
|
||||||
|
icon: "error"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
success: function (result) {
|
||||||
|
|
||||||
|
if (result.code == '0') {
|
||||||
|
userModalHide()
|
||||||
|
$("#btnSearch").trigger('click')
|
||||||
|
Swal.fire({
|
||||||
|
title: '정상 처리되었습니다.',
|
||||||
|
icon: "success"
|
||||||
|
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: result.msg,
|
||||||
|
icon: "error"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// 유저정보저장
|
// 유저정보저장
|
||||||
$("#userSave").on("click", function () {
|
$("#userSave").on("click", function () {
|
||||||
@@ -502,10 +591,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user