Commit 47c6bd32 authored by 赵啸非's avatar 赵啸非

添加动态列表查询接口

parent 20cc3318
......@@ -29,6 +29,8 @@ public class AppDatasetVo extends BaseEntityLong {
*/
private String fieldValue;
private List <Long> idList;
private Long appId;
private List<Long> idList;
}
\ No newline at end of file
......@@ -67,6 +67,7 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
AppDatasetQuery appDatasetQuery = new AppDatasetQuery();
appDatasetQuery.setFieldCode(query.getFieldCode());
appDatasetQuery.setFieldName(query.getFieldName());
appDatasetQuery.setAppId(query.getAppId());
String fieldValue = StrUtil.addPrefixIfNot(query.getFieldValue(), "%");
fieldValue = StrUtil.addSuffixIfNot(fieldValue, "%");
appDatasetQuery.setFieldValue(fieldValue);
......
......@@ -12,15 +12,19 @@
<trim suffixOverrides="where" suffix="">
where 1=1 and
<trim prefixOverrides="and" prefix="">
<if test="condition.appId!=null and condition.appId!=''">
and a.appId = #{condition.appId,jdbcType=VARCHAR}
</if>
<if test="condition.fieldCode!=null and condition.fieldCode!=''">
and a.fieldCode = #{condition.fieldCode,jdbcType=VARCHAR}
and b.fieldCode = #{condition.fieldCode,jdbcType=VARCHAR}
</if>
<if test="condition.fieldName!=null and condition.fieldName!=''">
and a.fieldName = #{condition.fieldName,jdbcType=VARCHAR}
and b.fieldName = #{condition.fieldName,jdbcType=VARCHAR}
</if>
<if test="condition.fieldValue != null and condition.fieldValue != ''">
and a.fieldValue like #{condition.fieldValue}
and b.fieldValue like #{condition.fieldValue}
</if>
</trim>
</trim>
</select>
......@@ -35,14 +39,17 @@
<trim suffixOverrides="where" suffix="">
where 1=1 and
<trim prefixOverrides="and" prefix="">
<if test="condition.appId!=null and condition.appId!=''">
and a.appId = #{condition.appId,jdbcType=VARCHAR}
</if>
<if test="condition.fieldCode!=null and condition.fieldCode!=''">
and a.fieldCode = #{condition.fieldCode,jdbcType=VARCHAR}
and b.fieldCode = #{condition.fieldCode,jdbcType=VARCHAR}
</if>
<if test="condition.fieldName!=null and condition.fieldName!=''">
and a.fieldName = #{condition.fieldName,jdbcType=VARCHAR}
and b.fieldName = #{condition.fieldName,jdbcType=VARCHAR}
</if>
<if test="condition.fieldValue != null and condition.fieldValue != ''">
and a.fieldValue like #{condition.fieldValue}
and b.fieldValue like #{condition.fieldValue}
</if>
</trim>
</trim>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment