<?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.oying.modules.message.mapper.MesOrderItemEvaluationMapper">
|
<resultMap id="BaseResultMap" type="com.oying.modules.message.domain.MesOrderItemEvaluation">
|
<id column="id" property="id"/>
|
<result column="order_eval_id" property="orderEvalId"/>
|
<result column="order_item_id" property="orderItemId"/>
|
<result column="goods_id" property="goodsId"/>
|
<result column="goods_name" property="goodsName"/>
|
<result column="goods_pic" property="goodsPic"/>
|
<result column="score" property="score"/>
|
<result column="content" property="content"/>
|
<result column="imgs" property="imgs"/>
|
<result column="create_by" property="createBy"/>
|
<result column="create_time" property="createTime"/>
|
<result column="update_by" property="updateBy"/>
|
<result column="update_time" property="updateTime"/>
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
id, order_eval_id, order_item_id, goods_id, goods_name, goods_pic, score, content, imgs, create_by, create_time, update_by, update_time
|
</sql>
|
<insert id="addGoodsEvaluation" parameterType="com.oying.modules.message.domain.MesOrderItemEvaluationDto">
|
INSERT INTO mes_order_item_evaluation
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="orderEvalId != null">
|
order_eval_id,
|
</if>
|
<if test="orderItemId != null">
|
order_item_id,
|
</if>
|
<if test="goodsId != null">
|
goods_id,
|
</if>
|
<if test="goodsName != null and goodsName != ''">
|
goods_name,
|
</if>
|
<if test="goodsPic != null and goodsPic != ''">
|
goods_pic,
|
</if>
|
<if test="score != null">
|
score,
|
</if>
|
<if test="content != null and content != ''">
|
content,
|
</if>
|
<if test="imgs != null and imgs != ''">
|
imgs,
|
</if>
|
</trim>
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
<if test="orderEvalId != null">
|
#{orderEvalId},
|
</if>
|
<if test="orderItemId != null">
|
#{orderItemId},
|
</if>
|
<if test="goodsId != null">
|
#{goodsId},
|
</if>
|
<if test="goodsName != null and goodsName != ''">
|
#{goodsName},
|
</if>
|
<if test="goodsPic != null and goodsPic != ''">
|
#{goodsPic},
|
</if>
|
<if test="score != null">
|
#{score},
|
</if>
|
<if test="content != null and content != ''">
|
#{content},
|
</if>
|
<if test="imgs != null and imgs != ''">
|
#{imgs},
|
</if>
|
</trim>
|
</insert>
|
|
|
<select id="findAll" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List"/>
|
from mes_order_item_evaluation
|
<where>
|
</where>
|
order by id desc
|
</select>
|
</mapper>
|