List<RoleFunction> setRole = new ArrayList<RoleFunction>();
if (roleItem != null) {
for (Object item : roleItem) {
JSONObject role = (JSONObject) item;
RoleFunction rlf = new RoleFunction();
rlf.setRoleCode(role.getString("code"));
rlf.setFuncCode(Integer.toString(codeItem.getCode()));
rlf.setUpdater(CapSecurityContext.getUserId());
rlf.setUpdateTime(CapDate.getCurrentTimestamp());
setRole.add(rlf);
}
}
commonSrv.save(setRole);