前言
1、controlelr
@RequestMapping("menu")
@ResponseBody
public ResponseBean todayYouHui(){
try {
return ResponseBean.buildSuccess(menuService.byControllerSetMenu());
}catch (AppException e){
return ResponseBean.buildFailure(e.getCode(),e.getMessage());
} catch (Exception e) {
return ResponseBean.buildFailure(e.getMessage());
}
}
2、service
@Override
public String byControllerSetMenu() {
MenuUrl todayYouHuiMenuUrl = menuUrlRepository.findByMenuNameEquals(WechatMenuParams.YOUHUI_TODAY);
ViewButton todayYouHui = new ViewButton();
todayYouHui.setName(todayYouHuiMenuUrl.getMenuName());
todayYouHui.setUrl(todayYouHuiMenuUrl.getUrl());
todayYouHui.setType(WechatMenuParams.VIEW);
// ClickButton _618DaCu = new ClickButton();
// _61