<?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.ruoyi.other.mapper.ShopPointMapper">
|
|
<sql id="ShopPointList">
|
SELECT
|
ts.`name` shopName,
|
ts.shop_manager shopLeaderName,
|
ts.phone,
|
tsp.type,
|
tsp.create_time,
|
tsp.variable_point
|
FROM
|
t_shop_point tsp
|
LEFT JOIN t_shop ts ON tsp.shop_id = ts.id
|
<where>
|
<if test="shopPoint.shopName != null and shopPoint.shopName != ''">
|
AND ts.`name` LIKE concat('%',#{shopPoint.shopName},'%')
|
</if>
|
<if test="shopPoint.shopLeaderName != null and shopPoint.shopLeaderName != ''">
|
AND ts.shop_manager LIKE concat('%',#{shopPoint.shopLeaderName},'%')
|
</if>
|
<if test="shopPoint.phone != null and shopPoint.phone != ''">
|
AND ts.phone LIKE concat('%',#{shopPoint.phone},'%')
|
</if>
|
<if test="shopPoint.type != null">
|
AND tsp.type = #{shopPoint.type}
|
</if>
|
<if test="shopPoint.startTime !=null and shopPoint.endTime !=null">
|
AND tsp.create_time BETWEEN #{shopPoint.startTime} AND #{shopPoint.endTime}
|
</if>
|
|
</where>
|
</sql>
|
|
<select id="selectShopPointList" resultType="com.ruoyi.other.api.domain.ShopPoint">
|
<include refid="ShopPointList"/>
|
</select>
|
<select id="queryShpointPage" resultType="com.ruoyi.other.api.domain.ShopPoint">
|
<include refid="ShopPointList"/>
|
</select>
|
</mapper>
|