12345678910111213141516171819202122232425262728293031 |
- package com.yihu.wlyy.web.common.advert;
- import io.swagger.annotations.Api;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.ResponseBody;
- import com.yihu.wlyy.service.common.advert.AdvertService;
- import com.yihu.wlyy.web.BaseController;
- @Controller
- @RequestMapping(value = "common")
- @Api(description = "广告")
- public class AdvertController extends BaseController {
-
- @Autowired
- private AdvertService advertService;
- @RequestMapping(value = "advert")
- @ResponseBody
- public String list(int type) {
- try {
- return write(200, "查询成功", "list" , advertService.findByType(type));
- } catch (Exception e) {
- error(e);
- return error(-1, "查询失败");
- }
- }
- }
|