Commit 926b9076 by tyfanchz

广告获取接口增加条件查询

1 parent f38081a5
...@@ -26,10 +26,8 @@ public class AdMgrServiceImpl implements AdMgrService { ...@@ -26,10 +26,8 @@ public class AdMgrServiceImpl implements AdMgrService {
@Override @Override
public R getAdMgrList(Page page, PlatformAd ad) { public R getAdMgrList(Page page, PlatformAd ad) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面 //PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
if (page.getPageNumber() > 0 && page.getPageSize() > 0) {
PageHelper.startPage(page.getPageNumber(), page.getPageSize(), PageHelper.startPage(page.getPageNumber(), page.getPageSize(),
true); true);
}
List<PlatformAd> adMgrList = adMapper.getAdMgrList(ad); List<PlatformAd> adMgrList = adMapper.getAdMgrList(ad);
return R.ok().putPageData((com.github.pagehelper.Page<PlatformAd>) adMgrList); return R.ok().putPageData((com.github.pagehelper.Page<PlatformAd>) adMgrList);
} }
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
remark remark
from t_platform_ad from t_platform_ad
<where> <where>
<if test="position != null">
and position = #{position,jdbcType=INTEGER}
</if>
<if test="status != null"> <if test="status != null">
and status = #{status,jdbcType=INTEGER} and status = #{status,jdbcType=INTEGER}
</if> </if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!