<?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="org.springblade.modules.grid.mapper.GridmanMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="gridmanResultMap" type="org.springblade.modules.grid.entity.GridmanEntity">
|
<result column="id" property="id"/>
|
<result column="grid_id" property="gridId"/>
|
<result column="user_id" property="userId"/>
|
<result column="gridman_name" property="gridmanName"/>
|
<result column="mobile" property="mobile"/>
|
<result column="remark" property="remark"/>
|
<result column="create_time" property="createTime"/>
|
<result column="create_user" property="createUser"/>
|
<result column="update_time" property="updateTime"/>
|
<result column="update_user" property="updateUser"/>
|
<result column="is_deleted" property="isDeleted"/>
|
</resultMap>
|
|
<!--自定义分页查询-->
|
<select id="selectGridmanPage" resultType="org.springblade.modules.grid.vo.GridmanVO">
|
select
|
jgm.*,jg.community_code communityCode
|
from jczz_gridman jgm
|
left join jczz_grid jg on jg.id = jgm.grid_id and jg.is_deleted = 0
|
where jgm.is_deleted = 0
|
<if test="gridman.gridmanName!=null and gridman.gridmanName!=''">
|
and jgm.gridman_name like concat('%',#{gridman.gridmanName},'%')
|
</if>
|
<if test="gridman.mobile!=null and gridman.mobile!=''">
|
and jgm.mobile like concat('%',#{gridman.mobile},'%')
|
</if>
|
<if test="gridman.gridId!=null">
|
and jg.id = #{gridman.gridId}
|
</if>
|
</select>
|
|
<!--自定义分页查询-->
|
<select id="getGridmanList" resultType="org.springblade.modules.grid.vo.GridmanVO">
|
select
|
jgm.*
|
from jczz_gridman jgm
|
where jgm.is_deleted = 0
|
<if test="gridman.gridmanName!=null and gridman.gridmanName!=''">
|
and jgm.gridman_name like concat('%',#{gridman.gridmanName},'%')
|
</if>
|
<if test="gridman.mobile!=null and gridman.mobile!=''">
|
and jgm.mobile like concat('%',#{gridman.mobile},'%')
|
</if>
|
</select>
|
|
|
</mapper>
|