Merge branch 'develop_3' into 'develop_master'
feat: 数据字典 查询问题 See merge request !2
This commit is contained in:
@@ -37,6 +37,13 @@ public class DicEORestController extends BaseController<DictionaryEO> {
|
|||||||
public ResponseMessage<PageInfo<DictionaryEO>> page(DictionaryEOPage page) throws Exception {
|
public ResponseMessage<PageInfo<DictionaryEO>> page(DictionaryEOPage page) throws Exception {
|
||||||
page.setDictionaryCodeOperator("like");
|
page.setDictionaryCodeOperator("like");
|
||||||
page.setDictionaryNameOperator("like");
|
page.setDictionaryNameOperator("like");
|
||||||
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(page.getPaixu()) && org.apache.commons.lang3.StringUtils.isNotBlank(page.getShunxu())){
|
||||||
|
String sql = page.getPaixu()+" "+page.getShunxu();
|
||||||
|
page.setSql(sql);
|
||||||
|
}else{
|
||||||
|
String sql = "order_num,u0.id";
|
||||||
|
page.setSql(sql);
|
||||||
|
}
|
||||||
List<DictionaryEO> rows = dicEOService.queryAllDicByPage(page);
|
List<DictionaryEO> rows = dicEOService.queryAllDicByPage(page);
|
||||||
return Result.success(getPageInfo(page.getPager(), rows));
|
return Result.success(getPageInfo(page.getPager(), rows));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,12 +267,13 @@
|
|||||||
<!-- 查询TS_DICTIONARY列表 -->
|
<!-- 查询TS_DICTIONARY列表 -->
|
||||||
<select id="queryAllDicByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
<select id="queryAllDicByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||||
select <include refid="Base_Column_List" /> from
|
select <include refid="Base_Column_List" /> from
|
||||||
(select tmp_tb.* , rownum rn from
|
(select tmp_tb.* from
|
||||||
(select <include refid="Base_Column_List" /> from TS_DICTIONARY u0
|
(select <include refid="Base_Column_List" /> from TS_DICTIONARY u0
|
||||||
<include refid="Base_Where_Clause"/>
|
<include refid="Base_Where_Clause"/>
|
||||||
order by order_num,u0.id
|
<if test="sql != null">
|
||||||
) tmp_tb where rownum <= ${pager.endIndex})
|
ORDER BY ${sql}
|
||||||
where rn >= ${pager.startIndex}
|
</if>
|
||||||
|
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDictionarySelList" parameterType="java.lang.String" resultType="com.adc.da.sys.common.SelectionResult">
|
<select id="getDictionarySelList" parameterType="java.lang.String" resultType="com.adc.da.sys.common.SelectionResult">
|
||||||
|
|||||||
Reference in New Issue
Block a user