Esempio n. 1
0
  @Override
  public String isPastDut(Integer actId) {
    // 判断招聘信息是否到截止日期了
    String endDate = activityDAO.queryByIdGetEndDate(actId);
    String nowDate = DateUtils.getCurrentGaDate();
    long e = Long.valueOf(endDate);
    long n = Long.valueOf(nowDate);
    if (e < n) {
      return "isPastDue"; // 过期
    }

    return "notPastDue";
  }
Esempio n. 2
0
  @Override
  public String add(Activity activity) {
    activity.setPublishTime(DateUtils.getCurrentGaDate());
    activity.setStatus(SysCode.ActivityStatus.WAIT);
    String uuid = UUID.randomUUID().toString();
    activity.setActivityUuid(uuid);

    String endDate = activity.getEndDate();
    endDate = endDate.replaceAll("-", "").replaceAll(":", "").replaceAll(" ", "") + "00";
    activity.setEndDate(endDate);

    int res = activityDAO.add(activity);
    if (res == 1) {
      return uuid;
    } else {
      return "";
    }
  }