|
|
@@ -20,6 +20,7 @@ import com.jzg.commons.entity.vo.SysSystemPermsVo;
|
|
|
import com.jzg.commons.entity.vo.SysSystemVo;
|
|
|
import com.jzg.commons.entity.vo.UpAndDownVo;
|
|
|
import com.jzg.commons.exception.SystemException;
|
|
|
+import com.jzg.commons.util.AssertionUtils;
|
|
|
import com.jzg.commons.util.MinioUtils;
|
|
|
import com.jzg.commons.util.StringUtils;
|
|
|
import com.jzg.mapper.*;
|
|
|
@@ -31,9 +32,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
@@ -513,7 +512,11 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public boolean saveBusPerms(SysSystemBusPermsVo sysSystemBusPermsVo) {
|
|
|
+ SysSystemBusPerms busOne = sysSystemBusPermsMapper.selectOne(new LambdaQueryWrapper<SysSystemBusPerms>().eq(SysSystemBusPerms::getSystemCode, sysSystemBusPermsVo.getSystemCode()));
|
|
|
SysSystemBusPerms sysSystemBusPerms = new SysSystemBusPerms(sysSystemBusPermsVo);
|
|
|
+ if(Objects.nonNull(busOne)){
|
|
|
+ sysSystemBusPerms.setId(busOne.getId());
|
|
|
+ }
|
|
|
sysSystemBusPermsMapper.insertOrUpdate(sysSystemBusPerms);
|
|
|
sysSystemBusPermsVo.setId(sysSystemBusPermsVo.getId());
|
|
|
List<SysSystemBusPermsLink> sysSystemBusPermsLink = SysSystemBusPermsLink.getSystemBusPermsLink(sysSystemBusPermsVo);
|
|
|
@@ -528,11 +531,12 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public SysSystemBusPermsVo getBusPerms(String systemCode,String companyId) {
|
|
|
+ public SysSystemBusPermsVo getBusPerms(String systemCode) {
|
|
|
|
|
|
SysSystemBusPerms sysSystemBusPerms = sysSystemBusPermsMapper.selectOne(new LambdaQueryWrapper<SysSystemBusPerms>()
|
|
|
- .eq(SysSystemBusPerms::getSystemCode, systemCode)
|
|
|
- .eq(SysSystemBusPerms::getCompanyId, companyId));
|
|
|
+ .eq(SysSystemBusPerms::getSystemCode, systemCode));
|
|
|
+
|
|
|
+ AssertionUtils.isFail(Objects.isNull(sysSystemBusPerms),"该租户不存在租户功能配置");
|
|
|
|
|
|
List<SysSystemBusPermsLink> sysSystemBusPermsLinks = sysSystemBusPermsLinkMapper.selectList(new LambdaQueryWrapper<SysSystemBusPermsLink>()
|
|
|
.eq(SysSystemBusPermsLink::getPermsId, sysSystemBusPerms.getId()));
|