[api] 회원 목록 & 수정 & 상세 추가 / 각 vo dto contorller schema 추가
This commit is contained in:
@@ -26,10 +26,10 @@
|
||||
UPDATE ALISTLMS.test_user ATU
|
||||
INNER JOIN ALISTLMS.test_user_token ATUT ON ATUT.user_idx = ATU.user_idx
|
||||
SET ATU.update_at = now()
|
||||
<if test="email != null">
|
||||
<if test="email != null and email != ''">
|
||||
, ATU.email = #{email}
|
||||
</if>
|
||||
<if test="hp != null">
|
||||
<if test="hp != null and hp != ''">
|
||||
, ATU.hp = #{hp}
|
||||
</if>
|
||||
WHERE ATUT.user_token_idx = #{userTokenIdx}
|
||||
|
||||
@@ -27,6 +27,15 @@
|
||||
WHERE user_token_idx = #{userTokenIdx}
|
||||
AND user_type IN ('A')
|
||||
</update>
|
||||
<update id="updateAdminApiKeyLoginRefreshToken">
|
||||
/*AdminLoginMapper.updateAdminApiKeyLoginRefreshToken*/
|
||||
UPDATE ALISTLMS.test_user_token
|
||||
SET refresh_token = #{refreshToken}
|
||||
, expires_at = #{expiresAt}
|
||||
, updated_at = now()
|
||||
WHERE user_token_idx = #{userTokenIdx}
|
||||
AND user_type IN ('A')
|
||||
</update>
|
||||
<select id="selectAdminLoginById" resultType="com.alist.api.modules.admin.auth.vo.AdminLoginVo">
|
||||
/*AdminLoginMapper.selectAdminLoginById*/
|
||||
SELECT ATU.user_idx
|
||||
@@ -57,4 +66,18 @@
|
||||
AND ATU.del_yn = 1
|
||||
LIMIT 1
|
||||
</select>
|
||||
<select id="selectAdminApiKeyLogin" resultType="com.alist.api.modules.admin.auth.vo.AdminApiKeyLoginVo">
|
||||
/*AdminLoginMapper.selectAdminApiKeyLogin*/
|
||||
SELECT ATU.user_idx
|
||||
, ATU.id
|
||||
, ATUT.user_token_idx
|
||||
, ATUT.user_role
|
||||
, ATUT.user_type
|
||||
FROM ALISTLMS.test_user_token ATUT
|
||||
INNER JOIN ALISTLMS.test_user ATU ON ATU.user_idx = ATUT.user_idx
|
||||
WHERE ATUT.user_api_key = #{userApiKey}
|
||||
AND ATUT.user_type IN ('A')
|
||||
AND ATU.del_yn = 1
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.alist.api.modules.admin.member.mapper.AdminMemberMapper">
|
||||
<sql id="adminMemberWhere">
|
||||
FROM ALISTLMS.test_user ATU
|
||||
INNER JOIN ALISTLMS.test_user_token ATUT ON ATUT.user_idx = ATU.user_idx
|
||||
WHERE ATU.del_yn = 1
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (
|
||||
ATU.id LIKE CONCAT('%', #{keyword}, '%')
|
||||
OR ATU.email LIKE CONCAT('%', #{keyword}, '%')
|
||||
OR ATU.hp LIKE CONCAT('%', #{keyword}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="userRole != null and userRole != ''">
|
||||
AND ATUT.user_role = #{userRole}
|
||||
</if>
|
||||
<if test="userType != null and userType != ''">
|
||||
AND ATUT.user_type = #{userType}
|
||||
</if>
|
||||
<if test="dormantYn != null and dormantYn != ''">
|
||||
AND ATU.dormant_yn = #{dormantYn}
|
||||
</if>
|
||||
<if test="withdrawStatus != null and withdrawStatus != ''">
|
||||
AND ATU.withdraw_status = #{withdrawStatus}
|
||||
</if>
|
||||
</sql>
|
||||
<update id="updateAdminMember">
|
||||
/*AdminMemberMapper.updateAdminMember*/
|
||||
UPDATE ALISTLMS.test_user ATU
|
||||
INNER JOIN ALISTLMS.test_user_token ATUT ON ATUT.user_idx = ATU.user_idx
|
||||
SET ATU.update_at = now()
|
||||
, ATUT.updated_at = now()
|
||||
<if test="email != null and email != ''">
|
||||
, ATU.email = #{email}
|
||||
</if>
|
||||
<if test="hp != null and hp != ''">
|
||||
, ATU.hp = #{hp}
|
||||
</if>
|
||||
<if test="userRole != null and userRole != ''">
|
||||
, ATUT.user_role = #{userRole}
|
||||
</if>
|
||||
<if test="userType != null and userType != ''">
|
||||
, ATUT.user_type = #{userType}
|
||||
</if>
|
||||
WHERE ATU.user_idx = #{userIdx}
|
||||
AND ATU.del_yn = 1
|
||||
</update>
|
||||
|
||||
<select id="selectAdminMemberCount" resultType="int">
|
||||
/*AdminMemberMapper.selectAdminMemberCount*/
|
||||
SELECT COUNT(*)
|
||||
<include refid="adminMemberWhere"/>
|
||||
</select>
|
||||
|
||||
<select id="selectAdminMemberList" resultType="com.alist.api.modules.admin.member.vo.AdminMemberVo">
|
||||
/*AdminMemberMapper.selectAdminMemberList*/
|
||||
SELECT ATU.user_idx
|
||||
, ATUT.user_token_idx
|
||||
, ATU.id
|
||||
, ATU.email
|
||||
, ATU.hp
|
||||
, ATUT.user_role
|
||||
, ATUT.user_type
|
||||
, ATU.dormant_yn
|
||||
, ATU.dormant_at
|
||||
, ATU.withdraw_status
|
||||
, ATU.withdraw_at
|
||||
, ATU.create_at
|
||||
, ATU.update_at
|
||||
<include refid="adminMemberWhere"/>
|
||||
ORDER BY ATU.user_idx DESC
|
||||
LIMIT #{limit}
|
||||
OFFSET #{offset}
|
||||
</select>
|
||||
<select id="selectAdminMemberDetail" resultType="com.alist.api.modules.admin.member.vo.AdminMemberDetailVo">
|
||||
/*AdminMemberMapper.selectAdminMemberDetail*/
|
||||
SELECT ATU.user_idx
|
||||
, ATUT.user_token_idx
|
||||
, ATU.id
|
||||
, ATU.email
|
||||
, ATU.hp
|
||||
, ATUT.user_role
|
||||
, ATUT.user_type
|
||||
, ATU.dormant_yn
|
||||
, ATU.dormant_at
|
||||
, ATU.withdraw_status
|
||||
, ATU.withdraw_at
|
||||
, ATU.create_at
|
||||
, ATU.update_at
|
||||
FROM ALISTLMS.test_user ATU
|
||||
INNER JOIN ALISTLMS.test_user_token ATUT ON ATUT.user_idx = ATU.user_idx
|
||||
WHERE ATU.del_yn = 1
|
||||
AND ATU.user_idx = #{userIdx}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user