Commit eb9406ce authored by 扫地僧's avatar 扫地僧

H5首页数据接口服务类

parent 920dcc33
package cn.com.fqy.controller.mapi;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import cn.com.fqy.core.common.PageFinder;
import cn.com.fqy.core.model.Advert;
import cn.com.fqy.core.model.Query;
import cn.com.fqy.core.service.AdvertService;
@Controller
@RequestMapping("/h5/index")
public class IndexController {
@Resource
private AdvertService advertService;
@RequestMapping("fqy")
@ResponseBody
public String fqy (){
return "fqy";
}
/**
* 分页展示广告
*/
@RequestMapping("getAdvertList")
@ResponseBody
public PageFinder<Advert> getAdvertList(@ModelAttribute("advert") Advert advert,Query query) {
Query q = new Query(query.getPageNo(),query.getPageSize(),advert);
return advertService.getAdvertPagedList(q);
}
}
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