Date data = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String time = sdf.format(data); int res1 = branchStartTime.compareTo(time); int res2 = time.compareTo(branchEndTime); if (res1 > 0 || res2 > 0) { result.put("result", 0); result.put("message", "用户所属机构现在无权限登录"); return result.toJSONString(); }
O(∩_∩)O开心就好O(∩_∩)O