ResetPasswordController.java
ResetPasswordMapper.java
ResetPasswordService.java
ResetPasswordMapper.xml
resetpassword/list.jsp
This commit is contained in:
sungsu
2024-01-18 00:36:46 +09:00
parent 9e969783ef
commit cddc901805
5 changed files with 170 additions and 77 deletions

View File

@@ -20,29 +20,36 @@
(UUID(), (SELECT id from account where employee_number = #{employeeNumber} ), #{note}, NOW())
</insert>
<select id="resetpasswordAll" resultMap="resetPasswordResultMap" parameterType="map">
<select id="list" resultMap="resetPasswordResultMap" parameterType="map">
SELECT
id, account_id, note, date, acc.id, acc.name, acc.mail, acc.employee_number
rs.id as id,
rs.account_id as account_id,
rs.note as note,
rs.date as date,
acc.id,
acc.name as name,
acc.email as email,
acc.employee_number as employee_number
from reset_password rs join account acc on rs.account_id = acc.id
<where>
<choose>
<when test="searchn == 1"> acc.activation = 1 and acc.name like concat('%',#{search},'%')</when>
<when test="searchn == 0"> acc.activation = 1 and acc.employee_number like concat('%',#{search},'%') </when>
<when test="searchn == 0"> acc.activation = 1 and acc.name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> acc.activation = 1 and acc.employee_number like concat('%',#{search},'%') </when>
</choose>
</where>
order by date desc limit #{start}, #{perPage}
</select>
<select id="count" resultMap="resetPasswordResultMap" parameterType="map">
SELECT
count(id)
<select id="count" resultType="int" parameterType="map">
SELECT count(rs.id)
from reset_password rs join account acc on rs.account_id = acc.id
<where>
<choose>
<when test="searchn == 1"> acc.activation = 1 and acc.name like concat('%',#{search},'%')</when>
<when test="searchn == 0"> acc.activation = 1 and acc.employee_number like concat('%',#{search},'%') </when>
<when test="searchn == 0"> acc.activation = 1 and acc.name like concat('%',#{search},'%')</when>
<when test="searchn == 1"> acc.activation = 1 and acc.employee_number like concat('%',#{search},'%') </when>
</choose>
</where>
order by date desc limit #{start}, #{perPage}
</select>
<select id="selectAll" resultMap="resetPasswordResultMap" parameterType="map">