Commit 1a8b4d89 authored by 乾坤平台's avatar 乾坤平台 Committed by 季圣华
Browse files

!41 全局修改物理删除为逻辑删除,同时修改查询语句过滤删除标识

Merge pull request !41 from 乾坤平台/master
parents 35c6f559 1f2cf8c3
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
ser.update_Time,mat.name as materialName,null as creator,null as updater,null as creatorName, ser.update_Time,mat.name as materialName,null as creator,null as updater,null as creatorName,
null as updaterName,ser.depothead_Id, dh.number as depotHeadNumber,concat(dh.SubType,dh.Type) as depotHeadType null as updaterName,ser.depothead_Id, dh.number as depotHeadNumber,concat(dh.SubType,dh.Type) as depotHeadType
FROM jsh_serial_number ser FROM jsh_serial_number ser
left join jsh_material mat on mat.id = ser.material_Id left join jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_Flag,'0') !='1'
left join jsh_depothead dh on dh.id= ser.depothead_Id left join jsh_depothead dh on dh.id= ser.depothead_Id and ifnull(dh.delete_Flag,'0') !='1'
where 1=1 where 1=1
<if test="serialNumber != null"> <if test="serialNumber != null">
<bind name="serialNumber" value="'%' + _parameter.serialNumber + '%'" /> <bind name="serialNumber" value="'%' + _parameter.serialNumber + '%'" />
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
SELECT SELECT
COUNT(ser.id) COUNT(ser.id)
FROM jsh_serial_number ser FROM jsh_serial_number ser
left JOIN jsh_material mat on mat.id = ser.material_Id left JOIN jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_Flag,'0') !='1'
where 1=1 where 1=1
<if test="serialNumber != null"> <if test="serialNumber != null">
<bind name="serialNumber" value="'%' + _parameter.serialNumber + '%'" /> <bind name="serialNumber" value="'%' + _parameter.serialNumber + '%'" />
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
ser.update_Time,ser.creator,ser.updater,mat.name as materialName,cr.username as creatorName, ser.update_Time,ser.creator,ser.updater,mat.name as materialName,cr.username as creatorName,
ur.username as updaterName,ser.depothead_Id ur.username as updaterName,ser.depothead_Id
FROM jsh_serial_number ser FROM jsh_serial_number ser
left JOIN jsh_material mat on mat.id = ser.material_Id left JOIN jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_Flag,'0') !='1'
left join jsh_user cr on ser.creator=cr.id and ifnull(cr.status,'0') not in('1','2') left join jsh_user cr on ser.creator=cr.id and ifnull(cr.status,'0') not in('1','2')
left join jsh_user ur on ser.updater=ur.id and ifnull(ur.status,'0') not in('1','2') left join jsh_user ur on ser.updater=ur.id and ifnull(ur.status,'0') not in('1','2')
where 1=1 where 1=1
...@@ -231,7 +231,6 @@ ...@@ -231,7 +231,6 @@
update jsh_serial_number update jsh_serial_number
set update_Time=#{updateTime},updater=#{updater},delete_Flag='1' set update_Time=#{updateTime},updater=#{updater},delete_Flag='1'
where 1=1 where 1=1
and ifnull(delete_Flag,'0') !='1'
and id in ( and id in (
<foreach collection="ids" item="id" separator=","> <foreach collection="ids" item="id" separator=",">
#{id} #{id}
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<if test="description != null"> <if test="description != null">
and description like '%${description}%' and description like '%${description}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1'
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
<if test="description != null"> <if test="description != null">
and description like '%${description}%' and description like '%${description}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1'
</select> </select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultMap="com.jsh.erp.datasource.mappers.SupplierMapper.BaseResultMap"> <select id="findByAll" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultMap="com.jsh.erp.datasource.mappers.SupplierMapper.BaseResultMap">
...@@ -65,5 +67,16 @@ ...@@ -65,5 +67,16 @@
<if test="description != null"> <if test="description != null">
and description like '%${description}%' and description like '%${description}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1'
</select> </select>
<update id="batchDeleteSupplierByIds">
update jsh_supplier
set delete_Flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<if test="companyName != null"> <if test="companyName != null">
and company_name like '%${companyName}%' and company_name like '%${companyName}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1'
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -20,5 +21,16 @@ ...@@ -20,5 +21,16 @@
<if test="companyName != null"> <if test="companyName != null">
and company_name like '%${companyName}%' and company_name like '%${companyName}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1'
</select> </select>
<update id="batchDeleteSystemConfigByIds">
update jsh_systemconfig
set delete_Flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<if test="name != null"> <if test="name != null">
and UName like '%${name}%' and UName like '%${name}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1'
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -20,5 +21,16 @@ ...@@ -20,5 +21,16 @@
<if test="name != null"> <if test="name != null">
and UName like '%${name}%' and UName like '%${name}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1'
</select> </select>
<update id="batchDeleteUnitByIds">
update jsh_unit
set delete_Flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
</update>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.UserBusinessMapperEx">
<update id="batchDeleteUserBusinessByIds">
update jsh_serial_number
set delete_Flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
</update>
</mapper>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment