"admin").get(0);
TSRole manager = commonDao.findByProperty(TSRole.class, "roleCode",
"manager").get(0);
List<TSFunction> list = commonDao.loadAll(TSFunction.class);
for (int i = 0; i < list.size(); i++) {
TSRoleFunction adminroleFunction = new TSRoleFunction();
TSRoleFunction managerFunction = new TSRoleFunction();
adminroleFunction.setTSFunction(list.get(i));
managerFunction.setTSFunction(list.get(i));
adminroleFunction.setTSRole(admin);
managerFunction.setTSRole(manager);
if (list.get(i).getFunctionName().equals("Demo示例")) {
adminroleFunction.setOperation("add,szqm,");
}
commonDao.saveOrUpdate(adminroleFunction);
commonDao.saveOrUpdate(managerFunction);