|
@@ -5,17 +5,22 @@ import com.redxun.common.base.db.BaseDao;
|
|
|
import com.redxun.common.base.db.BaseService;
|
|
|
import com.redxun.common.service.impl.SuperServiceImpl;
|
|
|
import com.redxun.datasource.DataSourceContextHolder;
|
|
|
+import com.redxun.dto.user.OsUserDto;
|
|
|
import com.redxun.feign.sys.SystemClient;
|
|
|
+import com.redxun.knowledge.common.UserService;
|
|
|
import com.redxun.knowledge.entity.dao.CommonEntity;
|
|
|
import com.redxun.knowledge.entity.vo.DicVo;
|
|
|
import com.redxun.knowledge.entity.vo.PositionSequenceVo;
|
|
|
import com.redxun.knowledge.mapper.CommonMapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 业务系统相关服务类
|
|
@@ -27,6 +32,9 @@ public class CommonServiceImpl extends SuperServiceImpl<CommonMapper, CommonEnti
|
|
|
@Resource
|
|
|
private CommonMapper commonMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private UserService userService;
|
|
|
+
|
|
|
@Resource
|
|
|
@Lazy
|
|
|
SystemClient systemClient;
|
|
@@ -59,8 +67,28 @@ public class CommonServiceImpl extends SuperServiceImpl<CommonMapper, CommonEnti
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取字典数据(知识地图类型)
|
|
|
+ * @param alias
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public List<DicVo> queryDic(String alias) {
|
|
|
List<DicVo> result = commonMapper.queryDic(alias);
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取当前登录用户信息
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, Object> loginUserInfo() {
|
|
|
+ String userId = userService.queryLoginUser();
|
|
|
+ OsUserDto osUserDto = userService.queryOsUserDto(userId);
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("userId",userId);
|
|
|
+ map.put("name",osUserDto.getFullName());
|
|
|
+ // map.put("companyName",userService.getCompanyById(osUserDto.getCompanyId()).getName());
|
|
|
+ map.put("deptName",osUserDto.getDeptName());
|
|
|
+ return map;
|
|
|
+ }
|
|
|
}
|