|
@@ -10,6 +10,7 @@ import com.qmth.ops.biz.domain.Deploy;
|
|
|
import com.qmth.ops.biz.domain.DeployDevice;
|
|
|
import com.qmth.ops.biz.domain.DeployOrg;
|
|
|
import com.qmth.ops.biz.query.DeployQuery;
|
|
|
+import org.apache.commons.lang3.ArrayUtils;
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -83,6 +84,10 @@ public class DeployService extends ServiceImpl<DeployDao, Deploy> {
|
|
|
@Transactional
|
|
|
public void updateOrg(@NotNull Deploy deploy, Long[] orgId) {
|
|
|
deployOrgDao.delete(new LambdaQueryWrapper<DeployOrg>().eq(DeployOrg::getDeployId, deploy.getId()));
|
|
|
+ if(ArrayUtils.isEmpty(orgId)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
deployOrgDao.batchInsert(deploy.getId(), Arrays.asList(orgId));
|
|
|
}
|
|
|
}
|