##大盘表
dapan_sql='''
select id,sku_no,price,cid1,cid2,cid3,brand_name,brand_id from
    offline_recommend.recommend_same_product 
'''
##商品表
skuinfo_sql='''
select id,sku_no,price,cid1,cid2,cid3,brand_name,brand_id,source_type from
    offline_recommend.recommend_product_info
'''
##相似表
similar_redis='product_similarity:{skuno}'

##商品关联度
correlation_redis='product_correlation:${skuNo}'

##本批次+上一批次
cur_batch_sql="""
select a.*,b.sku_no,b.recall_reason from 
(select id,recall_batch_uuid from nearline_recommend.recommend_product_batch where user_uuid='{}' order by id desc limit 2)a
join nearline_recommend.recommend_product_record b on a.recall_batch_uuid=b.recall_batch_uuid
"""

#b.jg_id,b.category_id,b.category_level,b.final_score,a.rank,a.click_num
hot_jd150_sql="""
select distinct {}  from offline_recommend.jg_heat_rank 
join offline_recommend.jg_intention_score  on jg_heat_rank.jg_id=jg_intention_score.jg_id
order by jg_heat_rank.rank desc
"""

##推荐位用户意图得分表
jd_hot_sql="""
select jg_id,category_id,category_level,brand_name,final_score from offline_recommend.jg_intention_score 
"""

##金刚位大盘表-金刚位热度表
jg_dapan_sql="""
select * from offline_recommend.jg_heat_rank  order by rank desc limit 30
"""

##推荐位用户意图得分表
jg_purpost_sql="""

"""


jg_purpost_all_sql="""
select * from   where cid3={} or cid2={} or cid1={} or brand_name='{}'
"""

#图关联表
graph_redis="""
product_graph:{sku_no}
"""
graph_relation_sql="""
select * from xyqb_recommender_system.mix_products_graph 
"""
##ALS相关表
als_redis="""
product_correlation:{sku_no}
"""
als_sql="""
select * from xyqb_recommender_system.mix_products_correlation 
"""

dapan_hot_sql="""
select * from 
xyqb_recommender_system.kdsp_same_ranked_list
"""
##获取上一批次记录后，再去mysql批次表里拿数据
back_batch_redis="""
recommend_recall:{uuid}:{sku_no}
"""
