组织架构新增定时任务
This commit is contained in:
@@ -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