Commit 42638e15 by wenshuaiying

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

1 parent fb11a55a
......@@ -62,6 +62,11 @@
<artifactId>hutool-all</artifactId>
<version>5.8.20</version>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
......
......@@ -2,33 +2,33 @@ package com.viontech.keliu.constants;
public class KafkaConstants {
// 商业人脸抓拍重试topic
public static final String TOPIC_MALL_RETRY_FACECAPTURE = "Mall_Retry_FaceCapture";
public static final String TOPIC_STORE_RETRY_FACECAPTURE = "Store_Retry_FaceCapture";
// 商业人员标签重试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
*/
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
*/
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
*/
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
*/
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
*/
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
*/
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 {
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}"
, groupId = "MallDataStiatistics"
, concurrency = "${vion.consumer.mallDataStatistics.concurrency:1}")
......
......@@ -87,7 +87,7 @@ public class MallFaceCaptureConsumer {
log.error("处理Mall_FaceCapture[{}], batchSize={}, batchInsert.Exception={}", entry.getKey(), faceDataList.size(), ex.getMessage());
// 批量插入重试队列
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);
}
}
......@@ -132,7 +132,7 @@ public class MallFaceCaptureConsumer {
log.error("处理Mall_FaceCapture分批处理, batchSize={}, batchInsert.Exception={}", faceDataList.size(), ex.getMessage());
// 批量插入重试队列
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);
}
});
......
......@@ -37,7 +37,7 @@ public class MallGateMinuteCountDataConsumer {
@Resource
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}"
, groupId = "MallGateMinuteCountToDb"
, concurrency = "${vion.consumer.mallGateMinuteCount.concurrency:1}")
......
......@@ -86,7 +86,7 @@ public class MallPersonLabelConsumer {
log.error("处理Mall_PersonLabel[{}], batchSize={}, batchInsert.Exception={}", entry.getKey(), labelList.size(), ex.getMessage());
// 批量插入重试队列
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);
}
}
......@@ -131,7 +131,7 @@ public class MallPersonLabelConsumer {
log.error("处理Mall_PersonLabel分批处理, batchSize={}, batchInsert.Exception={}", labelList.size(), ex.getMessage());
// 批量插入重试队列
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);
}
});
......
......@@ -33,7 +33,7 @@ public class MallRetryFaceCaptureConsumer {
@Resource
private SpeedStatService speedStatService;
@KafkaListener(topics = KafkaConstants.TOPIC_MALL_RETRY_FACECAPTURE
@KafkaListener(topics = KafkaConstants.TOPIC_STORE_RETRY_FACECAPTURE
, autoStartup = "${vion.consumer.mallRetryFaceCapture.autoStartup:false}"
, groupId = "MallRetryFaceCaptureToDb"
, concurrency = "${vion.consumer.mallRetryFaceCapture.concurrency:1}")
......
......@@ -33,7 +33,7 @@ public class MallRetryPersonLabelConsumer {
@Resource
private SpeedStatService speedStatService;
@KafkaListener(topics = KafkaConstants.TOPIC_MALL_RETRY_PERSONLABEL
@KafkaListener(topics = KafkaConstants.TOPIC_STORE_RETRY_PERSONLABEL
, autoStartup = "${vion.consumer.mallRetryPersonLabel.autoStartup:false}"
, groupId = "MallRetryPersonLabelToDb"
, concurrency = "${vion.consumer.mallRetryPersonLabel.concurrency:1}")
......
......@@ -15,8 +15,8 @@ public class DFaceRecognitionDao {
@Resource
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 "
+ "(: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);";
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,:eventVideo,:bodyScore,:channelProductId,:focus,:isAcross,:productId,:todayArrivalCount);";
public void insert(FaceDataContent faceDataContent) {
SqlParameterSource parameterSource = new BeanPropertySqlParameterSource(faceDataContent);
......
......@@ -16,9 +16,9 @@ public class DPersonLabelDao {
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, " +
"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," +
":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) {
SqlParameterSource parameterSource = new BeanPropertySqlParameterSource(personLabel);
......
......@@ -15,7 +15,7 @@ public class DZoneMinuteCountDataDao {
@Resource
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 void insert(ZoneCountData data) {
......
......@@ -158,14 +158,14 @@ public class FaceDataContent {
*/
private Long duration;
/**
* 支付方式 0:未支付 1:pos支付 2:手机支付
*/
private Integer payType;
/**
* 是否提货
*/
private Integer pickUpGoods;
// /**
// * 支付方式 0:未支付 1:pos支付 2:手机支付
// */
// private Integer payType;
// /**
// * 是否提货
// */
// private Integer pickUpGoods;
/**
* 事件图片
*/
......@@ -174,10 +174,19 @@ public class FaceDataContent {
* 事件图片头脚坐标
*/
private String eventCoordinate;
/**
* 收银事件结伴人数
*/
private Integer togetherCount;
// /**
// * 收银事件结伴人数
// */
// private Integer togetherCount;
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 {
*/
private Integer shoppingBagColor;
/**
* 提袋数量
*/
private Integer shoppingBagNum;
/**
* 提袋1的Logo
*/
private String shoppingBagLogo1;
/**
* 提袋1Logo的置信度
*/
private Float shoppingBagLogo1Score;
/**
* 提袋2的Logo
*/
private String shoppingBagLogo2;
/**
* 提袋2Logo的置信度
*/
private Float shoppingBagLogo2Score;
// /**
// * 提袋数量
// */
// private Integer shoppingBagNum;
// /**
// * 提袋1的Logo
// */
// private String shoppingBagLogo1;
//
// /**
// * 提袋1Logo的置信度
// */
// private Float shoppingBagLogo1Score;
//
// /**
// * 提袋2的Logo
// */
// private String shoppingBagLogo2;
//
// /**
// * 提袋2Logo的置信度
// */
// private Float shoppingBagLogo2Score;
/**
* 鞋子类型
......@@ -175,4 +175,7 @@ public class PersonLabelContent {
* 鞋子颜色
*/
private Integer shoeColor;
private Integer coatColor;
private Integer coatType;
}
......@@ -66,10 +66,10 @@ public class ZoneCountData {
*/
private Integer hour;
/**
* 铺位号
*/
private Long bunkNo;
// /**
// * 铺位号
// */
// private Long bunkNo;
/**
* 数据操作类型:insert:插入,update:更新
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!