puzhibing
2024-03-04 7e7f901b2172281dc294dfbc67e6ad00625f09f4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?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.course.mapper.EvaluationMapper">
 
    <select id="listAll" resultType="com.dsh.guns.modular.system.model.TEvaluationListVo">
        select t1.id,t1.appUserId,t1.score,t1.insertTime time,
        t2.name shopName,t2.province pName,t2.city cName
        from t_store_evaluation t1 left join t_store t2 on t1.storeId =t2.id
        where t1.state !=3
        <if test="provinceCode!=null and provinceCode !=''">
            and t2.provinceCode =#{provinceCode}
        </if>
        <if test="cityCode!=null and cityCode !=''">
            and t2.cityCode =#{cityCode}
        </if>
        <if test="shopName!=null and shopName !=''">
            and t2.name like concat("%",#{shopName},"%")
        </if>
        <if test="name!=null and name !=''">
            and t2.name like concat("%",#{name},"%")
        </if>
        <if test="operatorId != null and operatorId.size()>0">
            AND t1.storeId IN
            <foreach collection="operatorId" separator="," item="id" open="(" close=")">
                #{id}
            </foreach>
        </if>
    </select>
    <select id="info" resultType="com.dsh.guns.modular.system.model.TEvaluationListVo">
        select t1.id,t1.appUserId,t1.score,t1.insertTime time,t1.imgs,t1.content,t2.name shopName,t2.province pName,t2.city cName from t_store_evaluation t1 left join t_store t2 on t1.storeId =t2.id
        where t1.id =#{id}
    </select>
</mapper>