Exemplo n.º 1
0
 public int deleteReward(long rid) throws DaoException {
   String sql = "delete from t01_rewarded_exp where rid = ?";
   if (logger.isDebugEnabled()) {
     logger.debug("**sql:" + sql);
     logger.debug("**id:" + rid);
   }
   IDao dao = DaoFactory.createDaoInstance();
   return dao.update("ijsp", sql, rid);
 }
Exemplo n.º 2
0
 public T01RewardExp getReward(long rid) throws DaoException {
   String sql = "select * from t01_rewarded_exp where rid=?";
   if (logger.isDebugEnabled()) {
     logger.debug("**sql:" + sql);
     logger.debug("**id:" + rid);
   }
   IDao dao = DaoFactory.createDaoInstance();
   return dao.queryUniq("ijsp", sql, T01RewardExp.class, rid);
 }
Exemplo n.º 3
0
 public int getRewardCount(int rSid) throws DaoException {
   String sql = "select count(1) from t01_rewarded_exp where rSid = " + rSid;
   IDao dao = DaoFactory.createDaoInstance();
   int count = dao.queryCount("ijsp", sql);
   if (logger.isDebugEnabled()) {
     logger.debug("**sql:" + sql);
     logger.debug("**count:" + count);
   }
   return count;
 }
Exemplo n.º 4
0
  public List<T01RewardExp> listReward(int start, int length, int rSid) throws DaoException {
    String sql = "select * from t01_rewarded_exp where rSid = ? limit ?,?";
    logger.debug("**sql:" + sql);
    logger.debug("**rSid:" + rSid);
    logger.debug("**start:" + start);
    logger.debug("**length:" + length);

    IDao dao = DaoFactory.createDaoInstance();
    List<T01RewardExp> list =
        dao.query("ijsp", sql, T01RewardExp.class, new Object[] {rSid, start, length});
    return list;
  }
Exemplo n.º 5
0
 public int addReward(T01RewardExp t01RewardExp) throws DaoException {
   String sql = "insert into t01_rewarded_exp values (null,?,?,?,?)";
   if (logger.isDebugEnabled()) {
     logger.debug("**sql:" + sql);
     logger.debug("**rid:" + t01RewardExp);
   }
   IDao dao = DaoFactory.createDaoInstance();
   return dao.update(
       "ijsp",
       sql,
       new Object[] {
         t01RewardExp.getRSid(),
         t01RewardExp.getRewardName(),
         t01RewardExp.getRewardTime(),
         t01RewardExp.getOrganization()
       });
 }
Exemplo n.º 6
0
 public int updateReward(T01RewardExp t01RewardExp) throws DaoException {
   String sql =
       "update t01_rewarded_exp set rewardName=?, rewardTime=?,organization=? where rid = ?";
   if (logger.isDebugEnabled()) {
     logger.debug("**sql:" + sql);
     logger.debug("**rid:" + t01RewardExp);
   }
   IDao dao = DaoFactory.createDaoInstance();
   return dao.update(
       "ijsp",
       sql,
       new Object[] {
         t01RewardExp.getRewardName(),
         t01RewardExp.getRewardTime(),
         t01RewardExp.getOrganization(),
         t01RewardExp.getRid()
       });
 }