Commit 42638e15 by wenshuaiying

根据store的字段调整sql及实体

1 parent fb11a55a
...@@ -62,6 +62,11 @@ ...@@ -62,6 +62,11 @@
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>5.8.20</version> <version>5.8.20</version>
</dependency> </dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -2,33 +2,33 @@ package com.viontech.keliu.constants; ...@@ -2,33 +2,33 @@ package com.viontech.keliu.constants;
public class KafkaConstants { public class KafkaConstants {
// 商业人脸抓拍重试topic // 商业人脸抓拍重试topic
public static final String TOPIC_MALL_RETRY_FACECAPTURE = "Mall_Retry_FaceCapture"; public static final String TOPIC_STORE_RETRY_FACECAPTURE = "Store_Retry_FaceCapture";
// 商业人员标签重试topic // 商业人员标签重试topic
public static final String TOPIC_MALL_RETRY_PERSONLABEL = "Mall_Retry_PersonLabel"; public static final String TOPIC_STORE_RETRY_PERSONLABEL = "Store_Retry_PersonLabel";
/** /**
* d_gate_minute_count_data统计数据的topic * d_gate_minute_count_data统计数据的topic
*/ */
public static final String MALL_GATE_MINUTE_COUNT_DATA_TOPIC = "Mall_gate_minute_count_data"; public static final String STORE_GATE_MINUTE_COUNT_DATA_TOPIC = "Store_gate_minute_count_data";
/** /**
* d_gate_hour_count_data统计数据的topic * d_gate_hour_count_data统计数据的topic
*/ */
public static final String MALL_GATE_HOUR_COUNT_DATA_TOPIC = "Mall_gate_hour_count_data"; public static final String STORE_GATE_HOUR_COUNT_DATA_TOPIC = "Store_gate_hour_count_data";
/** /**
* d_gate_day_count_data统计数据的topic * d_gate_day_count_data统计数据的topic
*/ */
public static final String MALL_GATE_DAY_COUNT_DATA_TOPIC = "Mall_gate_day_count_data"; public static final String STORE_GATE_DAY_COUNT_DATA_TOPIC = "Store_gate_day_count_data";
/** /**
* d_zone_minute_count_data统计数据的topic * d_zone_minute_count_data统计数据的topic
*/ */
public static final String MALL_ZONE_MINUTE_COUNT_DATA_TOPIC = "Mall_zone_minute_count_data"; public static final String STORE_ZONE_MINUTE_COUNT_DATA_TOPIC = "Store_zone_minute_count_data";
/** /**
* d_zone_hour_count_data统计数据的topic * d_zone_hour_count_data统计数据的topic
*/ */
public static final String MALL_ZONE_HOUR_COUNT_DATA_TOPIC = "Mall_zone_hour_count_data"; public static final String STORE_ZONE_HOUR_COUNT_DATA_TOPIC = "Store_zone_hour_count_data";
/** /**
* d_zone_day_count_data统计数据的topic * d_zone_day_count_data统计数据的topic
*/ */
public static final String MALL_ZONE_DAY_COUNT_DATA_TOPIC = "Mall_zone_day_count_data"; public static final String STORE_ZONE_DAY_COUNT_DATA_TOPIC = "Store_zone_day_count_data";
public static final String MALL_DATA_STATISTICS_TOPIC = "Mall_dataStatistics"; public static final String STORE_DATA_STATISTICS_TOPIC = "Store_dataStatistics";
} }
...@@ -40,7 +40,7 @@ public class MallDataStatisticsConsumer { ...@@ -40,7 +40,7 @@ public class MallDataStatisticsConsumer {
private ExecutorService executorService = ThreadUtil.newFixedExecutor(1, 1024, "dataStatistics-", true); private ExecutorService executorService = ThreadUtil.newFixedExecutor(1, 1024, "dataStatistics-", true);
@KafkaListener(topics = KafkaConstants.MALL_DATA_STATISTICS_TOPIC @KafkaListener(topics = KafkaConstants.STORE_DATA_STATISTICS_TOPIC
, autoStartup = "${vion.consumer.mallDataStatistics.autoStartup:false}" , autoStartup = "${vion.consumer.mallDataStatistics.autoStartup:false}"
, groupId = "MallDataStiatistics" , groupId = "MallDataStiatistics"
, concurrency = "${vion.consumer.mallDataStatistics.concurrency:1}") , concurrency = "${vion.consumer.mallDataStatistics.concurrency:1}")
......
...@@ -87,7 +87,7 @@ public class MallFaceCaptureConsumer { ...@@ -87,7 +87,7 @@ public class MallFaceCaptureConsumer {
log.error("处理Mall_FaceCapture[{}], batchSize={}, batchInsert.Exception={}", entry.getKey(), faceDataList.size(), ex.getMessage()); log.error("处理Mall_FaceCapture[{}], batchSize={}, batchInsert.Exception={}", entry.getKey(), faceDataList.size(), ex.getMessage());
// 批量插入重试队列 // 批量插入重试队列
long startSendTime = System.currentTimeMillis(); long startSendTime = System.currentTimeMillis();
kafkaProducerService.sendMessages(KafkaConstants.TOPIC_MALL_RETRY_FACECAPTURE, faceDataList); kafkaProducerService.sendMessages(KafkaConstants.TOPIC_STORE_RETRY_FACECAPTURE, faceDataList);
log.info("处理Mall_FaceCapture[{}], batchSendFinish, {}条,耗时:{} ms", entry.getKey(), faceDataList.size(), System.currentTimeMillis() - startSendTime); log.info("处理Mall_FaceCapture[{}], batchSendFinish, {}条,耗时:{} ms", entry.getKey(), faceDataList.size(), System.currentTimeMillis() - startSendTime);
} }
} }
...@@ -132,7 +132,7 @@ public class MallFaceCaptureConsumer { ...@@ -132,7 +132,7 @@ public class MallFaceCaptureConsumer {
log.error("处理Mall_FaceCapture分批处理, batchSize={}, batchInsert.Exception={}", faceDataList.size(), ex.getMessage()); log.error("处理Mall_FaceCapture分批处理, batchSize={}, batchInsert.Exception={}", faceDataList.size(), ex.getMessage());
// 批量插入重试队列 // 批量插入重试队列
long startSendTime = System.currentTimeMillis(); long startSendTime = System.currentTimeMillis();
kafkaProducerService.sendMessages(KafkaConstants.TOPIC_MALL_RETRY_FACECAPTURE, faceDataList); kafkaProducerService.sendMessages(KafkaConstants.TOPIC_STORE_RETRY_FACECAPTURE, faceDataList);
log.info("处理Mall_FaceCapture分批处理, batchSendFinish, {}条,耗时:{} ms", faceDataList.size(), System.currentTimeMillis() - startSendTime); log.info("处理Mall_FaceCapture分批处理, batchSendFinish, {}条,耗时:{} ms", faceDataList.size(), System.currentTimeMillis() - startSendTime);
} }
}); });
......
...@@ -37,7 +37,7 @@ public class MallGateMinuteCountDataConsumer { ...@@ -37,7 +37,7 @@ public class MallGateMinuteCountDataConsumer {
@Resource @Resource
private SpeedStatService speedStatService; private SpeedStatService speedStatService;
@KafkaListener(topics = KafkaConstants.MALL_GATE_MINUTE_COUNT_DATA_TOPIC @KafkaListener(topics = KafkaConstants.STORE_GATE_MINUTE_COUNT_DATA_TOPIC
, autoStartup = "${vion.consumer.mallGateMinuteCount.autoStartup:false}" , autoStartup = "${vion.consumer.mallGateMinuteCount.autoStartup:false}"
, groupId = "MallGateMinuteCountToDb" , groupId = "MallGateMinuteCountToDb"
, concurrency = "${vion.consumer.mallGateMinuteCount.concurrency:1}") , concurrency = "${vion.consumer.mallGateMinuteCount.concurrency:1}")
......
...@@ -86,7 +86,7 @@ public class MallPersonLabelConsumer { ...@@ -86,7 +86,7 @@ public class MallPersonLabelConsumer {
log.error("处理Mall_PersonLabel[{}], batchSize={}, batchInsert.Exception={}", entry.getKey(), labelList.size(), ex.getMessage()); log.error("处理Mall_PersonLabel[{}], batchSize={}, batchInsert.Exception={}", entry.getKey(), labelList.size(), ex.getMessage());
// 批量插入重试队列 // 批量插入重试队列
long startSendTime = System.currentTimeMillis(); long startSendTime = System.currentTimeMillis();
kafkaProducerService.sendMessages(KafkaConstants.TOPIC_MALL_RETRY_PERSONLABEL, labelList); kafkaProducerService.sendMessages(KafkaConstants.TOPIC_STORE_RETRY_PERSONLABEL, labelList);
log.info("处理Mall_PersonLabel[{}], batchSendFinish耗时:{} ms", entry.getKey(), System.currentTimeMillis() - startSendTime); log.info("处理Mall_PersonLabel[{}], batchSendFinish耗时:{} ms", entry.getKey(), System.currentTimeMillis() - startSendTime);
} }
} }
...@@ -131,7 +131,7 @@ public class MallPersonLabelConsumer { ...@@ -131,7 +131,7 @@ public class MallPersonLabelConsumer {
log.error("处理Mall_PersonLabel分批处理, batchSize={}, batchInsert.Exception={}", labelList.size(), ex.getMessage()); log.error("处理Mall_PersonLabel分批处理, batchSize={}, batchInsert.Exception={}", labelList.size(), ex.getMessage());
// 批量插入重试队列 // 批量插入重试队列
long startSendTime = System.currentTimeMillis(); long startSendTime = System.currentTimeMillis();
kafkaProducerService.sendMessages(KafkaConstants.TOPIC_MALL_RETRY_PERSONLABEL, labelList); kafkaProducerService.sendMessages(KafkaConstants.TOPIC_STORE_RETRY_PERSONLABEL, labelList);
log.info("处理Mall_PersonLabel分批处理, batchSendFinish, {}条,耗时:{} ms", labelList.size(), System.currentTimeMillis() - startSendTime); log.info("处理Mall_PersonLabel分批处理, batchSendFinish, {}条,耗时:{} ms", labelList.size(), System.currentTimeMillis() - startSendTime);
} }
}); });
......
...@@ -33,7 +33,7 @@ public class MallRetryFaceCaptureConsumer { ...@@ -33,7 +33,7 @@ public class MallRetryFaceCaptureConsumer {
@Resource @Resource
private SpeedStatService speedStatService; private SpeedStatService speedStatService;
@KafkaListener(topics = KafkaConstants.TOPIC_MALL_RETRY_FACECAPTURE @KafkaListener(topics = KafkaConstants.TOPIC_STORE_RETRY_FACECAPTURE
, autoStartup = "${vion.consumer.mallRetryFaceCapture.autoStartup:false}" , autoStartup = "${vion.consumer.mallRetryFaceCapture.autoStartup:false}"
, groupId = "MallRetryFaceCaptureToDb" , groupId = "MallRetryFaceCaptureToDb"
, concurrency = "${vion.consumer.mallRetryFaceCapture.concurrency:1}") , concurrency = "${vion.consumer.mallRetryFaceCapture.concurrency:1}")
......
...@@ -33,7 +33,7 @@ public class MallRetryPersonLabelConsumer { ...@@ -33,7 +33,7 @@ public class MallRetryPersonLabelConsumer {
@Resource @Resource
private SpeedStatService speedStatService; private SpeedStatService speedStatService;
@KafkaListener(topics = KafkaConstants.TOPIC_MALL_RETRY_PERSONLABEL @KafkaListener(topics = KafkaConstants.TOPIC_STORE_RETRY_PERSONLABEL
, autoStartup = "${vion.consumer.mallRetryPersonLabel.autoStartup:false}" , autoStartup = "${vion.consumer.mallRetryPersonLabel.autoStartup:false}"
, groupId = "MallRetryPersonLabelToDb" , groupId = "MallRetryPersonLabelToDb"
, concurrency = "${vion.consumer.mallRetryPersonLabel.concurrency:1}") , concurrency = "${vion.consumer.mallRetryPersonLabel.concurrency:1}")
......
...@@ -15,8 +15,8 @@ public class DFaceRecognitionDao { ...@@ -15,8 +15,8 @@ public class DFaceRecognitionDao {
@Resource @Resource
private NamedParameterJdbcTemplate namedParameterJdbcTemplate; private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
public final static String INSERT_FACE_RECOGNITION_SQL = "INSERT INTO d_face_recognition (device_id, channel_id, gate_id, person_unid,person_type, device_serialnum, channel_serialnum, face_pic, body_pic, mood, age, gender, direction, counttime, countdate, mall_id, account_id,status,track_info,track_time,happy_conf,unid,history_arrival_count,face_score,face_type,face_pic_num,body_pic_num ,face_feature_type ,body_feature_type,body_type,intersect_x,intersect_y,intersect_time,age_group,duration,event_image,event_coordinate,pay_type,pick_up_goods,together_count,event_video) VALUES " public final static String INSERT_FACE_RECOGNITION_SQL = "INSERT INTO d_face_recognition (device_id, channel_id, gate_id, person_unid,person_type, device_serialnum, channel_serialnum, face_pic, body_pic, mood, age, gender, direction, counttime, countdate, mall_id, account_id,status,track_info,track_time,happy_conf,unid,history_arrival_count,face_score,face_type,face_pic_num,body_pic_num ,face_feature_type ,body_feature_type,body_type,intersect_x,intersect_y,intersect_time,age_group,duration,event_image,event_coordinate,event_video,body_score,channel_product_id,focus,is_across,product_id,today_arrival_count) VALUES "
+ "(:deviceId, :channelId, :gateId, :personUnid, :personType ,:deviceSerialnum, :channelSerialnum, :facePic, :bodyPic, :mood, :age, :gender, :direction, :counttime, :countdate, :mallId, :accountId,:status,:trackInfo,:trackTime,:happyConf,:unid,:historyArrivalCount,:faceScore,:faceType,:facePicNum,:bodyPicNum,:faceFeatureType,:bodyFeatureType,:bodyType,:intersectX,:intersectY,:intersectTime,:ageGroup,:duration,:eventImage,:eventCoordinate,:payType,:pickUpGoods,:togetherCount,:eventVideo);"; + "(:deviceId, :channelId, :gateId, :personUnid, :personType ,:deviceSerialnum, :channelSerialnum, :facePic, :bodyPic, :mood, :age, :gender, :direction, :counttime, :countdate, :mallId, :accountId,:status,:trackInfo,:trackTime,:happyConf,:unid,:historyArrivalCount,:faceScore,:faceType,:facePicNum,:bodyPicNum,:faceFeatureType,:bodyFeatureType,:bodyType,:intersectX,:intersectY,:intersectTime,:ageGroup,:duration,:eventImage,:eventCoordinate,:eventVideo,:bodyScore,:channelProductId,:focus,:isAcross,:productId,:todayArrivalCount);";
public void insert(FaceDataContent faceDataContent) { public void insert(FaceDataContent faceDataContent) {
SqlParameterSource parameterSource = new BeanPropertySqlParameterSource(faceDataContent); SqlParameterSource parameterSource = new BeanPropertySqlParameterSource(faceDataContent);
......
...@@ -16,9 +16,9 @@ public class DPersonLabelDao { ...@@ -16,9 +16,9 @@ public class DPersonLabelDao {
private NamedParameterJdbcTemplate namedParameterJdbcTemplate; private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
private final static String INSERT_PERSON_LABEL_SQL = "INSERT INTO d_person_label (recognition_unid, account_id, mall_id, count_date, count_time, hair_style,hair_color,hat,hat_color,glasses,mask,earring,jacket_type, jacket_color, " + private final static String INSERT_PERSON_LABEL_SQL = "INSERT INTO d_person_label (recognition_unid, account_id, mall_id, count_date, count_time, hair_style,hair_color,hat,hat_color,glasses,mask,earring,jacket_type, jacket_color, " +
"bottoms_type, bottoms_color,suit_type,suit_color,clothing_brand,necklace,watch,bracelet,phone,rucksack_type,rucksack_color,handbag_type,handbag_color,shopping_bag_type,shopping_bag_color,shopping_bag_num,shopping_bag_logo1,shopping_bag_logo1_score,shopping_bag_logo2,shopping_bag_logo2_score,shoe_type,shoe_color) " "bottoms_type, bottoms_color,suit_type,suit_color,clothing_brand,necklace,watch,bracelet,phone,rucksack_type,rucksack_color,handbag_type,handbag_color,shopping_bag_type,shopping_bag_color,shoe_type,shoe_color,coat_color,coat_type) "
+ "VALUES (:recognitionUnid, :accountId, :mallId,:countDate,:countTime,:hairStyle,:hairColor,:hat,:hatColor,:glasses,:mask,:earring,:jacketType,:jacketColor,:bottomsType,:bottomsColor,:suitType,:suitColor,:clothingBrand,:necklace," + + "VALUES (:recognitionUnid, :accountId, :mallId,:countDate,:countTime,:hairStyle,:hairColor,:hat,:hatColor,:glasses,:mask,:earring,:jacketType,:jacketColor,:bottomsType,:bottomsColor,:suitType,:suitColor,:clothingBrand,:necklace," +
":watch,:bracelet,:phone,:rucksackType,:rucksackColor,:handbagType,:handbagColor,:shoppingBagType,:shoppingBagColor,:shoppingBagNum,:shoppingBagLogo1,:shoppingBagLogo1Score,:shoppingBagLogo2,:shoppingBagLogo2Score,:shoeType,:shoeColor);"; ":watch,:bracelet,:phone,:rucksackType,:rucksackColor,:handbagType,:handbagColor,:shoppingBagType,:shoppingBagColor,:shoeType,:shoeColor,:coatColor,:coatType);";
public void insert(PersonLabelContent personLabel) { public void insert(PersonLabelContent personLabel) {
SqlParameterSource parameterSource = new BeanPropertySqlParameterSource(personLabel); SqlParameterSource parameterSource = new BeanPropertySqlParameterSource(personLabel);
......
...@@ -15,7 +15,7 @@ public class DZoneMinuteCountDataDao { ...@@ -15,7 +15,7 @@ public class DZoneMinuteCountDataDao {
@Resource @Resource
private NamedParameterJdbcTemplate namedParameterJdbcTemplate; private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
public final static String INSERT_SQL = "INSERT INTO d_zone_minute_count_data(mall_id, account_id, floor_id, zone_id, innum, outnum, outside_innum, outside_outnum, countdate, counttime, hour,bunk_no) VALUES (:mallId, :accountId, :floorId, :zoneId, :innum, :outnum, :outsideInnum, :outsideOutnum, :countdate, :counttime, :hour, :bunkNo);"; public final static String INSERT_SQL = "INSERT INTO d_zone_minute_count_data(mall_id, account_id, floor_id, zone_id, innum, outnum, outside_innum, outside_outnum, countdate, counttime, hour) VALUES (:mallId, :accountId, :floorId, :zoneId, :innum, :outnum, :outsideInnum, :outsideOutnum, :countdate, :counttime, :hour);";
public final static String UPDATE_SQL = "UPDATE d_zone_minute_count_data SET modify_time=now(),innum=:innum,outnum=:outnum,outside_innum=:outsideInnum,outside_outnum=:outsideOutnum where mall_id=:mallId and countdate=:countdate and zone_id=:zoneId and counttime = :counttime;"; public final static String UPDATE_SQL = "UPDATE d_zone_minute_count_data SET modify_time=now(),innum=:innum,outnum=:outnum,outside_innum=:outsideInnum,outside_outnum=:outsideOutnum where mall_id=:mallId and countdate=:countdate and zone_id=:zoneId and counttime = :counttime;";
public void insert(ZoneCountData data) { public void insert(ZoneCountData data) {
......
...@@ -158,14 +158,14 @@ public class FaceDataContent { ...@@ -158,14 +158,14 @@ public class FaceDataContent {
*/ */
private Long duration; private Long duration;
/** // /**
* 支付方式 0:未支付 1:pos支付 2:手机支付 // * 支付方式 0:未支付 1:pos支付 2:手机支付
*/ // */
private Integer payType; // private Integer payType;
/** // /**
* 是否提货 // * 是否提货
*/ // */
private Integer pickUpGoods; // private Integer pickUpGoods;
/** /**
* 事件图片 * 事件图片
*/ */
...@@ -174,10 +174,19 @@ public class FaceDataContent { ...@@ -174,10 +174,19 @@ public class FaceDataContent {
* 事件图片头脚坐标 * 事件图片头脚坐标
*/ */
private String eventCoordinate; private String eventCoordinate;
/** // /**
* 收银事件结伴人数 // * 收银事件结伴人数
*/ // */
private Integer togetherCount; // private Integer togetherCount;
private String eventVideo; private String eventVideo;
private Long bodyScore;
private Long channelProductId;
private Integer focus;
private Integer isAcross;
private Long productId;
private Short todayArrivalCount;
} }
...@@ -141,30 +141,30 @@ public class PersonLabelContent { ...@@ -141,30 +141,30 @@ public class PersonLabelContent {
*/ */
private Integer shoppingBagColor; private Integer shoppingBagColor;
/** // /**
* 提袋数量 // * 提袋数量
*/ // */
private Integer shoppingBagNum; // private Integer shoppingBagNum;
/** // /**
* 提袋1的Logo // * 提袋1的Logo
*/ // */
private String shoppingBagLogo1; // private String shoppingBagLogo1;
//
/** // /**
* 提袋1Logo的置信度 // * 提袋1Logo的置信度
*/ // */
private Float shoppingBagLogo1Score; // private Float shoppingBagLogo1Score;
//
/** // /**
* 提袋2的Logo // * 提袋2的Logo
*/ // */
private String shoppingBagLogo2; // private String shoppingBagLogo2;
//
/** // /**
* 提袋2Logo的置信度 // * 提袋2Logo的置信度
*/ // */
private Float shoppingBagLogo2Score; // private Float shoppingBagLogo2Score;
/** /**
* 鞋子类型 * 鞋子类型
...@@ -175,4 +175,7 @@ public class PersonLabelContent { ...@@ -175,4 +175,7 @@ public class PersonLabelContent {
* 鞋子颜色 * 鞋子颜色
*/ */
private Integer shoeColor; private Integer shoeColor;
private Integer coatColor;
private Integer coatType;
} }
...@@ -66,10 +66,10 @@ public class ZoneCountData { ...@@ -66,10 +66,10 @@ public class ZoneCountData {
*/ */
private Integer hour; private Integer hour;
/** // /**
* 铺位号 // * 铺位号
*/ // */
private Long bunkNo; // private Long bunkNo;
/** /**
* 数据操作类型:insert:插入,update:更新 * 数据操作类型:insert:插入,update:更新
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!