同一参数与数据库两个字段同时比较

app想要在进入是显示弹窗,用当前时间与表中字段上架时间和下架时间比较,大于等于上架时间小于等于下架时间,日期格式年月日时分秒
public List<Map<String, String>> selectNotice() {
    List<Map<String, String>> list = new ArrayList();
  QueryWrapper<TNotice> queryWrapper = new QueryWrapper();
    Date date = new Date();
    queryWrapper.eq("status","1").le("upTime", date).ge("downTime",date);
    List<TNotice> tNotices =tNoticeMapper.selectList(queryWrapper);
    for(TNotice t :  tNotices){
        Map<String, String> map = new HashMap();
        map.put("id", t.getId());
        map.put("title", t.getNTitle());
        map.put("noticeType",t.getNoticeType());
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String uptime = format.format(t.getUpTime());
        String downtime=format.format(t.getDownTime());
        map.put("uptime",uptime);
        map.put("downTime",downtime);
        String noticeType =t.getNoticeType();
        if ("4".equals(noticeType)) {
            map.put("content",t.getNContent());

        }else {
            String url = COSUtils.getFileUrl(t.getNContent(), cosData);
            map.put("content", url);
        }

        list.add(map);
    }

    return list;
}

}

小于等于和大于等于不能同时生效

##用querywrapper

用当前时间与表中字段上架时间和下架时间比较,查出满足大于等于上架时间小于等于下架时间,表中格式日期格式年月日时分秒,