bug修改

This commit is contained in:
xiejunyu
2022-03-16 14:20:16 +08:00
parent eaa219a460
commit 4ea700f4fe
10 changed files with 85 additions and 61 deletions
@@ -160,6 +160,6 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
"i.item_text as attribute_type_name,i.en_name as attribute_type_en_name\n" +
"from sys_dict as d\n" +
"left join sys_dict_item as i on d.attribute_type=i.item_value\n" +
"where i.dict_id=\"1494570247913512962\"")
IPage<SysDict> queryPageList(IPage page,@Param("params") Map<String,Object> params);
"where i.dict_id=\"1494570247913512962\" and d.del_flag=0")
IPage queryPageList(IPage page,@Param("params") Map<String,Object> params);
}
@@ -402,15 +402,19 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
*/
@Override
public IPage<SysDict> queryPageList(Map<String, Object> params) {
Integer pageNo= Integer.valueOf(params.get("pageNo").toString());
Integer pageSize= Integer.valueOf(params.get("pageSize").toString());
IPage<SysDict> page=new Page(pageNo,pageSize);
//中英切换-属性类型列
if(CutEnum.EN.getValue().equals(params.get("cut").toString())){
params.put("attributeTypeName",params.get("attributeTypeEnName"));
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
IPage page = new Page(pageNo, pageSize);
IPage<SysDict> result = sysDictMapper.queryPageList(page, params);
List<SysDict> records = result.getRecords();
String cut = (String) params.get("cut");
//中英切换-字典名称+属性类型列
if(CutEnum.EN.getValue().equals(cut)){
for(SysDict data:records){
data.setDictName(data.getDictEnName());
data.setAttributeTypeName(data.getAttributeTypeEnName());
}
}
IPage<SysDict> result=sysDictMapper.queryPageList(page,params);
return result;
}
}