标签-树形+搜索%修改

This commit is contained in:
xiejunyu
2022-03-18 11:36:10 +08:00
parent a05e3da88e
commit 065ffeb83c
11 changed files with 174 additions and 129 deletions
@@ -41,18 +41,31 @@
where f.cgform_head_id="48308196e7b04761b533dc31bc899707"
and f.is_delete=0
and i.dict_id=1493098515761917954
<choose>
<when test="params.dbFieldTxt != null and params.dbFieldTxt != ''">
<if test='params.cut="cn"'>
<!--切换数据成英文-->
<!-- <choose>
<when test="params.dbFieldTxt != null and params.dbFieldTxt != ''">
<if test='params.cut="cn"'>
and f.db_field_txt like concat('%',#{params.dbFieldTxt},'%')
</if>
<if test='params.cut="en"'>
and f.db_field_en_name like concat('%',#{params.dbFieldTxt},'%')
</if>
</when>
</choose>-->
<if test="params.dbFieldTxt != null and params.dbFieldTxt != ''">
<!--搜索条件:标签名称包含%,单独搜索-->
<choose>
<when test='params.dbFieldTxt != null and params.dbFieldTxt != "" and params.dbFieldTxt.contains("%")'>
and f.db_field_txt like '%1%%' escape '1'
</when>
<otherwise>
and f.db_field_txt like concat('%',#{params.dbFieldTxt},'%')
</if>
<if test='params.cut="en"'>
and f.db_field_en_name like concat('%',#{params.dbFieldTxt},'%')
</if>
</when>
</choose>
</otherwise>
</choose>
</if>
<if test="params.showArea != null and params.showArea != '' ">
and f.show_area like concat('%',#{params.showArea},'%')
</if>
@@ -145,14 +145,14 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, O
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
IPage page = new Page(pageNo, pageSize);
IPage<OnlCgformArea> result = onlCgformAreaMapper.queryPageList(page, params);
List<OnlCgformArea> records = result.getRecords();
/*List<OnlCgformArea> records = result.getRecords();
String cut = (String) params.get("cut");
//中英切换-所属模块
if(CutEnum.EN.getValue().equals(cut)){
for(OnlCgformArea data:records){
data.setIsModelName(data.getEnName());
}
}
}*/
return result;
}
}
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.vo.LoginUser;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
import com.jero.modules.document.enums.FieldTypeEnum;
@@ -182,7 +181,8 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
IPage page = new Page(pageNo, pageSize);
IPage<OnlCgformTag> result = onlCgformTagMapper.queryPageList(page, params);
List<OnlCgformTag> records = result.getRecords();
//params.get("dbFieldTxt").toString().contains("%");
/*List<OnlCgformTag> records = result.getRecords();
String cut = (String) params.get("cut");
//中英切换-属性类型+展示区域列
if(CutEnum.EN.getValue().equals(cut)){
@@ -190,7 +190,7 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
data.setFieldShowTypeName(data.getFieldShowTypeEnName());
data.setShowAreaName(data.getShowAreaEnName());
}
}
}*/
return result;
}