|
@@ -1,8 +1,7 @@
|
|
|
package org.jeecg.modules.system.service.impl;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.constant.CacheConstant;
|
|
|
import org.jeecg.common.constant.CommonConstant;
|
|
|
import org.jeecg.common.system.vo.DictModel;
|
|
@@ -10,7 +9,6 @@ import org.jeecg.modules.system.entity.SysDict;
|
|
|
import org.jeecg.modules.system.entity.SysDictItem;
|
|
|
import org.jeecg.modules.system.mapper.SysDictItemMapper;
|
|
|
import org.jeecg.modules.system.mapper.SysDictMapper;
|
|
|
-
|
|
|
import org.jeecg.modules.system.model.TreeSelectModel;
|
|
|
import org.jeecg.modules.system.service.ISysDictService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -18,9 +16,7 @@ import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -60,9 +56,15 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|
|
|
|
|
@Override
|
|
|
@Cacheable(value = CacheConstant.DICT_CACHE)
|
|
|
- public String queryDictTextByKey(String code, String key) {
|
|
|
+ public String queryDictTextByKey(String code, String key,String extendsKey,String extendsValue) {
|
|
|
log.info("无缓存dictText的时候调用这里!");
|
|
|
- return sysDictMapper.queryDictTextByKey(code, key);
|
|
|
+ if(null == extendsKey||extendsKey.trim().equals("")){
|
|
|
+ extendsKey = null;
|
|
|
+ }
|
|
|
+ if(null == extendsValue||extendsValue.trim().equals("")){
|
|
|
+ extendsValue = null;
|
|
|
+ }
|
|
|
+ return sysDictMapper.queryDictTextByKey(code, key,extendsKey,extendsValue);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -96,9 +98,15 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|
|
*/
|
|
|
@Override
|
|
|
@Cacheable(value = "dictTableCache")
|
|
|
- public String queryTableDictTextByKey(String table,String text,String code, String key) {
|
|
|
+ public String queryTableDictTextByKey(String table,String text,String code, String key,String extendsKey,String extendsValue) {
|
|
|
log.info("无缓存dictTable的时候调用这里!");
|
|
|
- return sysDictMapper.queryTableDictTextByKey(table,text,code,key);
|
|
|
+ if(null == extendsKey||extendsKey.trim().equals("")){
|
|
|
+ extendsKey = null;
|
|
|
+ }
|
|
|
+ if(null == extendsValue||extendsValue.trim().equals("")){
|
|
|
+ extendsValue = null;
|
|
|
+ }
|
|
|
+ return sysDictMapper.queryTableDictTextByKey(table,text,code,key,extendsKey,extendsValue);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -132,7 +140,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|
|
public List<DictModel> queryAllUserBackDictModel() {
|
|
|
return baseMapper.queryAllUserBackDictModel();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public List<DictModel> queryTableDictItems(String table, String text, String code, String keyword) {
|
|
|
return baseMapper.queryTableDictItems(table, text, code, "%"+keyword+"%");
|