mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
#update
This commit is contained in:
@@ -12,16 +12,39 @@
|
||||
<result column="acc.name" property="name" />
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insert" parameterType="resetPasswordDto">
|
||||
insert into reset_password
|
||||
(
|
||||
id, account_id, note, date
|
||||
)
|
||||
(id, account_id, note, date)
|
||||
VALUES
|
||||
(
|
||||
UUID(), (SELECT id from account where employee_number = #{employeeNumber} ), #{note}, NOW()
|
||||
)
|
||||
(UUID(), (SELECT id from account where employee_number = #{employeeNumber} ), #{note}, NOW())
|
||||
</insert>
|
||||
|
||||
<select id="resetpasswordAll" resultMap="resetPasswordResultMap" parameterType="map">
|
||||
SELECT
|
||||
id, account_id, note, date, acc.id, acc.name, acc.mail, acc.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>
|
||||
</choose>
|
||||
</where>
|
||||
order by date desc limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<select id="count" resultMap="resetPasswordResultMap" parameterType="map">
|
||||
SELECT
|
||||
count(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>
|
||||
</choose>
|
||||
</where>
|
||||
order by date desc limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<select id="selectAll" resultMap="resetPasswordResultMap" parameterType="map">
|
||||
SELECT
|
||||
id, account_id, note, date, acc.id, acc.name
|
||||
|
||||
Reference in New Issue
Block a user