标签管理-标签内容
This commit is contained in:
+3
-6
@@ -95,9 +95,7 @@ public class SysDictItemController {
|
||||
SysDictItem sysdict = sysDictItemService.getById(sysDictItem.getId());
|
||||
if(sysdict==null) {
|
||||
result.error500("未找到对应实体");
|
||||
}/*else if(sysDictItem.getIsReadOnly()==1){
|
||||
result.error("固定字段,不可修改");
|
||||
}*/else {
|
||||
}else {
|
||||
sysDictItem.setUpdateTime(new Date());
|
||||
boolean ok = sysDictItemService.updateById(sysDictItem);
|
||||
//TODO 返回false说明什么?
|
||||
@@ -147,9 +145,8 @@ public class SysDictItemController {
|
||||
SysDictItem sysDictItem = sysDictItemService.getById(ids);
|
||||
if(ids==null || "".equals(ids.trim())) {
|
||||
result.error500("参数不识别!");
|
||||
}/*else if(sysDictItem.getIsReadOnly() == 1){
|
||||
result.error("固定字段,不可删除");
|
||||
}*/else {
|
||||
}
|
||||
else {
|
||||
this.sysDictItemService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
result.success("批量删除成功!");
|
||||
}
|
||||
|
||||
+6
@@ -49,6 +49,12 @@ public class SysCategory implements Serializable,Comparable<SysCategory>{
|
||||
/**是否有子节点*/
|
||||
@Excel(name = "是否有子节点(1:有)", width = 15)
|
||||
private java.lang.String hasChild;
|
||||
/**英文名称*/
|
||||
@Excel(name = "英文名称", width = 15)
|
||||
private java.lang.String enName;
|
||||
/**描述*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
private java.lang.String description;
|
||||
|
||||
@Override
|
||||
public int compareTo(SysCategory o) {
|
||||
|
||||
+8
@@ -109,6 +109,14 @@ public class SysDict implements Serializable {
|
||||
@ApiModelProperty(value = "标签类型 1下拉选择 2树形结构")
|
||||
@Dict(dicCode = "attribute_type")
|
||||
private java.lang.String attributeType;
|
||||
|
||||
/**
|
||||
* 英文名称
|
||||
*/
|
||||
@Excel(name = "英文名称", width = 15)
|
||||
@ApiModelProperty(value = "英文名称")
|
||||
@Dict(dicCode = "en_name")
|
||||
private java.lang.String enName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
@@ -37,6 +37,7 @@ public class SysDictItem implements Serializable {
|
||||
/**
|
||||
* 字典id
|
||||
*/
|
||||
@Dict(dictTable = "sys_dict", dicText = "id", dicCode = "id")
|
||||
private String dictId;
|
||||
|
||||
/**
|
||||
|
||||
+14
-7
@@ -1,15 +1,15 @@
|
||||
package com.jero.modules.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.DictQuery;
|
||||
import com.jero.modules.system.entity.SysDict;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.model.TreeSelectModel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 字典表 服务类
|
||||
@@ -38,6 +38,13 @@ public interface ISysDictService extends IService<SysDict> {
|
||||
@Deprecated
|
||||
List<String> queryTableDictByKeys(String table, String text, String code, String keys);
|
||||
|
||||
/**
|
||||
* 查询展示区域
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SysDict> queryDictName(SysDict sysDict);
|
||||
|
||||
/**
|
||||
* 根据字典类型删除关联表中其对应的数据
|
||||
*
|
||||
@@ -50,19 +57,19 @@ public interface ISysDictService extends IService<SysDict> {
|
||||
* 添加一对多
|
||||
*/
|
||||
public Integer saveMain(SysDict sysDict, List<SysDictItem> sysDictItemList);
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有部门 作为字典信息 id -->value,departName -->text
|
||||
* @return
|
||||
*/
|
||||
public List<DictModel> queryAllDepartBackDictModel();
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有用户 作为字典信息 username -->value,realname -->text
|
||||
* @return
|
||||
*/
|
||||
public List<DictModel> queryAllUserBackDictModel();
|
||||
|
||||
|
||||
/**
|
||||
* 通过关键字查询字典表
|
||||
* @param table
|
||||
|
||||
+13
-2
@@ -115,7 +115,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||
log.debug("无缓存dictTableList的时候调用这里!");
|
||||
return sysDictMapper.queryTableDictItemsByCodeAndFilter(table,text,code,filterSql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过查询指定table的 text code 获取字典值text
|
||||
* dictTableCache采用redis缓存有效期10分钟
|
||||
@@ -164,6 +164,17 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||
return texts;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询展示区域
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SysDict> queryDictName(SysDict sysDict) {
|
||||
QueryWrapper<SysDict> QueryWrapper = new QueryWrapper<>();
|
||||
QueryWrapper.select("id", "dict_name");
|
||||
return list(QueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型id删除关联表中其对应的数据
|
||||
*/
|
||||
@@ -201,7 +212,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+"%");
|
||||
|
||||
Reference in New Issue
Block a user