|
|
@@ -1,29 +1,30 @@
|
|
|
-package com.xunmei.system.service.impl;
|
|
|
+package com.xunmei.core.edu.service.impl;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.xunmei.common.core.constant.SecurityConstants;
|
|
|
+import com.xunmei.common.core.constant.ServiceNameConstants;
|
|
|
import com.xunmei.common.core.utils.DateUtils;
|
|
|
import com.xunmei.common.security.utils.SecurityUtils;
|
|
|
+import com.xunmei.core.edu.domain.SysLearningMaterials;
|
|
|
+import com.xunmei.core.edu.dto.SysLearningMaterialsPageDto;
|
|
|
+import com.xunmei.core.edu.dto.SysLearningMaterialsPageVo;
|
|
|
+import com.xunmei.core.edu.mapper.SysLearningMaterialsMapper;
|
|
|
+import com.xunmei.core.edu.service.ISysLearningMaterialsService;
|
|
|
+import com.xunmei.system.api.RemoteOrgService;
|
|
|
import com.xunmei.system.api.domain.SysOrg;
|
|
|
-import com.xunmei.system.domain.vo.SysLearningMaterialsPageVo;
|
|
|
-import com.xunmei.system.dto.SysLearningMaterialsPageDto;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import com.xunmei.system.service.ISysOrgService;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.xunmei.common.core.web.page.TableDataInfo;
|
|
|
-import com.xunmei.system.mapper.SysLearningMaterialsMapper;
|
|
|
-import com.xunmei.system.domain.SysLearningMaterials;
|
|
|
-import com.xunmei.system.service.ISysLearningMaterialsService;
|
|
|
|
|
|
/**
|
|
|
* 学习资料Service业务层处理
|
|
|
@@ -36,7 +37,7 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
|
|
|
@Autowired
|
|
|
private SysLearningMaterialsMapper sysLearningMaterialsMapper;
|
|
|
@Autowired
|
|
|
- private ISysOrgService orgService;
|
|
|
+ private RemoteOrgService remoteOrgService;
|
|
|
|
|
|
@Override
|
|
|
public TableDataInfo selectPage(SysLearningMaterialsPageDto sysLearningMaterials) {
|
|
|
@@ -60,7 +61,7 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
|
|
|
}
|
|
|
|
|
|
private void dealParentOrgId(SysLearningMaterialsPageDto sysLearningMaterials) {
|
|
|
- SysOrg sysOrg = orgService.selectSysOrgById(sysLearningMaterials.getOrgId());
|
|
|
+ SysOrg sysOrg = remoteOrgService.selectSysOrgById(sysLearningMaterials.getOrgId(), SecurityConstants.INNER);
|
|
|
if (sysOrg == null || ObjectUtil.isEmpty(sysOrg.getPath())) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -106,7 +107,7 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
|
|
|
sysLearningMaterials.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
|
|
|
sysLearningMaterials.setUpdateTime(DateUtils.getNowDate());
|
|
|
sysLearningMaterials.setIsOpen(0);
|
|
|
- final SysOrg sysOrg = orgService.selectSysOrgById(sysLearningMaterials.getOrgId());
|
|
|
+ final SysOrg sysOrg = remoteOrgService.selectSysOrgById(sysLearningMaterials.getOrgId(), SecurityConstants.INNER);
|
|
|
if (sysOrg != null) {
|
|
|
sysLearningMaterials.setOrgName(sysOrg.getName());
|
|
|
sysLearningMaterials.setOrgPath(sysOrg.getPath());
|