|
|
@@ -17,40 +17,21 @@
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
- <update id="updateContentId">
|
|
|
- update data_block
|
|
|
- set content_id=#{contentId}
|
|
|
- where object_id=#{objectId}
|
|
|
- </update>
|
|
|
- <update id="updateBatch">
|
|
|
- update data_block
|
|
|
- <trim prefix="set" suffixOverrides=",">
|
|
|
- <trim prefix="content_id =case" suffix="end,">
|
|
|
- <foreach collection="list" item="item" index="index">
|
|
|
- when object_id=#{item.objectId} then #{item.contentId}
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- </trim>
|
|
|
- <where>
|
|
|
- object_id in
|
|
|
- <foreach collection="list" item="item" separator="," open="(" close=")">
|
|
|
- #{item.objectId}
|
|
|
- </foreach>
|
|
|
- </where>
|
|
|
- </update>
|
|
|
-
|
|
|
- <select id="findAll" resultType="cn.reghao.dfs.store.model.po.DataBlock">
|
|
|
- select * from data_block
|
|
|
- </select>
|
|
|
- <select id="findByContentId" resultType="cn.reghao.dfs.store.model.po.DataBlock">
|
|
|
- select *
|
|
|
- from data_block
|
|
|
+ <delete id="delete">
|
|
|
+ delete from data_block
|
|
|
where content_id=#{contentId}
|
|
|
- </select>
|
|
|
+ </delete>
|
|
|
+
|
|
|
<select id="findDataBlocks" resultType="cn.reghao.dfs.store.model.po.DataBlock">
|
|
|
select *
|
|
|
from data_block
|
|
|
where id>#{nextId}
|
|
|
limit #{pageSize}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="findByContentId" resultType="cn.reghao.dfs.store.model.po.DataBlock">
|
|
|
+ select *
|
|
|
+ from data_block
|
|
|
+ where content_id=#{contentId}
|
|
|
+ </select>
|
|
|
</mapper>
|