Commit 23ed153f by 朱海

[chg]d_person_record表按照店内停留时间和是否看车进行过滤

1 parent 7b1527d1
package com.viontech.keliu.dao;
import com.viontech.keliu.entity.SConfigParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
......@@ -17,6 +19,7 @@ import java.util.stream.Collectors;
* Time: 14:29
*/
@Repository
@Slf4j
public class ConfigParamDao {
@Resource
......@@ -24,7 +27,12 @@ public class ConfigParamDao {
public String getConfigParamByMallIdAndConfigKey(Long mallId, String configKey) {
String sql = "select mall_id, config_key, config_value from s_config_params where (mall_id = ? or mall_id is null) and config_key = ? order by mall_id asc limit 1;";
SConfigParam configParam = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(SConfigParam.class), mallId, configKey);
SConfigParam configParam = null;
try {
configParam = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(SConfigParam.class), mallId, configKey);
} catch (Exception e) {
log.error("获取配置异常", e);
}
return configParam == null ? null : configParam.getConfigValue();
}
......
......@@ -64,7 +64,7 @@ public class FaceRecognitionDao {
DateTimeParam dateTimeParam = dateTimeParamService.getDateTimeParam(mallId, countDate);
String sql = "select account_id,mall_id,gate_id,person_unid,direction,track_time,countdate as countDate,person_type,age,gender," +
"counttime as countTime from d_face_recognition where mall_id = :mallId and countdate between :startDate and :endDate and counttime >= :startTime and counttime < :endTime " +
"and direction in(-1,1,6) order by person_unid asc, counttime asc;";
"and direction in(-1,1,6) and person_type = 0 order by person_unid asc, counttime asc;";
Map<String, Object> queryMap = new HashMap<>();
queryMap.put("mallId", mallId);
queryMap.put("startDate", dateTimeParam.getStartDate());
......
package com.viontech.keliu.entity;
import lombok.Data;
import java.util.Date;
/**
* Created with IntelliJ IDEA.
*
* @author: zhuhai
* Date: 2023-03-28
* Time: 11:25
*/
@Data
public class CustomerGroupResult {
private Long gateId;
private Date countTime;
private long singleGroup; // 单人组
private long doubleGroup; // 双人组
private long doubleFamilyGroup; // 双人家庭组
private long doubleLoverGroup; // 双人情侣组
private long doublePartnerGroup; // 双人伙伴组
private long multipleGroup; // 多人组
private long multipleFamilyGroup; // 多人家庭组
private long multiplePartnerGroup; // 多人伙伴组
public long getGroupNum() {
return singleGroup + doubleGroup + multipleGroup;
}
}
\ No newline at end of file
package com.viontech.keliu.entity;
import lombok.Data;
import java.util.Date;
/**
* Created with IntelliJ IDEA.
*
* @author: zhuhai
* Date: 2024-08-13
* Time: 18:12
*/
@Data
public class DMallDayFaceRecognitionSta {
private Long mallId;
private Long personCount;
private Long customCount;
private Long maleCount;
private Long femaleCount;
private String maleStage;
private String femaleStage;
private Date counttime;
private int[] maleStageArr;
private int[] femaleStageArr;
private Date countdate;
private Long groupNum;
private Long singleGroupNum;
private Long doubleGroupNum;
private Long multipleGroupNum;
private Long familyGroupNum;
/**
* 情侣组
*/
private Long loverGroupNum;
/**
* 伙伴组
*/
private Long partnerGroupNum;
private Long staffCount;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!