}
public ModelAndView findVideosByPage(HttpServletRequest request, HttpServletResponse response, FileProperties fp) { ModelAndView model = new ModelAndView("/video/video_list");Map<String, Object> params = new HashMap<String, Object>(3);if (StringUtils.isNotBlank(fp.getBusiId())) { params.put("busiId", fp.getBusiId());}if (StringUtils.isNotBlank(fp.getApplyName())) { params.put("applyName", fp.getApplyName());}if (fp.getApplyDateStart() != null && StringUtils.isNotBlank(fp.getApplyDateStart())) { params.put("applyDateStart", DateUtil.parseDate(fp.getApplyDateStart()));} else { params.put("applyDateStart", DateUtil.addDay(new Date(), -7));}if (fp.getApplyDateEnd() != null && StringUtils.isNotBlank(fp.getApplyDateEnd())) { params.put("applyDateEnd", DateUtil.parseDate(fp.getApplyDateEnd()));} else { params.put("applyDateEnd", DateUtil.format(new Date()));}fp.setRows(fastfileVideoService.selectRows(params));model.addObject("fastfileVideoInfoPage", fp);List<FastfileVideoInfo> fastfileVideoInfos = fastfileVideoService.selectByPage(fp);model.addObject("fastfileVideoInfos", fastfileVideoInfos);model.addObject("applyDateStart", DateUtil.format(DateUtil.addDay(new Date(), -7)));model.addObject("applyDateEnd", DateUtil.format(new Date()));return model;}
<select id="selectByPage" resultMap="BaseResultMap" parameterType="cn.tsjinrong.fastfile.util.FileProperties">select<include refid="Base_Column_List" />from fastfile_video_info where 1=1<if test="busiId != null and busiId !=''">and busi_id = #{busiId,jdbcType=VARCHAR}</if><if test="applyName != null and applyName !=''">and apply_name=#{applyName,jdbcType=VARCHAR}</if><if test="applyDateStart != null and applyDateStart !=''">and apply_date >= #{applyDateStart,jdbcType=DATE}</if><if test="applyDateEnd != null and applyDateEnd !=''">and apply_date <= #{applyDateEnd,jdbcType=DATE}</if>and del_flag = 0order by apply_date desc limit #{beginRow},#{pageSize}</select>