<?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="com.panzhihua.service_dangjian.dao.ComActProjectMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.panzhihua.service_dangjian.entity.ComActProject">
|
<id column="id" property="id" />
|
<result column="unit_id" property="unitId" />
|
<result column="unit_name" property="unitName" />
|
<result column="speciality" property="speciality" />
|
<result column="project" property="project" />
|
<result column="phone" property="phone" />
|
<result column="image" property="image" />
|
<result column="create_time" property="createTime" />
|
</resultMap>
|
|
<select id="getList" resultMap="BaseResultMap">
|
select
|
id,
|
unit_id,
|
unit_name,
|
speciality,
|
project,
|
phone,
|
image,
|
create_time
|
from com_act_project
|
<where>
|
1=1
|
<if test="item.unitId !=null and item.unitId !='' ">
|
and unit_id=#{item.unitId}
|
</if>
|
<if test="item.speciality !=null and item.speciality !='' ">
|
and (speciality like concat ('%',#{item.speciality},'%') or #{item.speciality} like concat ('%',speciality,'%'))
|
</if>
|
<if test="item.project !=null and item.project !='' ">
|
and project like concat ('%',#{item.project},'%')
|
</if>
|
</where>
|
order by create_time desc
|
</select>
|
|
|
</mapper>
|