ControlBean 服务端代码

1、案例一: Sql语句拼接

    # Sql语句拼接
    StringBuffer sql = new StringBuffer();
    sql.append(" update t_rpt_Template set");
    sql.append(" FVersionStatus= ?,");
    sql.append(" FPublishedStatus= ?");
    sql.append(" where fnumber = ?");
    sql.append(" and ftemplateType = ?");
    sql.append(" and fid <> ?");
    List params = new ArrayList();
    params.add(new Integer(2));
    params.add(new Integer(2));
    params.add(templateInfo.getNumber());
    params.add(Integer.valueOf(templateInfo.getTemplateType().getValue()));
    params.add(templateInfo.getId().toString());
    DbUtil.execute(ctx, sql.toString(), params.toArray());

**2、案例二: TemplateControllerBeanEx 扩展类中 **

SelectorItemCollection sic = new SelectorItemCollection();
sic.add(new SelectorItemInfo("startdate"));
sic.add(new SelectorItemInfo("lastupdatetime"));
sic.add(new SelectorItemInfo("lastupdateuser.id"));
sic.add(new SelectorItemInfo("lastupdateuser.number"));    
sic.add(new SelectorItemInfo("isgroup"));
TemplateInfo template = getTemplateInfo(ctx, pkid, sic);

---未完待续

你可能感兴趣的:(ControlBean 服务端代码)