Browse Source

调整机构扩展

luojun 2 years ago
parent
commit
87360240a1

+ 2 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysPhysicalDefenseConstructionServiceImpl.java

@@ -2,6 +2,7 @@ package com.xunmei.system.service.impl;
 
 import java.util.List;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.xunmei.common.core.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -97,6 +98,7 @@ public class SysPhysicalDefenseConstructionServiceImpl extends ServiceImpl<SysPh
     @Override
     public int insertSysPhysicalDefenseConstruction(SysPhysicalDefenseConstruction sysPhysicalDefenseConstruction) {
         sysPhysicalDefenseConstruction.setCreateTime(DateUtils.getNowDate());
+        sysPhysicalDefenseConstructionMapper.delete(new LambdaQueryWrapper<SysPhysicalDefenseConstruction>().eq(SysPhysicalDefenseConstruction::getOrgId,sysPhysicalDefenseConstruction.getOrgId()).eq(SysPhysicalDefenseConstruction::getType,sysPhysicalDefenseConstruction.getType()).eq(SysPhysicalDefenseConstruction::getStandard,sysPhysicalDefenseConstruction.getStandard()));
         return sysPhysicalDefenseConstructionMapper.insert(sysPhysicalDefenseConstruction);
     }