Commit 3e4fe845 by chenyuanjie

流量选品-新增ao值、价格等字段同比计算

parent 252e1e6b
...@@ -84,13 +84,13 @@ class EsStDetail(TemplatesMysql): ...@@ -84,13 +84,13 @@ class EsStDetail(TemplatesMysql):
asin_activity_type as activity_type, act_one_two_val as one_two_val, act_three_four_val as three_four_val, asin_activity_type as activity_type, act_one_two_val as one_two_val, act_three_four_val as three_four_val,
act_five_six_val as five_six_val, act_eight_val as eight_val, asin_brand_name as brand, variation_num, act_five_six_val as five_six_val, act_eight_val as eight_val, asin_brand_name as brand, variation_num,
one_star, two_star, three_star, four_star, five_star, low_star, together_asin, account_name, account_id, one_star, two_star, three_star, four_star, five_star, low_star, together_asin, account_name, account_id,
seller_country_name as site_name, asin_rank_rise as rank_rise, asin_rank_change as rank_change, seller_country_name as site_name, asin_rank_rise as rank_rise, asin_rank_mom as rank_change,
asin_ao_rise as ao_rise, asin_ao_change as ao_change, asin_price_rise as price_rise, asin_ao_rise as ao_rise, asin_ao_mom as ao_change, asin_price_rise as price_rise,
asin_price_change as price_change, asin_rating_rise as rating_rise, asin_rating_change as rating_change, asin_price_mom as price_change, asin_rating_rise as rating_rise, asin_rating_mom as rating_change,
asin_comments_rise as comments_rise, asin_comments_change as comments_change, asin_comments_rise as comments_rise, asin_comments_mom as comments_change,
asin_bsr_orders_rise as bsr_orders_rise, asin_bsr_orders_change as bsr_orders_change, asin_bsr_orders_rise as bsr_orders_rise, asin_bsr_orders_mom as bsr_orders_change,
asin_sales_rise as sales_rise, asin_sales_change as sales_change, asin_variation_rise as variation_rise, asin_sales_rise as sales_rise, asin_sales_mom as sales_change, asin_variation_rise as variation_rise,
asin_variation_change as variation_change, asin_size_type as size_type, asin_rating_type as rating_type, asin_variation_mom as variation_change, asin_size_type as size_type, asin_rating_type as rating_type,
asin_site_name_type as site_name_type, asin_weight_type as weight_type, asin_launch_time_type as launch_time_type, asin_site_name_type as site_name_type, asin_weight_type as weight_type, asin_launch_time_type as launch_time_type,
asin_ao_val_type as ao_val_type, asin_rank_type as rank_type, asin_price_type as price_type, bsr_type, asin_ao_val_type as ao_val_type, asin_rank_type as rank_type, asin_price_type as price_type, bsr_type,
bsr_best_orders_type, asin_quantity_variation_type as quantity_variation_type, package_quantity, is_movie_label, bsr_best_orders_type, asin_quantity_variation_type as quantity_variation_type, package_quantity, is_movie_label,
...@@ -99,7 +99,9 @@ class EsStDetail(TemplatesMysql): ...@@ -99,7 +99,9 @@ class EsStDetail(TemplatesMysql):
title_matching_degree, asin_lob_info, is_contains_lob_info, is_package_quantity_abnormal, zr_flow_proportion, title_matching_degree, asin_lob_info, is_contains_lob_info, is_package_quantity_abnormal, zr_flow_proportion,
matrix_flow_proportion, matrix_ao_val, customer_reviews_json as product_features, img_info, matrix_flow_proportion, matrix_ao_val, customer_reviews_json as product_features, img_info,
coalesce(parent_asin, asin) as collapse_asin, follow_sellers_count, asin_describe, asin_fbm_price as fbm_price, coalesce(parent_asin, asin) as collapse_asin, follow_sellers_count, asin_describe, asin_fbm_price as fbm_price,
describe_len, asin_bought_mom as bought_month_mom, asin_bought_yoy as bought_month_yoy, tracking_since, tracking_since_type describe_len, asin_bought_mom as bought_month_mom, asin_bought_yoy as bought_month_yoy, tracking_since, tracking_since_type,
asin_rank_yoy as rank_yoy, asin_ao_yoy as ao_yoy, asin_price_yoy as price_yoy, asin_rating_yoy as rating_yoy,
asin_comments_yoy as comments_yoy, asin_bsr_orders_yoy as bsr_orders_yoy, asin_sales_yoy as sales_yoy, asin_variation_yoy as variation_yoy
from {self.table_name} where site_name='{self.site_name}' and date_type='{self.date_type}' and date_info='{self.date_info}' from {self.table_name} where site_name='{self.site_name}' and date_type='{self.date_type}' and date_info='{self.date_info}'
""" """
print("sql:", sql) print("sql:", sql)
......
...@@ -502,6 +502,30 @@ class EsUtils(object): ...@@ -502,6 +502,30 @@ class EsUtils(object):
"type": "float" "type": "float"
} }
} }
},
"rank_yoy": {
"type": "float"
},
"ao_yoy": {
"type": "float"
},
"price_yoy": {
"type": "float"
},
"rating_yoy": {
"type": "float"
},
"comments_yoy": {
"type": "float"
},
"bsr_orders_yoy": {
"type": "float"
},
"sales_yoy": {
"type": "float"
},
"variation_yoy": {
"type": "float"
} }
} }
} }
...@@ -972,6 +996,36 @@ class EsUtils(object): ...@@ -972,6 +996,36 @@ class EsUtils(object):
"type": "float" "type": "float"
} }
} }
},
"rank_yoy": {
"type": "float"
},
"ao_yoy": {
"type": "float"
},
"price_yoy": {
"type": "float"
},
"rating_yoy": {
"type": "float"
},
"comments_yoy": {
"type": "float"
},
"bsr_orders_yoy": {
"type": "float"
},
"sales_yoy": {
"type": "float"
},
"variation_yoy": {
"type": "float"
},
"bought_month_mom": {
"type": "float"
},
"bought_month_yoy": {
"type": "float"
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment