Stringsql="select unid,person_unid,channel_serialnum,body_pic,countdate,counttime,direction,gate_id from d_face_recognition where countdate=? and mall_id=?";
//方向过滤
if(StringUtils.isNotBlank(direction)){
...
...
@@ -67,6 +68,28 @@ public class KeliuRepository {
}
sql=sql+" and device_serialnum in ("+sb.toString()+")";
}
if(StringUtils.isNotBlank(channelSerialNum)){
String[]channels=channelSerialNum.split(",");
StringBuildersb=newStringBuilder();
for(Stringchannel:channels){
if(sb.length()>0){
sb.append(",");
}
sb.append("'");
sb.append(channel);
sb.append("'");
}
sql=sql+" and channel_serialnum in ("+sb.toString()+")";
}
if(startTime!=null){
sql=sql+" and counttime >= '"+DateUtil.format("yyyy-MM-dd HH:mm:ss",startTime)+"'";
}
if(endTime!=null){
sql=sql+" and counttime <= '"+DateUtil.format("yyyy-MM-dd HH:mm:ss",endTime)+"'";