<?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.dsh.account.mapper.RefereeMapper">
|
|
|
|
<select id="getRefereeList" resultType="map">
|
select
|
id,
|
name,
|
phone,
|
CONCAT(province, city) as province,
|
state
|
from t_referee where state != 3
|
<if test="null != item.name and '' != item.name">
|
and name like CONCAT('%', #{item.name}, '%')
|
</if>
|
<if test="null != item.phone and '' != item.phone">
|
and phone like CONCAT('%', #{item.phone}, '%')
|
</if>
|
<if test="null != item.provinceCode and '' != item.provinceCode">
|
and provinceCode = #{item.provinceCode}
|
</if>
|
<if test="null != item.cityCode and '' != item.cityCode">
|
and cityCode = #{item.cityCode}
|
</if>
|
order by createTime desc limit #{item.offset}, #{item.limit}
|
</select>
|
|
|
<select id="getRefereeListCount" resultType="int">
|
select
|
count(*)
|
from t_referee where state != 3
|
<if test="null != item.name and '' != item.name">
|
and name like CONCAT('%', #{item.name}, '%')
|
</if>
|
<if test="null != item.phone and '' != item.phone">
|
and phone like CONCAT('%', #{item.phone}, '%')
|
</if>
|
<if test="null != item.provinceCode and '' != item.provinceCode">
|
and provinceCode = #{item.provinceCode}
|
</if>
|
<if test="null != item.cityCode and '' != item.cityCode">
|
and cityCode = #{item.cityCode}
|
</if>
|
</select>
|
</mapper>
|