组织架构新增定时任务
This commit is contained in:
@@ -115,7 +115,6 @@
|
||||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea-openapi:0.0.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea-util:0.2.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:credentials-java:0.2.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ini4j:ini4j:0.5.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jacoco:org.jacoco.agent:runtime:0.8.3" level="project" />
|
||||
@@ -138,5 +137,9 @@
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.xuxueli:xxl-job-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.48.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.groovy:groovy:2.5.10" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -55,6 +55,10 @@
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.job;
|
||||
|
||||
import com.cool.store.service.EnterpriseSyncService;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: JobHandler
|
||||
* @Description:
|
||||
* @date 2023-06-14 16:07
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class JobHandler {
|
||||
|
||||
@Resource
|
||||
private EnterpriseSyncService enterpriseSyncService;
|
||||
|
||||
@XxlJob("syncOrganization")
|
||||
public void syncOrganization(){
|
||||
log.info("组织架构定时同步开始");
|
||||
enterpriseSyncService.syncAll();
|
||||
log.info("组织架构同步结束");
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,6 +26,7 @@ public class MenuServiceImpl implements MenuService {
|
||||
@Override
|
||||
public List<MenuTreeVO> getUserMenus(String userId, String roleId) {
|
||||
List<SysMenuDO> menuList= sysMenuDAO.selectMenuAll(null, PlatFormTypeEnum.PC.getCode());
|
||||
//根据角色获取菜单
|
||||
return MenuTreeVO.dealMenuTree(CommonConstants.ZERO_LONG, menuList);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user