관리자 목록 수정

This commit is contained in:
주수현
2025-06-16 08:51:22 +09:00
parent a2f78ea366
commit 1322c8bb01
6 changed files with 7 additions and 17 deletions

View File

@@ -23,7 +23,7 @@
th:field="*{roleIds}" th:field="*{roleIds}"
onchange="onRoleChange(this);"> onchange="onRoleChange(this);">
<option value="">선택</option> <option value="">선택</option>
<option th:each="role : ${roles}" th:text="${role.id}" <option th:each="role : ${roles}" th:text="${role.description}"
th:value="${role.id}"></option> th:value="${role.id}"></option>
</select> </select>
</div> </div>

View File

@@ -79,13 +79,10 @@
</th> </th>
<th scope="col"><a class="order-able" data-sort-field="id" href="#">ID</a></th> <th scope="col"><a class="order-able" data-sort-field="id" href="#">ID</a></th>
<th class="text-secondary" scope="col">권한</th> <th class="text-secondary" scope="col">권한</th>
<th scope="col"><a class="order-able" data-sort-field="email" href="#">Email</a>
</th> </th>
<th scope="col"><a class="order-able" data-sort-field="accountDisabled" <th scope="col"><a class="order-able" data-sort-field="accountDisabled"
href="#">활성화</a> href="#">활성화</a>
</th> </th>
<th scope="col"><a class="order-able" data-sort-field="accountLocked"
href="#">계정잠김</a></th>
<th scope="col"><a class="order-able" data-sort-field="createdAt" href="#">등록일</a> <th scope="col"><a class="order-able" data-sort-field="createdAt" href="#">등록일</a>
</th> </th>
<th scope="col"><a class="order-able" data-sort-field="updatedAt" href="#">수정일</a> <th scope="col"><a class="order-able" data-sort-field="updatedAt" href="#">수정일</a>
@@ -104,11 +101,9 @@
</td> </td>
<td> <td>
<span th:each="role, status : ${item.roles}" <span th:each="role, status : ${item.roles}"
th:text="${role.getId()} + ${!status.last ? ', ': ''}"></span> th:text="${role.getDescription()} + ${!status.last ? ', ': ''}"></span>
</td> </td>
<td th:text="${item.email}">이메일</td>
<td th:text="${item.accountDisabled == null || !item.accountDisabled ? 'Y' : 'N' }"></td> <td th:text="${item.accountDisabled == null || !item.accountDisabled ? 'Y' : 'N' }"></td>
<td th:text="${item.accountLocked == null || !item.accountLocked ? 'N' : 'Y' }"></td>
<td th:text="${#temporals.format(item.createdAt, 'yyyy-MM-dd hh:mm')}">등록일</td> <td th:text="${#temporals.format(item.createdAt, 'yyyy-MM-dd hh:mm')}">등록일</td>
<td th:text="${#temporals.format(item.updatedAt, 'yyyy-MM-dd hh:mm')}">수정일</td> <td th:text="${#temporals.format(item.updatedAt, 'yyyy-MM-dd hh:mm')}">수정일</td>
</tr> </tr>

View File

@@ -25,7 +25,7 @@
th:field="*{roleIds}" th:field="*{roleIds}"
onchange="onRoleChange(this);"> onchange="onRoleChange(this);">
<option value="">선택</option> <option value="">선택</option>
<option th:each="role : ${roles}" th:text="${role.id}" <option th:each="role : ${roles}" th:text="${role.description}"
th:value="${role.id}"></option> th:value="${role.id}"></option>
</select> </select>
</div> </div>
@@ -117,7 +117,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div th:replace="common/components :: auditArea"></div> <!-- <div th:replace="common/components :: auditArea"></div>-->
<div class="component-btns bottom-btn-group"> <div class="component-btns bottom-btn-group">
<div class="btns-row align-right"> <div class="btns-row align-right">

View File

@@ -58,6 +58,7 @@ public class SaveAdminService implements SaveAdminPortIn {
passwordUpdatedAt, passwordUpdatedAt,
regionMainCode, regionMainCode,
accountDisabled, accountDisabled,
loginFailCnt,
roleIds roleIds
)); ));
} }

View File

@@ -18,7 +18,7 @@ public class SaveAdminCmd extends AuditCommand {
/* private String email;*/ /* private String email;*/
private String regionMainCode; private String regionMainCode;
private Boolean accountDisabled; private Boolean accountDisabled;
/* private Integer loginFailCnt; private Integer loginFailCnt;
private Boolean accountLocked;*/ /* private Boolean accountLocked;*/
private List<String> roleIds; private List<String> roleIds;
} }

View File

@@ -12,22 +12,18 @@
INSERT INTO admin (seq, INSERT INTO admin (seq,
id, id,
password, password,
email,
region_main_code, region_main_code,
password_updated_at, password_updated_at,
account_disabled, account_disabled,
login_fail_cnt, login_fail_cnt,
account_locked,
<include refid="common.fields.CreateUpdateBaseColumns"/>) <include refid="common.fields.CreateUpdateBaseColumns"/>)
VALUES (#{seq}, VALUES (#{seq},
#{id}, #{id},
#{encodedPassword}, #{encodedPassword},
#{email},
#{regionMainCode}, #{regionMainCode},
#{passwordUpdatedAt}, #{passwordUpdatedAt},
#{accountDisabled}, #{accountDisabled},
#{loginFailCnt}, #{loginFailCnt},
#{accountLocked},
<include refid="common.fields.CreateUpdateBaseValues"/>) <include refid="common.fields.CreateUpdateBaseValues"/>)
</insert> </insert>
@@ -36,12 +32,10 @@
UPDATE admin UPDATE admin
SET SET
password = #{encodedPassword}, password = #{encodedPassword},
email = #{email},
region_main_code = #{regionMainCode}, region_main_code = #{regionMainCode},
password_updated_at = #{passwordUpdatedAt}, password_updated_at = #{passwordUpdatedAt},
account_disabled = #{accountDisabled}, account_disabled = #{accountDisabled},
login_fail_cnt = #{loginFailCnt}, login_fail_cnt = #{loginFailCnt},
account_locked = #{accountLocked},
<include refid="common.fields.UpdateBaseSet"/> <include refid="common.fields.UpdateBaseSet"/>
WHERE seq = #{seq} WHERE seq = #{seq}
</update> </update>