| | |
| | | package com.moral.controller; |
| | | |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | |
| | | import com.moral.common.bean.PageBean; |
| | | import com.moral.common.bean.ResultBean; |
| | | import com.moral.entity.Menu; |
| | | import com.moral.service.AccountService; |
| | | import com.moral.service.ChannelService; |
| | | import com.moral.service.MenuService; |
| | | |
| | | @RestController |
| | |
| | | public class MenuController { |
| | | @Resource |
| | | MenuService menuService; |
| | | |
| | | @Resource |
| | | ChannelService channelService; |
| | | |
| | | @Resource |
| | | AccountService accountService; |
| | | |
| | | @GetMapping("count-by-example") |
| | | public ResultBean<Integer> countByExample(PageBean pageBean) { |
| | |
| | | return resultBean; |
| | | } |
| | | |
| | | @GetMapping("page-list") |
| | | public PageBean pageList(PageBean pageBean) { |
| | | return menuService.queryByPageBean(pageBean); |
| | | @GetMapping("channel-list") |
| | | public ResultBean getChannelList(String channelName) { |
| | | ResultBean resultBean = new ResultBean(ResultBean.SUCCESS); |
| | | resultBean.setData(channelService.getChannelList(channelName)); |
| | | return resultBean; |
| | | } |
| | | |
| | | @GetMapping("page-allList") |
| | |
| | | ResultBean resultBean = new ResultBean(ResultBean.SUCCESS); |
| | | return resultBean; |
| | | } |
| | | |
| | | @GetMapping("menu-by-account") |
| | | public Map<String,Object> getMenuListsByAccountName(String accountName) { |
| | | Map<String,Object> mapResult = accountService.getMenuListsByAccountName(accountName); |
| | | return mapResult; |
| | | } |
| | | } |