|
@@ -3,6 +3,7 @@ package com.dragon.tj.portal.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.dragon.tj.portal.auth.model.LoginUser;
|
|
|
import com.dragon.tj.portal.common.base.R;
|
|
@@ -11,7 +12,6 @@ import com.dragon.tj.portal.mapper.app.AppInfoMapper;
|
|
|
import com.dragon.tj.portal.mapper.app.InstallInfoMapper;
|
|
|
import com.dragon.tj.portal.service.AppService;
|
|
|
import com.dragon.tj.portal.service.SysDictItemService;
|
|
|
-import com.dragon.tj.portal.service.SysDictService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -32,14 +32,14 @@ public class AppServiceImpl implements AppService {
|
|
|
private InstallInfoMapper installInfoMapper;
|
|
|
|
|
|
@Autowired
|
|
|
- private SysDictService sysDictService;
|
|
|
+ private SysDictItemService sysDictItemService;
|
|
|
|
|
|
|
|
|
- private static List<SysDict> appTypeDict;
|
|
|
+ private static List<SysDictItem> appTypeDict;
|
|
|
|
|
|
- public List<SysDict> getAppTypeDict(){
|
|
|
+ public List<SysDictItem> getAppTypeDict(){
|
|
|
if (appTypeDict == null || appTypeDict.size() == 0) {
|
|
|
- appTypeDict = sysDictService.getDict("app_type");
|
|
|
+ appTypeDict = sysDictItemService.list(Wrappers.<SysDictItem>query().lambda().eq(SysDictItem::getType, "app_type").orderByAsc(SysDictItem::getSort));
|
|
|
}
|
|
|
|
|
|
return appTypeDict;
|
|
@@ -79,7 +79,7 @@ public class AppServiceImpl implements AppService {
|
|
|
* */
|
|
|
@Override
|
|
|
public R getType() {
|
|
|
- return R.ok(sysDictService.getDict("app_type"));
|
|
|
+ return R.ok(getAppTypeDict());
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -161,8 +161,8 @@ public class AppServiceImpl implements AppService {
|
|
|
map.put("delFlag", params.getDelFlag());
|
|
|
Integer appType = params.getAppType();
|
|
|
if (appType != null){
|
|
|
- List<SysDict> appTypeList = getAppTypeDict();
|
|
|
- SysDict specialToolDict = appTypeList.stream().filter(item -> "专项工具".equals(item.getDescription())).findFirst().get();
|
|
|
+ List<SysDictItem> appTypeList = getAppTypeDict();
|
|
|
+ SysDictItem specialToolDict = appTypeList.stream().filter(item -> "专项工具".equals(item.getLabel())).findFirst().get();
|
|
|
map.put("std", specialToolDict.getId());//专项工具
|
|
|
|
|
|
if (appType == specialToolDict.getId()){
|