<?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.webmanage.mapper.OrderEvaluationMapper">
|
|
<!-- 基础结果映射 -->
|
<resultMap id="BaseResultMap" type="com.webmanage.entity.OrderEvaluation">
|
<id column="id" property="id" jdbcType="BIGINT"/>
|
<result column="order_id" property="orderId" jdbcType="VARCHAR"/>
|
<result column="evaluator_id" property="evaluatorId" jdbcType="BIGINT"/>
|
<result column="evaluator_name" property="evaluatorName" jdbcType="VARCHAR"/>
|
<result column="evaluator_type" property="evaluatorType" jdbcType="VARCHAR"/>
|
<result column="content" property="content" jdbcType="LONGVARCHAR"/>
|
<result column="rating" property="rating" jdbcType="INTEGER"/>
|
<result column="service_rating" property="serviceRating" jdbcType="INTEGER"/>
|
<result column="quality_rating" property="qualityRating" jdbcType="INTEGER"/>
|
<result column="delivery_rating" property="deliveryRating" jdbcType="INTEGER"/>
|
<result column="is_anonymous" property="isAnonymous" jdbcType="BOOLEAN"/>
|
<result column="reply_content" property="replyContent" jdbcType="LONGVARCHAR"/>
|
<result column="reply_user_id" property="replyUserId" jdbcType="BIGINT"/>
|
<result column="reply_time" property="replyTime" jdbcType="TIMESTAMP"/>
|
<result column="created_at" property="createdAt" jdbcType="TIMESTAMP"/>
|
<result column="updated_at" property="updatedAt" jdbcType="TIMESTAMP"/>
|
<result column="deleted" property="deleted" jdbcType="INTEGER"/>
|
</resultMap>
|
|
<!-- 基础字段列表 -->
|
<sql id="Base_Column_List">
|
id, order_id, evaluator_id, evaluator_name, evaluator_type, content, rating,
|
service_rating, quality_rating, delivery_rating, is_anonymous, reply_content,
|
reply_user_id, reply_time, created_at, updated_at, deleted
|
</sql>
|
|
<!-- 根据订单ID查询订单评价 -->
|
<select id="selectByOrderId" resultMap="BaseResultMap">
|
SELECT
|
<include refid="Base_Column_List"/>
|
FROM tb_order_evaluation
|
WHERE deleted = 0 AND order_id = #{orderId}
|
LIMIT 1
|
</select>
|
|
</mapper>
|