|
@@ -1,5 +1,96 @@
|
|
|
<?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.yh.saas.plugin.yiliangyiyun.mapper.EvaluateInfoMapper">
|
|
|
+ <!-- 获得评价总数 -->
|
|
|
+ <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(id)
|
|
|
+ FROM evaluate_info
|
|
|
+ WHERE
|
|
|
+ delete_flag = '0'
|
|
|
+ <if test="flag == 1">
|
|
|
+ <if test="driverId != null and driverId != ''">
|
|
|
+ AND driver_id = #{driverId}
|
|
|
+ </if>
|
|
|
+ <if test="ownerId != null and ownerId != ''">
|
|
|
+ AND owner_id = #{ownerId}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="flag == 2">
|
|
|
+ <if test="driverId != null and driverId != ''">
|
|
|
+ AND driver_id = #{driverId}
|
|
|
+ AND owner_id != null
|
|
|
+ </if>
|
|
|
+ <if test="ownerId != null and ownerId != ''">
|
|
|
+ AND owner_id = #{ownerId}
|
|
|
+ AND driver_id != null
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
|
|
+ </if>
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
+ AND (lower(order_number) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 评价列表查询 -->
|
|
|
+ <select id="getListByCondition" parameterType="Map"
|
|
|
+ resultType="com.yh.saas.plugin.yiliangyiyun.entity.EvaluateInfo">
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ driver_id as driverId,
|
|
|
+ owner_id as ownerId,
|
|
|
+ driver_name as driverName,
|
|
|
+ owner_name as ownerName,
|
|
|
+ order_id as orderId,
|
|
|
+ order_number as orderNumber,
|
|
|
+ owner_credit as ownerCredit,
|
|
|
+ freight_payment as freightPayment,
|
|
|
+ comprehensive_satisfaction as comprehensiveSatisfaction,
|
|
|
+ driver_content as driverContent,
|
|
|
+ driver_url as driverUrl,
|
|
|
+ driver_anonymous as driverAnonymous,
|
|
|
+ driver_portrait as driverPortrait,
|
|
|
+ driver_credit as driverCredit,
|
|
|
+ tran_efficiency as tranEfficiency,
|
|
|
+ tran_safety as tranSafety,
|
|
|
+ service_quality as serviceQuality,
|
|
|
+ satisfaction,
|
|
|
+ owner_content as ownerContent,
|
|
|
+ owner_url as ownerUrl,
|
|
|
+ owner_anonymous as ownerAnonymous,
|
|
|
+ owner_portrait as ownerPortrait
|
|
|
+ FROM evaluate_info
|
|
|
+ WHERE
|
|
|
+ delete_flag = '0'
|
|
|
+ <if test="flag == 1">
|
|
|
+ <if test="driverId != null and driverId != ''">
|
|
|
+ AND driver_id = #{driverId}
|
|
|
+ </if>
|
|
|
+ <if test="ownerId != null and ownerId != ''">
|
|
|
+ AND owner_id = #{ownerId}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="flag == 2">
|
|
|
+ <if test="driverId != null and driverId != ''">
|
|
|
+ AND driver_id = #{driverId}
|
|
|
+ AND owner_id != null
|
|
|
+ </if>
|
|
|
+ <if test="ownerId != null and ownerId != ''">
|
|
|
+ AND owner_id = #{ownerId}
|
|
|
+ AND driver_id != null
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
+
|
|
|
+ </if>
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
+ AND (lower(order_number) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
+ </if>
|
|
|
+ ORDER BY create_date DESC
|
|
|
+ <if test="currentPage != null and currentPage != ''">
|
|
|
+ LIMIT ${startRecord}, ${pageSize}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|