コード例 #1
0
 /** 修改授权信息备注名称 */
 @Override
 public void updateSamAuthor(SamAuthor samAuthor) {
   String sql = " update itel_sam_author set var_backname=? where var_pitel=? and var_uitel=? ";
   this.baseDao.execBySql(
       sql,
       new Object[] {samAuthor.getBackName(), samAuthor.getVarPitel(), samAuthor.getVarUitel()});
 }
コード例 #2
0
 /** 修改授权信息活动字段(主动添加以及被动添加) */
 @Override
 public void modifySamAuthorActive(SamAuthor samAuthor) {
   String sql = " update itel_sam_author set active=? where var_pitel=? and var_uitel=?";
   this.baseDao.execBySql(
       sql,
       new Object[] {samAuthor.getActive(), samAuthor.getVarPitel(), samAuthor.getVarUitel()});
 }
コード例 #3
0
  /** 通过产品itel号以及用户itel号获取授权信息 */
  @Override
  public SamAuthor getSamAuthorByPitel2Uitel(SamAuthor samAuthor) {
    String queryAuthorSql = "  from SamAuthor where varPitel=? and varUitel=?";
    List list = null;
    try {
      list =
          this.baseDao.findByHql(
              queryAuthorSql, new Object[] {samAuthor.getVarPitel(), samAuthor.getVarUitel()});
    } catch (Exception e1) {

      logger.debug("Sorry,System  queryAuthorSql Exception:sql :" + queryAuthorSql);
      e1.printStackTrace();
    }
    if (list != null && list.size() > 0) return (SamAuthor) list.get(0);
    return null;
  }
コード例 #4
0
 /** 删除授权信息 */
 @Override
 public void deleteSamAuthor(SamAuthor samAuthor) {
   String sql = " delete from itel_sam_author where var_pitel=? and var_uitel=?";
   this.baseDao.execBySql(sql, new Object[] {samAuthor.getVarPitel(), samAuthor.getVarUitel()});
 }