示例#1
0
 public boolean delete(int id) {
   PaidDetail paidDetail = paidDao.find(id);
   boolean flag = paidDao.delete(id);
   if (flag) {
     log.debug(MyFactory.getUserService().getCurrentUserName() + " delete " + paidDetail);
   }
   return flag;
 }
示例#2
0
 public boolean censored(int id, boolean pass) {
   boolean flag;
   PaidDetail paidDetail = paidDao.find(id);
   paidDetail.setCensored(pass ? Constants.CENSORED_PASS : Constants.CENSORED_REFUSE);
   flag = paidDao.update(paidDetail);
   if (flag) {
     log.debug(MyFactory.getUserService().getCurrentUserName() + " censored " + paidDetail);
   }
   return flag;
 }
示例#3
0
 public boolean update(PaidDetail paidDetail) {
   int id = paidDetail.getId();
   boolean flag = false;
   PaidDetail old = paidDao.find(id);
   if (MyFactory.getResourceService().hasRight(MyFactory.getCurrentUser(), Resource.CENSORED)) {
     paidDetail.setCensored(Constants.CENSORED_PASS);
   } else {
     paidDetail.setCensored(Constants.CENSORED_ORIGINAL);
   }
   if (flag) {
     log.debug(
         MyFactory.getUserService().getCurrentUserName() + " update " + old + " to " + paidDetail);
   }
   return flag;
 }