public String init() { String startDate = DateUtil.getDateOfXdaysAgo(30); String endDate = DateUtil.getToday(); form = new ZjbForm(); form.setStartTime(startDate); form.setEndTime(endDate); form.setLidu(Constants.DAILY); ZjbDTO dto = new ZjbDTO(); dto.setStartDate(DateUtil.parseDate(startDate, "yyyy-MM-dd")); dto.setEndDate(DateUtil.parseDate(endDate, "yyyy-MM-dd")); dto.setLidu(form.getLidu()); channelserviceList = service.getChannelserviceList(dto); ServletActionContext.getRequest() .getSession() .setAttribute(Constants.NEARME_SESSION_REPROT_DATA, channelserviceList); LogUtil.log(dto, TAG); return Action.SUCCESS; }
public String query() { Date startDate = form.getStartDate(); Date endDate = form.getEndDate(); String lidu = form.getLidu(); String appVersion = form.getAppVersion(); String qudao = form.getQudao(); if (startDate == null || endDate == null || startDate.after(endDate)) { return Action.SUCCESS; } ZjbDTO dto = new ZjbDTO(); dto.setStartDate(startDate); dto.setEndDate(endDate); dto.setLidu(lidu); dto.setAppVersion(appVersion); dto.setQudao(qudao); channelserviceList = service.getChannelserviceList(dto); ServletActionContext.getRequest() .getSession() .setAttribute(Constants.NEARME_SESSION_REPROT_DATA, channelserviceList); LogUtil.log(dto, TAG); return Action.SUCCESS; }