|
@@ -16,6 +16,7 @@
|
|
|
<result column="order_no_" property="orderNo" />
|
|
|
<result column="username_" property="userName" />
|
|
|
<result column="organ_id_" property="organId" />
|
|
|
+ <result column="author_user_" property="authorUser" />
|
|
|
<result column="create_time_" property="createTime" />
|
|
|
<result column="update_time_" property="updateTime" />
|
|
|
</resultMap>
|
|
@@ -34,13 +35,16 @@
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentGoodsSell" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO student_goods_sell (id_,user_id_,teacher_id_,goods_json_,total_amount_,market_amount_,create_time_,update_time_,order_no_,organ_id_)
|
|
|
- VALUES(#{id},#{userId},#{teacherId},#{goodsJson},#{totalAmount},#{marketAmount},NOW(),NOW(),#{orderNo},#{organId})
|
|
|
+ INSERT INTO student_goods_sell (id_,user_id_,teacher_id_,goods_json_,total_amount_,market_amount_,create_time_,update_time_,order_no_,organ_id_,author_user_)
|
|
|
+ VALUES(#{id},#{userId},#{teacherId},#{goodsJson},#{totalAmount},#{marketAmount},NOW(),NOW(),#{orderNo},#{organId},#{authorUser})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.StudentGoodsSell">
|
|
|
UPDATE student_goods_sell <set>
|
|
|
+ <if test="authorUser != null">
|
|
|
+ author_user_ = #{authorUser},
|
|
|
+ </if>
|
|
|
<if test="organId != null">
|
|
|
organ_id_ = #{organId},
|
|
|
</if>
|