后台代码:
@At({"/index", "/index/?"})
@Ok("beetl:/platform/wx/user/index.html")
@RequiresPermissions("wx.user.list")
public void index(String wxid, HttpServletRequest req) {
List list = wxConfigService.query(Cnd.NEW());
if (list.size() > 0 && Strings.isBlank(wxid)) {
wxid = list.get(0).getId();
}
req.setAttribute("wxid", wxid);
req.setAttribute("wxList", list);
}
前台 代码:
<% for(o in wxList){ %>
<option value="${o.id}" <%if(o.id==wxid){%>selected<%}%>>${o.appname}
<%} %>