Skip to content

Commit

Permalink
update: 添加微信菜单,查询上级菜单兼容下oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizzercn committed Jan 13, 2017
1 parent ace2e80 commit a2663cf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void index(String wxid, HttpServletRequest req) {
@RequiresAuthentication
public void add(String wxid, HttpServletRequest req) {
req.setAttribute("wxid", wxid);
req.setAttribute("menus", wxMenuService.query(Cnd.where("wxid", "=", wxid).and("parentId", "=", "").asc("location")));
req.setAttribute("menus", wxMenuService.query(Cnd.where("wxid", "=", wxid).and(Cnd.exps("parentId", "=", "").or("parentId", "is", null)).asc("location")));
req.setAttribute("config", wxConfigService.fetch(wxid));
}

Expand Down Expand Up @@ -145,7 +145,7 @@ public Object sortDo(@Param("ids") String ids, HttpServletRequest req) {
public Object edit(String id, HttpServletRequest req) {
Wx_menu menu = wxMenuService.fetch(id);
req.setAttribute("config", wxConfigService.fetch(menu.getWxid()));
return wxMenuService.fetchLinks(menu,"wxConfig");
return wxMenuService.fetchLinks(menu, "wxConfig");
}

@At
Expand Down Expand Up @@ -244,7 +244,7 @@ public Object pushMenu(String wxid, HttpServletRequest req) {
}
}
WxResp wxResp = wxApi2.menu_create(m1);
if(wxResp.errcode()!=0){
if (wxResp.errcode() != 0) {
return Result.error(wxResp.errmsg());
}
return Result.success("system.success");
Expand Down

0 comments on commit a2663cf

Please sign in to comment.