Commit 3228346a by gaopeng

广告位二期

parent 24a47f8f
...@@ -167,12 +167,13 @@ public interface AdvertisingSpaceBiz { ...@@ -167,12 +167,13 @@ public interface AdvertisingSpaceBiz {
/** /**
* 获取广告位列表 * 获取广告位列表
* @param name 名称 * @param name 名称
* @param pageParam 分页参数 * @param pageParam 分页参数
* @param filterClose 过滤已关闭
* @return * @return
* @throws BizException * @throws BizException
*/ */
PageBean list(String name, PageParam pageParam) throws BizException; PageBean list(String name, PageParam pageParam, Boolean filterClose) throws BizException;
/** /**
* 书刊广告位明细 * 书刊广告位明细
......
...@@ -955,9 +955,10 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz { ...@@ -955,9 +955,10 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
* 获取广告位列表 * 获取广告位列表
*/ */
@Override @Override
public PageBean list(String name, PageParam pageParam) throws BizException { public PageBean list(String name, PageParam pageParam, Boolean filterClose) throws BizException {
Map<String, Object> paramMap = new HashMap<>(); Map<String, Object> paramMap = new HashMap<>();
paramMap.put("name", StringUtil.isEmpty(name) ? null : name); paramMap.put("name", StringUtil.isEmpty(name) ? null : name);
paramMap.put("filterClose", filterClose);
PageBean pageBean = advertisingSpaceDao.listPage(pageParam, paramMap, "list"); PageBean pageBean = advertisingSpaceDao.listPage(pageParam, paramMap, "list");
if (pageBean == null || ListUtils.isEmpty(pageBean.getRecordList())) { if (pageBean == null || ListUtils.isEmpty(pageBean.getRecordList())) {
return new PageBean(0, 0, new ArrayList<>()); return new PageBean(0, 0, new ArrayList<>());
......
...@@ -15,7 +15,7 @@ public enum AdPositionModeEnum { ...@@ -15,7 +15,7 @@ public enum AdPositionModeEnum {
DESC_PAGE_BOTTOM(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "DESC_PAGE_BOTTOM", "应用说明页底部通栏"), DESC_PAGE_BOTTOM(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "DESC_PAGE_BOTTOM", "应用说明页底部通栏"),
TOP_FOCUS_PIC_1(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "TOP_FOCUS_PIC_1", "顶部焦点图第1帧"), TOP_FOCUS_PIC_1(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "TOP_FOCUS_PIC_1", "顶部焦点图第1帧"),
TOP_FOCUS_PIC_2(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "TOP_FOCUS_PIC_2", "顶部焦点图第2帧"), TOP_FOCUS_PIC_2(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "TOP_FOCUS_PIC_2", "顶部焦点图第2帧"),
UNDER_TITLE_BANNER(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "UNDER_TITLE_BANNER", "顶部焦点图第2帧"), UNDER_TITLE_BANNER(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "UNDER_TITLE_BANNER", "标题下通栏"),
RIGHT_FLOAT_ICON(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "RIGHT_FLOAT_ICON", "右侧浮标"), RIGHT_FLOAT_ICON(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "RIGHT_FLOAT_ICON", "右侧浮标"),
PAY_POP_UP(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "PAY_POP_UP", "付费后弹窗"), PAY_POP_UP(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "PAY_POP_UP", "付费后弹窗"),
MINE_TOP_BANNER(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "MINE_TOP_BANNER", "“我的”顶部通栏(大)"), MINE_TOP_BANNER(AdPositionEnum.APP_OR_PRODUCT.positionCode, null, "MINE_TOP_BANNER", "“我的”顶部通栏(大)"),
......
...@@ -269,6 +269,7 @@ public interface AdvertisingSpaceFacade { ...@@ -269,6 +269,7 @@ public interface AdvertisingSpaceFacade {
* @param name 广告位名称 * @param name 广告位名称
* @param currentPage 当前页 * @param currentPage 当前页
* @param numPerPage 每页条数 * @param numPerPage 每页条数
* @param filterClose 过滤已关闭
* @return * @return
* @throws PermissionException * @throws PermissionException
* @throws BizException * @throws BizException
...@@ -278,11 +279,13 @@ public interface AdvertisingSpaceFacade { ...@@ -278,11 +279,13 @@ public interface AdvertisingSpaceFacade {
@ApiImplicitParams({@ApiImplicitParam(name = "token", value = "token", dataType = "string", paramType = "header"), @ApiImplicitParams({@ApiImplicitParam(name = "token", value = "token", dataType = "string", paramType = "header"),
@ApiImplicitParam(name = "name", value = "广告位名称", dataType = "string", paramType = "query"), @ApiImplicitParam(name = "name", value = "广告位名称", dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "currentPage", value = "当前页", dataType = "int", paramType = "query"), @ApiImplicitParam(name = "currentPage", value = "当前页", dataType = "int", paramType = "query"),
@ApiImplicitParam(name = "numPerPage", value = "每页条数", dataType = "int", paramType = "query") @ApiImplicitParam(name = "numPerPage", value = "每页条数", dataType = "int", paramType = "query"),
@ApiImplicitParam(name = "filterClose", value = "过滤已关闭", dataType = "int", paramType = "query"),
}) })
@RequestMapping(value = "list", method = RequestMethod.GET) @RequestMapping(value = "list", method = RequestMethod.GET)
ResponseDto<?> list(@RequestHeader("token") String token, @RequestParam(value = "name", required = false) String name, ResponseDto<?> list(@RequestHeader("token") String token, @RequestParam(value = "name", required = false) String name,
@RequestParam(value = "currentPage", required = false) Integer currentPage, @RequestParam(value = "numPerPage", required = false) Integer numPerPage) @RequestParam(value = "currentPage", required = false) Integer currentPage, @RequestParam(value = "numPerPage", required = false) Integer numPerPage,
@RequestParam(value = "filterClose", required = false) Boolean filterClose)
throws PermissionException, BizException, JsonParseException; throws PermissionException, BizException, JsonParseException;
/** /**
......
...@@ -246,12 +246,16 @@ public class AdvertisingSpaceFacadeImpl implements AdvertisingSpaceFacade { ...@@ -246,12 +246,16 @@ public class AdvertisingSpaceFacadeImpl implements AdvertisingSpaceFacade {
@Override @Override
@RequestMapping(value = "list", method = RequestMethod.GET) @RequestMapping(value = "list", method = RequestMethod.GET)
public ResponseDto<?> list(@RequestHeader("token") String token, @RequestParam(value = "name", required = false) String name, public ResponseDto<?> list(@RequestHeader("token") String token, @RequestParam(value = "name", required = false) String name,
@RequestParam(value = "currentPage", required = false) Integer currentPage, @RequestParam(value = "numPerPage", required = false) Integer numPerPage) @RequestParam(value = "currentPage", required = false) Integer currentPage, @RequestParam(value = "numPerPage", required = false) Integer numPerPage,
@RequestParam(value = "filterClose", required = false) Boolean filterClose)
throws PermissionException, BizException, JsonParseException { throws PermissionException, BizException, JsonParseException {
if (currentPage == null || numPerPage == null || currentPage < 0 || numPerPage < 0) { if (currentPage == null || numPerPage == null || currentPage < 0 || numPerPage < 0) {
throw BookBizException.PAGE_PARAM_DELETION; throw BookBizException.PAGE_PARAM_DELETION;
} }
return new ResponseDto<>(advertisingSpaceBiz.list(name, new PageParam(currentPage, numPerPage))); if (null == filterClose) {
filterClose = true;
}
return new ResponseDto<>(advertisingSpaceBiz.list(name, new PageParam(currentPage, numPerPage), filterClose));
} }
/** /**
......
...@@ -124,6 +124,9 @@ ...@@ -124,6 +124,9 @@
<if test="name != null"> <if test="name != null">
AND (ad_name LIKE CONCAT('%', #{name}, '%') OR source_id LIKE CONCAT(#{name},'%')) AND (ad_name LIKE CONCAT('%', #{name}, '%') OR source_id LIKE CONCAT(#{name},'%'))
</if> </if>
<if test="filterClose == 1">
AND is_open = 1
</if>
order by order by
create_time desc create_time desc
</select> </select>
......
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