mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
Merge branch 'master' of https://github.com/suhf/No1WMS
# Conflicts: # src/main/java/com/no1/wms/vendor/VendorDto.java # src/main/resources/mappers/VendorMapper.xml # src/main/webapp/WEB-INF/views/vendor/create.jsp # src/main/webapp/WEB-INF/views/vendor/list.jsp # src/main/webapp/WEB-INF/views/vendor/read.jsp # src/main/webapp/WEB-INF/views/vendor/update.jsp
This commit is contained in:
@@ -63,8 +63,14 @@
|
||||
acc.birth, acc.telephone, acc.address, acc.activation,
|
||||
auth2.name group_auth_name, auth.name personal_auth_name
|
||||
from account acc join authority auth join authority auth2 on acc.personal_authority_id = auth.id and acc.group_authority_id = auth2.id
|
||||
where acc.name like concat('%',#{search},'%')
|
||||
order by acc.activation desc, acc.id desc limit #{start}, #{perPage}
|
||||
<where>
|
||||
<choose>
|
||||
<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 acc.id desc limit #{start}, #{perPage}
|
||||
|
||||
</select>
|
||||
<insert id="insert" parameterType="accountDto">
|
||||
insert into account
|
||||
@@ -134,4 +140,15 @@
|
||||
<update id="delete" parameterType="accountDto">
|
||||
update account SET activation = false WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="count" parameterType="map" resultType="java.lang.Integer">
|
||||
select count(*) from ( SELECT 1 from account
|
||||
<where>
|
||||
<choose>
|
||||
<when test="searchn == 1"> activation = 1 and name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 0"> activation = 1 and employee_number like concat('%',#{search},'%') </when>
|
||||
</choose>
|
||||
</where>
|
||||
order by id desc limit #{start}, #{perPage} ) t
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user