Commit 6dbf91d9 authored by unset's avatar unset

修改banner接口

parent f2b219f0
......@@ -47,12 +47,12 @@ public class BannerBiz extends BaseBiz<BannerMapper, Banner> {
* @param indexShow 是否首页展示
* @return
*/
public ObjectRestResponse<List<Banner>> getAll(Integer indexShow) {
public ObjectRestResponse<List<Banner>> getAll(Integer indexShow, Integer location) {
Example example = new Example(Banner.class);
if (indexShow != null) {
example.createCriteria().andEqualTo("isDel", 0).andEqualTo("status", 1).andEqualTo("indexShow",indexShow);
example.createCriteria().andEqualTo("isDel", 0).andEqualTo("status", 1).andEqualTo("indexShow",indexShow).andEqualTo("location", location);
} else {
example.createCriteria().andEqualTo("isDel", 0).andEqualTo("status", 1);
example.createCriteria().andEqualTo("isDel", 0).andEqualTo("status", 1).andEqualTo("location", location);
}
example.orderBy("rank");
return ObjectRestResponse.succ(mapper.selectByExample(example));
......
package com.xxfc.platform.uccn.rest;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.uccn.biz.BannerBiz;
import com.xxfc.platform.uccn.entity.Banner;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("banner/web")
public class BannerWebController extends BaseController<BannerBiz, Banner> {
@GetMapping(value = "/app/unauth/getAll")
public ObjectRestResponse getAll(@RequestParam(value = "location", defaultValue = "1") Integer location) {
return baseBiz.getAll(1, location);
}
}
\ No newline at end of file
......@@ -21,8 +21,4 @@ public class BannerController extends BaseController<BannerBiz, Banner> {
return baseBiz.selectList(bannerDto);
}
@GetMapping(value = "/app/unauth/getAll")
public ObjectRestResponse getAll() {
return baseBiz.getAll(1);
}
}
\ No newline at end of file
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