代码如下:
public void detail(String rulerId, HttpServletRequest req) {
if (!Strings.isBlank(rulerId)) {
Sql sql = Sqls.queryRecord("SELECT a.rp_title,b.rp_qrcode,r.disabled FROM rp_ruler_qrcode r INNER JOIN" +
" rp_redpacket a ON a.id = r.redpacket_id INNER JOIN rp_qrcode b ON b.id = r.qrcode_id WHERE ruler_id = '" + rulerId + "'");
rpRulerQrcodeService.dao().execute(sql);
List list = sql1.getList(Rp_ruler_qrcode.class);
log.debug("************************");
log.debug(list);
List nutzMap = new ArrayList<>();
for (Rp_ruler_qrcode rp_ruler_qrcode : list) {
NutMap map = new NutMap();
map.put("rp_title",rp_ruler_qrcode.getRedpacket_id());
map.put("rp_qrcode", rp_ruler_qrcode.getQrcode_id());
map.put("diabled", rp_ruler_qrcode.isDisabled());
nutzMap.add(map);
}
req.setAttribute("map", nutzMap);
}
}