xuhy
2023-02-28 adb18caa714692ccabf111ae3ab3481bf04844d4
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TEvaluateMapper.xml
@@ -17,5 +17,28 @@
    <sql id="Base_Column_List">
        id, orderId, userId, score, evaluate, status, createTime
    </sql>
    <select id="selectPageList" resultType="com.stylefeng.guns.modular.system.controller.resp.TEvaluateResp">
        select e.id, e.orderId, e.userId, e.score, e.evaluate, e.status, e.createTime,
               a.nickname AS userName,a.phone AS userPhone,o.code,d.name AS driverName,d.phone AS driverPhone
        from t_evaluate e
        left join t_app_user a on e.userId = a.id
        left join t_order o on e.orderId = o.id
        left join t_driver d on o.driverId = d.id
        <where>
            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                AND e.createTime between #{startTime} and #{endTime}
            </if>
            <if test="userName != null and userName != ''">
                AND a.nickname LIKE concat('%',#{userName},'%')
            </if>
            <if test="driverName != null and driverName != ''">
                AND d.name LIKE concat('%',#{driverName},'%')
            </if>
            <if test="score != null">
                AND e.score = #{score}
            </if>
        </where>
        ORDER BY e.createTime DESC
    </select>
</mapper>