|
|
@@ -15,6 +15,7 @@
|
|
|
<result column="star" jdbcType="INTEGER" property="star" />
|
|
|
<result column="ip" jdbcType="VARCHAR" property="ip" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="commodity_type" jdbcType="INTEGER" property="commodityType" />
|
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
|
<!--
|
|
|
@@ -90,7 +91,7 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Thu Jul 19 10:59:39 CST 2018.
|
|
|
-->
|
|
|
- id, commodity_id, uid, order_no, content, star, ip, create_time
|
|
|
+ id, commodity_id, uid, order_no, content, star, ip, create_time, commodity_type
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.JtCommodityCommentExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
|
@@ -150,10 +151,10 @@
|
|
|
-->
|
|
|
insert into jt_commodity_comment (id, commodity_id, uid,
|
|
|
order_no, content, star,
|
|
|
- ip, create_time)
|
|
|
+ ip, create_time, commodity_type)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR},
|
|
|
#{orderNo,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER},
|
|
|
- #{ip,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ #{ip,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{commodityType,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.JtCommodityComment">
|
|
|
<!--
|
|
|
@@ -187,6 +188,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
+ <if test="commodityType != null">
|
|
|
+ commodity_type,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -213,6 +217,9 @@
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="commodityType != null">
|
|
|
+ #{commodityType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.JtCommodityCommentExample" resultType="java.lang.Long">
|
|
|
@@ -258,6 +265,9 @@
|
|
|
<if test="record.createTime != null">
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="record.commodityType != null">
|
|
|
+ commodity_type = #{record.commodityType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
@@ -277,7 +287,8 @@
|
|
|
content = #{record.content,jdbcType=VARCHAR},
|
|
|
star = #{record.star,jdbcType=INTEGER},
|
|
|
ip = #{record.ip,jdbcType=VARCHAR},
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ commodity_type = #{record.commodityType,jdbcType=INTEGER}
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
|
@@ -311,6 +322,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="commodityType != null">
|
|
|
+ commodity_type = #{commodityType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -327,7 +341,8 @@
|
|
|
content = #{content,jdbcType=VARCHAR},
|
|
|
star = #{star,jdbcType=INTEGER},
|
|
|
ip = #{ip,jdbcType=VARCHAR},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ commodity_type = #{commodityType,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<select id="getCommentCount" resultType="java.lang.Integer">
|