|
@@ -12,9 +12,9 @@ import java.util.List; |
|
@@ -12,9 +12,9 @@ import java.util.List; |
12
|
public class ExcelParseUtil {
|
12
|
public class ExcelParseUtil {
|
13
|
public static void main(String[] args) {
|
13
|
public static void main(String[] args) {
|
14
|
try {
|
14
|
try {
|
15
|
- List<ProductProfit> dataList = XlsxUtils.parse(new File("C:\\Users\\li.ma\\Desktop\\8月份新品爆款扣点调整fortiger0813.xlsx"), ProductProfit.class);
|
15
|
+ List<SizePoolImageDemo> dataList = XlsxUtils.parse(new File("C:\\Users\\li.ma\\Desktop\\ml1.xlsx"), SizePoolImageDemo.class);
|
16
|
|
16
|
|
17
|
- for (ProductProfit item : dataList) {
|
17
|
+ for (SizePoolImageDemo item : dataList) {
|
18
|
//String l = String.format("curl 'http://172.31.70.39:8088/ufoPlatform/live/generateMp4Vedio?debug=XYZ&orderCode=%d&startTime=%d&endTime=%d&cameraCode=%d'", item.getOrderCode(), item.getStartTime(), item.getEndTime() + 1, item.getCameraCode());
|
18
|
//String l = String.format("curl 'http://172.31.70.39:8088/ufoPlatform/live/generateMp4Vedio?debug=XYZ&orderCode=%d&startTime=%d&endTime=%d&cameraCode=%d'", item.getOrderCode(), item.getStartTime(), item.getEndTime() + 1, item.getCameraCode());
|
19
|
|
19
|
|
20
|
/*if (item.getSeriesId() == 0) {
|
20
|
/*if (item.getSeriesId() == 0) {
|
|
@@ -23,10 +23,10 @@ public class ExcelParseUtil { |
|
@@ -23,10 +23,10 @@ public class ExcelParseUtil { |
23
|
System.out.println(String.format("update ufo_product.product set brand_id = %d, series_id = %d where id = %d;", item.getBrandId(), item.getSeriesId(), item.getId()));
|
23
|
System.out.println(String.format("update ufo_product.product set brand_id = %d, series_id = %d where id = %d;", item.getBrandId(), item.getSeriesId(), item.getId()));
|
24
|
}*/
|
24
|
}*/
|
25
|
|
25
|
|
26
|
- System.out.println(String.format("insert into ufo_product.product_profit(product_id, profit_rate) values(%d, %.3f);", item.getProductId(), item.getProfitRate()/100));
|
26
|
+ System.out.println(String.format("insert into ufo_product.size_pool_image(size_pool_id, image_url,image_width,image_height) values(%d, '%s', %d, %d);",
|
|
|
27
|
+ item.getProductId(), item.getImageUrl(), item.getWidth(), item.getHeight()));
|
27
|
}
|
28
|
}
|
28
|
|
29
|
|
29
|
-
|
|
|
30
|
} catch (IOException e) {
|
30
|
} catch (IOException e) {
|
31
|
e.printStackTrace();
|
31
|
e.printStackTrace();
|
32
|
}
|
32
|
}
|