<?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.backblast.mapper.BackblastPubPersonMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="backblastPubPersonResultMap" type="org.springblade.modules.backblast.vo.BackblastPubPersonVO">
|
</resultMap>
|
|
<!--自定义分页列表查询-->
|
<select id="selectBackblastPubPersonPage" resultMap="backblastPubPersonResultMap">
|
select
|
jbpp.*
|
from jczz_backblast_pub_person jbpp
|
where jbpp.is_deleted = 0
|
<if test="backblastPubPerson.address != null and backblastPubPerson.address != ''">
|
and jbpp.address like concat('%',#{backblastPubPerson.address},'%')
|
</if>
|
<if test="backblastPubPerson.name != null and backblastPubPerson.name != ''">
|
and jbpp.name like concat('%',#{backblastPubPerson.name},'%')
|
</if>
|
<if test="backblastPubPerson.telephone != null and backblastPubPerson.telephone != ''">
|
and jbpp.telephone like concat('%',#{backblastPubPerson.telephone},'%')
|
</if>
|
<if test="backblastPubPerson.idCard != null and backblastPubPerson.idCard != ''">
|
and jbpp.id_card like concat('%',#{backblastPubPerson.idCard},'%')
|
</if>
|
<if test="backblastPubPerson.startTime != null and backblastPubPerson.startTime != ''">
|
and date_format(jbpp.create_time,'%Y-%m-%d') >= #{backblastPubPerson.startTime}
|
</if>
|
<if test="backblastPubPerson.endTime != null and backblastPubPerson.endTime != ''">
|
and date_format(jbpp.create_time,'%Y-%m-%d') <= #{backblastPubPerson.endTime}
|
</if>
|
<if test="backblastPubPerson.searchKey!=null and backblastPubPerson.searchKey!=''">
|
and CONCAT(
|
ifnull(jbpp.id_card,''),
|
ifnull(jbpp.address,''),
|
ifnull(jbpp.name,''),
|
ifnull(jbpp.telephone,'')
|
) like CONCAT ('%', #{backblastPubPerson.searchKey},'%')
|
</if>
|
order by jbpp.id desc,jbpp.create_time desc
|
</select>
|
|
<!--反炸宣传对象表 自定义详情-->
|
<select id="getDetail" resultType="org.springblade.modules.backblast.vo.BackblastPubPersonVO">
|
select
|
jbpp.*
|
from jczz_backblast_pub_person jbpp
|
where jbpp.is_deleted = 0
|
<if test="backblastPubPerson.id != null">
|
and jbpp.id = #{backblastPubPerson.id}
|
</if>
|
order by jbpp.id desc,jbpp.create_time desc
|
</select>
|
|
|
</mapper>
|