int sendCount = smsRecordService.count(Cnd.where("sendPhone", "=", phone));
然后我在接一个语句判断发送时间是否在今天, 这样子要怎么写啊,大佬
好了嘻嘻嘻
int sendCount = smsRecordService.count(Cnd.where("sendPhone", "=", phone).
and("sendTime","between",new Object[]{DateUtil.getQueryTimeByStart(),DateUtil.getQueryTimeByEnd()}));
public static String getQueryTimeByStart(){
return getDate()+" 00:00:00";
}
public static String getQueryTimeByEnd(){
return getDate()+" 23:59:59";
}
public static String getDate() {
return getDate("yyyy-MM-dd");
}