问题修复
This commit is contained in:
@@ -48,6 +48,7 @@ public class HyInspectionSettingMappingDAO {
|
||||
if(CollectionUtils.isEmpty(openAreaMappingIds) || Objects.isNull(inspectionSettingId)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
hyInspectionSettingMappingMapper.deleteInOpenAreaMappingIds(inspectionSettingId, openAreaMappingIds);
|
||||
List<HyInspectionSettingMappingDO> insertList = new ArrayList<>();
|
||||
for (Long openAreaMappingId : openAreaMappingIds) {
|
||||
HyInspectionSettingMappingDO insert = new HyInspectionSettingMappingDO();
|
||||
|
||||
@@ -54,4 +54,12 @@ public interface HyInspectionSettingMappingMapper {
|
||||
* @return
|
||||
*/
|
||||
List<HyInspectionSettingMappingDO> getConflictInspectionSetting(@Param("inspectionSettingId") Long inspectionSettingId, @Param("openAreaMappingIds") List<Long> openAreaMappingIds);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param excludeInspectionSettingId
|
||||
* @param openAreaMappingIds
|
||||
* @return
|
||||
*/
|
||||
Integer deleteInOpenAreaMappingIds(@Param("excludeInspectionSettingId") Long excludeInspectionSettingId, @Param("openAreaMappingIds") List<Long> openAreaMappingIds);
|
||||
}
|
||||
@@ -37,9 +37,6 @@
|
||||
<foreach collection="recordList" item="record" separator=";">
|
||||
insert into enterprise_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
@@ -99,9 +96,6 @@
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.id != null">
|
||||
#{record.id},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
#{record.userId},
|
||||
</if>
|
||||
|
||||
@@ -82,14 +82,14 @@
|
||||
update
|
||||
hy_inspection_setting_mapping
|
||||
set
|
||||
deleted = '1' , update_time = new()
|
||||
deleted = '1' , update_time = now()
|
||||
where
|
||||
inspection_setting_id = #{inspectionSettingId} and open_area_mapping_id not in
|
||||
<foreach collection="openAreaMappingIds" separator="," open="(" close=")" item="openAreaMappingId" >#{openAreaMappingId}</foreach>
|
||||
</update>
|
||||
|
||||
<update id="deleteInspectionSettingMapping">
|
||||
update hy_inspection_setting_mapping set deleted = '1' , update_time = new() where inspection_setting_id = #{inspectionSettingId}
|
||||
update hy_inspection_setting_mapping set deleted = '1' , update_time = now() where inspection_setting_id = #{inspectionSettingId}
|
||||
</update>
|
||||
|
||||
<select id="getConflictInspectionSetting" resultMap="BaseResultMap">
|
||||
@@ -106,4 +106,16 @@
|
||||
and inspection_setting_id != #{inspectionSettingId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="deleteInOpenAreaMappingIds">
|
||||
update
|
||||
hy_inspection_setting_mapping
|
||||
set
|
||||
deleted = '1' , update_time = now()
|
||||
where
|
||||
open_area_mapping_id in <foreach collection="openAreaMappingIds" separator="," open="(" close=")" item="openAreaMappingId" >#{openAreaMappingId}</foreach>
|
||||
<if test="excludeInspectionSettingId != null">
|
||||
and inspection_setting_id != #{inspectionSettingId}
|
||||
</if>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -11,9 +11,9 @@
|
||||
<result column="leader_user_id" jdbcType="VARCHAR" property="leaderUserId"/>
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum"/>
|
||||
<result column="third_dept_id" jdbcType="VARCHAR" property="thirdDeptId"/>
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="create_name" jdbcType="VARCHAR" property="createName"/>
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="update_name" jdbcType="VARCHAR" property="updateName"/>
|
||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||
</resultMap>
|
||||
@@ -106,7 +106,7 @@
|
||||
#{record.deleted},
|
||||
</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE region_id = values(region_id), name = values(name), parent_id = values(parent_id), region_path = values(region_path), leader_user_id = values(leader_user_id), order_num = values(order_num), third_dept_id = values(third_dept_id), update_time = UNIX_TIMESTAMP(), deleted = values(deleted)
|
||||
ON DUPLICATE KEY UPDATE region_id = values(region_id), name = values(name), parent_id = values(parent_id), region_path = values(region_path), leader_user_id = values(leader_user_id), order_num = values(order_num), third_dept_id = values(third_dept_id), update_time = now(), deleted = values(deleted)
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
@@ -156,7 +156,7 @@
|
||||
</update>
|
||||
|
||||
<update id="deleteNotExistRegion">
|
||||
update region set deleted = 1 , update_time = UNIX_TIMESTAMP() where region_id not in <foreach collection="regionIds" separator="," item="regionId" open="(" close=")"> #{regionId}</foreach>
|
||||
update region set deleted = 1 , update_time = now() where region_id not in <foreach collection="regionIds" separator="," item="regionId" open="(" close=")"> #{regionId}</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getRegionByRegionIds" resultMap="BaseResultMap">
|
||||
|
||||
Reference in New Issue
Block a user