去除分页插件

This commit is contained in:
季圣华
2020-04-19 15:26:14 +08:00
parent 60234752f2
commit a4895d955a
15 changed files with 84 additions and 215 deletions

View File

@@ -5,60 +5,44 @@
<result column="principalName" jdbcType="VARCHAR" property="principalName" />
</resultMap>
<select id="selectByConditionDepot" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="com.jsh.erp.datasource.mappers.DepotMapper.BaseResultMap">
select *
FROM jsh_depot
<select id="selectByConditionDepot" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="ResultMapEx">
select dep.*,usr.username as principalName
FROM jsh_depot dep
left join jsh_user usr on usr.id=dep.principal and ifnull(usr.status,'0') not in('1','2')
where 1=1
<if test="name != null">
and name like '%${name}%'
and dep.name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
and dep.type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
and dep.remark like '%${remark}%'
</if>
and ifnull(delete_Flag,'0') !='1'
order by sort asc
and ifnull(dep.delete_Flag,'0') !='1'
order by dep.sort asc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepot" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_depot
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
<select id="getDepotList" parameterType="java.util.Map" resultMap="ResultMapEx">
select dep.*,usr.username as principalName
COUNT(dep.id)
FROM jsh_depot dep
left join jsh_user usr on usr.id=dep.principal and ifnull(usr.status,'0') not in('1','2')
where 1=1
<if test="name != null and name != ''">
<bind name="name" value="'%' + _parameter.name + '%'" />
and dep.name like #{name}
WHERE 1=1
<if test="name != null">
and dep.name like '%${name}%'
</if>
<if test="type != null and type != ''">
and dep.type=#{type}
<if test="type != null">
and dep.type=${type}
</if>
<if test="remark != null and remark != ''">
<bind name="remark" value="'%' + _parameter.remark + '%'" />
and dep.remark like #{remark}
<if test="remark != null">
and dep.remark like '%${remark}%'
</if>
and ifnull(dep.delete_Flag,'0') !='1'
order by dep.sort asc
</select>
<update id="batchDeleteDepotByIds">
update jsh_depot
set delete_Flag='1'