|
@@ -8,6 +8,7 @@
|
|
|
|
|
|
<resultMap type="com.ym.mec.web.dal.entity.SubjectGoodsMapper" id="SubjectGoodsMapper">
|
|
<resultMap type="com.ym.mec.web.dal.entity.SubjectGoodsMapper" id="SubjectGoodsMapper">
|
|
<result column="id_" property="id"/>
|
|
<result column="id_" property="id"/>
|
|
|
|
+ <result column="music_group_id_" property="musicGroupId"/>
|
|
<result column="subject_id_" property="subjectId"/>
|
|
<result column="subject_id_" property="subjectId"/>
|
|
<result column="goods_id_" property="goodsId"/>
|
|
<result column="goods_id_" property="goodsId"/>
|
|
<result column="create_time_" property="createTime"/>
|
|
<result column="create_time_" property="createTime"/>
|
|
@@ -16,12 +17,12 @@
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
<select id="get" resultMap="SubjectGoodsMapper">
|
|
<select id="get" resultMap="SubjectGoodsMapper">
|
|
- SELECT * FROM subject_goods_mapper WHERE id_ = #{id}
|
|
|
|
|
|
+ SELECT * FROM subject_plan_goods_mapper WHERE id_ = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 全查询 -->
|
|
<!-- 全查询 -->
|
|
<select id="findAll" resultMap="SubjectGoodsMapper">
|
|
<select id="findAll" resultMap="SubjectGoodsMapper">
|
|
- SELECT * FROM subject_goods_mapper ORDER BY id_
|
|
|
|
|
|
+ SELECT * FROM subject_plan_goods_mapper ORDER BY id_
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
<!-- 向数据库增加一条记录 -->
|
|
@@ -32,13 +33,13 @@
|
|
SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
|
|
SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
|
|
</selectKey>
|
|
</selectKey>
|
|
-->
|
|
-->
|
|
- INSERT INTO subject_goods_mapper (id_,subject_id_,goods_id_,create_time_,update_time_)
|
|
|
|
- VALUES(#{id},#{subjectId},#{goodsId},#{createTime},#{updateTime})
|
|
|
|
|
|
+ INSERT INTO subject_plan_goods_mapper (id_,music_group_id_,subject_id_,goods_id_,create_time_,update_time_)
|
|
|
|
+ VALUES(#{id},#{musicGroupId},#{subjectId},#{goodsId},#{createTime},#{updateTime})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
<update id="update" parameterType="com.ym.mec.web.dal.entity.SubjectGoodsMapper">
|
|
<update id="update" parameterType="com.ym.mec.web.dal.entity.SubjectGoodsMapper">
|
|
- UPDATE subject_goods_mapper
|
|
|
|
|
|
+ UPDATE subject_plan_goods_mapper
|
|
<set>
|
|
<set>
|
|
<if test="subjectId != null">
|
|
<if test="subjectId != null">
|
|
subject_id_ = #{subjectId},
|
|
subject_id_ = #{subjectId},
|
|
@@ -46,6 +47,9 @@
|
|
<if test="updateTime != null">
|
|
<if test="updateTime != null">
|
|
update_time_ = #{updateTime},
|
|
update_time_ = #{updateTime},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="musicGroupId != null">
|
|
|
|
+ music_group_id_ = #{musicGroupId},
|
|
|
|
+ </if>
|
|
<if test="goodsId != null">
|
|
<if test="goodsId != null">
|
|
goods_id_ = #{goodsId},
|
|
goods_id_ = #{goodsId},
|
|
</if>
|
|
</if>
|
|
@@ -55,17 +59,17 @@
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
<!-- 根据主键删除一条记录 -->
|
|
<delete id="delete">
|
|
<delete id="delete">
|
|
- DELETE FROM subject_goods_mapper WHERE id_ = #{id}
|
|
|
|
|
|
+ DELETE FROM subject_plan_goods_mapper WHERE id_ = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
<!-- 分页查询 -->
|
|
<select id="queryPage" resultMap="SubjectGoodsMapper" parameterType="map">
|
|
<select id="queryPage" resultMap="SubjectGoodsMapper" parameterType="map">
|
|
- SELECT * FROM subject_goods_mapper ORDER BY id_
|
|
|
|
|
|
+ SELECT * FROM subject_plan_goods_mapper ORDER BY id_
|
|
<include refid="global.limit"/>
|
|
<include refid="global.limit"/>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
<!-- 查询当前表的总记录数 -->
|
|
<select id="queryCount" resultType="int">
|
|
<select id="queryCount" resultType="int">
|
|
- SELECT COUNT(*) FROM subject_goods_mapper
|
|
|
|
|
|
+ SELECT COUNT(*) FROM subject_plan_goods_mapper
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|