bm_file_info查询和删除添加del_flag字段
This commit is contained in:
parent
d5c0780d0d
commit
fa604e1527
|
|
@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectBmFileInfoList" parameterType="com.bonus.common.biz.domain.BmFileInfo" resultMap="BmFileInfoResult">
|
<select id="selectBmFileInfoList" parameterType="com.bonus.common.biz.domain.BmFileInfo" resultMap="BmFileInfoResult">
|
||||||
<include refid="selectBmFileInfoVo"/>
|
<include refid="selectBmFileInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
del_flag != 2
|
||||||
<if test="taskType != null "> and task_type = #{taskType}</if>
|
<if test="taskType != null "> and task_type = #{taskType}</if>
|
||||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||||
<if test="modelId != null "> and model_id = #{modelId}</if>
|
<if test="modelId != null "> and model_id = #{modelId}</if>
|
||||||
|
|
@ -34,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectBmFileInfoById" parameterType="Long" resultMap="BmFileInfoResult">
|
<select id="selectBmFileInfoById" parameterType="Long" resultMap="BmFileInfoResult">
|
||||||
<include refid="selectBmFileInfoVo"/>
|
<include refid="selectBmFileInfoVo"/>
|
||||||
where id = #{id}
|
where id = #{id} and del_flag != 2
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertBmFileInfo" parameterType="com.bonus.common.biz.domain.BmFileInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertBmFileInfo" parameterType="com.bonus.common.biz.domain.BmFileInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
|
@ -91,33 +92,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteBmFileInfoById" parameterType="Long">
|
<update id="deleteBmFileInfoById" parameterType="Long">
|
||||||
delete from bm_file_info where id = #{id}
|
update bm_file_info set del_flag = 2
|
||||||
</delete>
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteBmFileInfoByModelId" parameterType="Long">
|
<update id="deleteBmFileInfoByModelId" parameterType="Long">
|
||||||
delete from bm_file_info where model_id = #{modelId}
|
update bm_file_info set del_flag = 2
|
||||||
</delete>
|
where model_id = #{modelId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteBmFileInfoByIds" parameterType="String">
|
<update id="deleteBmFileInfoByIds" parameterType="String">
|
||||||
delete from bm_file_info where id in
|
update bm_file_info set del_flag = 2
|
||||||
|
where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteBmFileInfoByBizInfo" parameterType="com.bonus.common.biz.domain.BmFileInfo">
|
<update id="deleteBmFileInfoByBizInfo" parameterType="com.bonus.common.biz.domain.BmFileInfo">
|
||||||
delete from bm_file_info
|
update bm_file_info set del_flag = 2
|
||||||
<where>
|
<where>
|
||||||
<if test="taskType != null "> and task_type = #{taskType}</if>
|
<if test="taskType != null "> and task_type = #{taskType}</if>
|
||||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||||
<if test="modelId != null "> and model_id = #{modelId}</if>
|
<if test="modelId != null "> and model_id = #{modelId}</if>
|
||||||
<if test="fileType != null "> and file_type = #{fileType}</if>
|
<if test="fileType != null "> and file_type = #{fileType}</if>
|
||||||
</where>
|
</where>
|
||||||
</delete>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteBmFileList">
|
<update id="deleteBmFileList">
|
||||||
delete from bm_file_info where task_id = #{taskId}
|
update bm_file_info set del_flag = 2
|
||||||
|
where task_id = #{taskId}
|
||||||
and task_type = 0
|
and task_type = 0
|
||||||
</delete>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -217,19 +217,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select
|
select
|
||||||
distinct task_type as taskType,task_id as taskId,model_id as modelId, file_type as fileType
|
distinct task_type as taskType,task_id as taskId,model_id as modelId, file_type as fileType
|
||||||
from bm_file_info
|
from bm_file_info
|
||||||
where task_type = #{taskType} and task_id = #{taskId} and model_id = #{modelId}
|
where del_flag != 2 and task_type = #{taskType} and task_id = #{taskId} and model_id = #{modelId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPartFileDetail" resultType="com.bonus.material.part.domain.BmPartFileDetail">
|
<select id="getPartFileDetail" resultType="com.bonus.material.part.domain.BmPartFileDetail">
|
||||||
select
|
select
|
||||||
id,task_type as taskType,task_id as taskId,model_id as modelId, file_type as fileType,name,url
|
id,task_type as taskType,task_id as taskId,model_id as modelId, file_type as fileType,name,url
|
||||||
from bm_file_info
|
from bm_file_info
|
||||||
where task_type = #{taskType} and task_id = #{taskId} and model_id = #{modelId} and file_type = #{fileType}
|
where del_flag != 2 and task_type = #{taskType} and task_id = #{taskId} and model_id = #{modelId} and file_type = #{fileType}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteBmFileList" parameterType="Long">
|
<update id="deleteBmFileList" parameterType="Long">
|
||||||
delete from bm_file_info where task_id = #{taskId} and task_type = 13
|
update bm_file_info set del_flag = 2
|
||||||
</delete>
|
where task_id = #{taskId} and task_type = 13
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="getCheckInfoForm" resultType="com.bonus.material.part.domain.PartTypeCheckInfo">
|
<select id="getCheckInfoForm" resultType="com.bonus.material.part.domain.PartTypeCheckInfo">
|
||||||
select
|
select
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
FROM
|
FROM
|
||||||
sys_dict_data sdd
|
sys_dict_data sdd
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
bm_file_info bfi ON bfi.dic_id = sdd.dict_code and bfi.task_type = #{taskType} and bfi.model_id = #{typeId}
|
bm_file_info bfi ON bfi.del_flag != 2 and bfi.task_type = #{taskType} and bfi.model_id = #{typeId}
|
||||||
WHERE
|
WHERE
|
||||||
sdd.dict_type = 'purchase_check_report_type'
|
sdd.dict_type = 'purchase_check_report_type'
|
||||||
</sql>
|
</sql>
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,9 @@
|
||||||
create_by as createBy,
|
create_by as createBy,
|
||||||
create_time as createTime
|
create_time as createTime
|
||||||
from bm_file_info
|
from bm_file_info
|
||||||
where model_id = #{id}
|
where
|
||||||
|
del_flag != 2
|
||||||
|
and model_id = #{id}
|
||||||
</select>
|
</select>
|
||||||
<select id="getDetailList" resultType="com.bonus.material.settlement.domain.SltAgreementReduce">
|
<select id="getDetailList" resultType="com.bonus.material.settlement.domain.SltAgreementReduce">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue