|
|
|
@ -11,10 +11,10 @@ import apelet.common.online.dao.OnlinePageMapper; |
|
|
|
import apelet.common.online.dao.OnlineTableMapper; |
|
|
|
import apelet.common.online.dao.OnlineTableMapper; |
|
|
|
import apelet.common.online.model.OnlinePage; |
|
|
|
import apelet.common.online.model.OnlinePage; |
|
|
|
import apelet.common.online.model.OnlineTable; |
|
|
|
import apelet.common.online.model.OnlineTable; |
|
|
|
import apelet.common.online.upms.dao.OnlineSysPermCodeMapper; |
|
|
|
import apelet.common.online.upms.dao.SysPermCodeMapper; |
|
|
|
import apelet.common.online.upms.dao.OnlineSysPermCodePermMapper; |
|
|
|
import apelet.common.online.upms.dao.SysPermCodePermMapper; |
|
|
|
import apelet.common.online.upms.dao.OnlineSysPermMapper; |
|
|
|
import apelet.common.online.upms.dao.SysPermMapper; |
|
|
|
import apelet.common.online.upms.dao.OnlineSysPermModuleMapper; |
|
|
|
import apelet.common.online.upms.dao.SysPermModuleMapper; |
|
|
|
import apelet.common.online.upms.model.SysPerm; |
|
|
|
import apelet.common.online.upms.model.SysPerm; |
|
|
|
import apelet.common.online.upms.model.SysPermCode; |
|
|
|
import apelet.common.online.upms.model.SysPermCode; |
|
|
|
import apelet.common.online.upms.model.SysPermCodePerm; |
|
|
|
import apelet.common.online.upms.model.SysPermCodePerm; |
|
|
|
@ -27,7 +27,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
|
|
|
import org.springframework.scheduling.annotation.Async; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PreDestroy; |
|
|
|
import javax.annotation.PreDestroy; |
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
@ -86,12 +88,15 @@ public class OnlinePermCodeServiceImpl implements OnlinePermCodeService { |
|
|
|
private OnlineSysPermCodeMapper onlineSysPermCodeMapper; |
|
|
|
private OnlineSysPermCodeMapper onlineSysPermCodeMapper; |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private OnlineSysPermCodePermMapper onlineSysPermCodePermMapper; |
|
|
|
private OnlineSysPermCodePermMapper onlineSysPermCodePermMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private IdGeneratorWrapper idGenerator; |
|
|
|
private IdGeneratorWrapper idGenerator; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 发布后异步生成权限字,先生成前先清理旧数据保证幂等。 |
|
|
|
* 发布后异步生成权限字,先生成前先清理旧数据保证幂等。 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Async("permCodeTaskExecutor") |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void genPermCodeByPageId(Long pageId, Long userId) { |
|
|
|
public void genPermCodeByPageId(Long pageId, Long userId) { |
|
|
|
permCodeExecutor.execute(() -> { |
|
|
|
permCodeExecutor.execute(() -> { |
|
|
|
@ -110,6 +115,8 @@ public class OnlinePermCodeServiceImpl implements OnlinePermCodeService { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 删除表单后异步清理权限字相关数据。 |
|
|
|
* 删除表单后异步清理权限字相关数据。 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Async("permCodeTaskExecutor") |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void removePermCodeByPageCode(String pageCode) { |
|
|
|
public void removePermCodeByPageCode(String pageCode) { |
|
|
|
permCodeExecutor.execute(() -> { |
|
|
|
permCodeExecutor.execute(() -> { |
|
|
|
|