From ee76db87f00f4d6b017ca25cfbfdbc609aae38bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=BD=A6=E9=92=8A?= <zhangyanzhao@igengmei.com>
Date: Wed, 29 Apr 2020 23:56:19 +0800
Subject: [PATCH] add

---
 ai_test.py  | 11 ++++++++++-
 sort_key.py | 22 +++++++++++++---------
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/ai_test.py b/ai_test.py
index 133005e3..7997bb6d 100644
--- a/ai_test.py
+++ b/ai_test.py
@@ -9,8 +9,17 @@ header_dict={'Content-Type': 'application/x-www-form-urlencoded'}
 param_dict={}
 
 param_dict["method"]="doris/search/spu_sku"
-param_detail = {"device_id":"3ab", "size":10,"offset":0,"user_city_tag_id":328,"recall_type":2,"unit_id":4,"sort_params":{"lat":0,"lng":0},"tag_ids":[993, 971, 5, 41, 759, 47, 821],"filters":{"tag_ids":[971]}}
+# param_detail = {'unit_id': 1, 'device_id': "863791030182646", 'offset': 0, 'size': 10,
+#                 'user_city_tag_id': 328, 'recall_type': 2,
+#                 'sort_params': {'lat': 40.000561, 'lng': 116.487496},
+#                 'sort_type': 0, 'filters': {'tag_ids': []}, 'tag_ids': [], 'promotion_ids': []}
 
+param_detail = {'unit_id': 4, 'device_id': "863791030182646", 'offset': 0, 'size': 10,
+                'user_city_tag_id': 328, 'recall_type': 2,
+                'sort_params': {'lat': 40.000561, 'lng': 116.487496},
+                'sort_type': 0, 'filters': {'tag_ids': []}, 'tag_ids': [], 'promotion_ids': []}
+
+# {"device_id":"3ab", "size":10,"offset":0,"user_city_tag_id":328,"recall_type":2,"unit_id":4,"sort_params":{"lat":0,"lng":0}}
 # 美购首页活动美购
 # param_dict["method"]="doris/search/activity"
 # param_detail = {"device_id":"hello","promotion_id":342,"user_city_tag_id":328,"size":10}
diff --git a/sort_key.py b/sort_key.py
index b9b68190..c0ed04a3 100644
--- a/sort_key.py
+++ b/sort_key.py
@@ -38,23 +38,23 @@ rule = {"t1_"+str(sorted(boniaosuan)):1,
         "t4_"+str(sorted(chuzhoushoulian)):3,
         "t1_"+str(sorted(bibu)):1,
         "t2_"+str(sorted(bibu)):2,
-        "t3_"+str(sorted(bibu)):3,
+        "t3_"+str(sorted(bibu)):2,
         "t4_"+str(sorted(bibu)):3,
         "t1_"+str(sorted(yanbu)):1,
         "t2_"+str(sorted(yanbu)):2,
-        "t3_"+str(sorted(yanbu)):3,
+        "t3_"+str(sorted(yanbu)):2,
         "t4_"+str(sorted(yanbu)):3,
         "t1_"+str(sorted(mianbulunkuo)):1,
         "t2_"+str(sorted(mianbulunkuo)):2,
-        "t3_"+str(sorted(mianbulunkuo)):3,
+        "t3_"+str(sorted(mianbulunkuo)):2,
         "t4_"+str(sorted(mianbulunkuo)):3,
         "t1_"+str(sorted(zhifangtianchong)):1,
         "t2_"+str(sorted(zhifangtianchong)):2,
-        "t3_"+str(sorted(zhifangtianchong)):3,
+        "t3_"+str(sorted(zhifangtianchong)):2,
         "t4_"+str(sorted(zhifangtianchong)):3,
         "t1_" + str(sorted(meitishoushen)): 1,
         "t2_" + str(sorted(meitishoushen)): 2,
-        "t3_" + str(sorted(meitishoushen)): 3,
+        "t3_" + str(sorted(meitishoushen)): 2,
         "t4_" + str(sorted(meitishoushen)): 3,
         "t1_" + str(sorted(kouqiangchike)): 1,
         "t2_" + str(sorted(kouqiangchike)): 1,
@@ -62,7 +62,7 @@ rule = {"t1_"+str(sorted(boniaosuan)):1,
         "t4_" + str(sorted(kouqiangchike)): 2,
         "t1_" + str(sorted(kangshuaijinzhi)): 1,
         "t2_" + str(sorted(kangshuaijinzhi)): 2,
-        "t3_" + str(sorted(kangshuaijinzhi)): 3,
+        "t3_" + str(sorted(kangshuaijinzhi)): 2,
         "t4_" + str(sorted(kangshuaijinzhi)): 3,
         "t1_" + str(sorted(yixuemeifu)): 1,
         "t2_" + str(sorted(yixuemeifu)): 1,
@@ -74,12 +74,16 @@ rule = {"t1_"+str(sorted(boniaosuan)):1,
         "t4_" + str(sorted(simi)): 3,
         "t1_" + str(sorted(zhifatuomao)): 1,
         "t2_" + str(sorted(zhifatuomao)): 2,
-        "t3_" + str(sorted(zhifatuomao)): 3,
+        "t3_" + str(sorted(zhifatuomao)): 2,
         "t4_" + str(sorted(zhifatuomao)): 3,
         "t1_" + str(sorted(xiaba)): 1,
         "t2_" + str(sorted(xiaba)): 2,
-        "t3_" + str(sorted(xiaba)): 3,
+        "t3_" + str(sorted(xiaba)): 2,
         "t4_" + str(sorted(xiaba)): 3,
+        "t1_" + str(sorted(chunbu)): 1,
+        "t2_" + str(sorted(chunbu)): 2,
+        "t3_" + str(sorted(chunbu)): 2,
+        "t4_" + str(sorted(chunbu)): 3,
         "t1_" + str(sorted(shibaixiufu)): 1,
         "t2_" + str(sorted(shibaixiufu)): 2,
         "t3_" + str(sorted(shibaixiufu)): 4,
@@ -90,7 +94,7 @@ rule = {"t1_"+str(sorted(boniaosuan)):1,
         "t4_" + str(sorted(banyongjiu)): 3,
         "t1_" + str(sorted(xiongbu)): 1,
         "t2_" + str(sorted(xiongbu)): 2,
-        "t3_" + str(sorted(xiongbu)): 3,
+        "t3_" + str(sorted(xiongbu)): 2,
         "t4_" + str(sorted(xiongbu)): 3
         }
 
-- 
2.18.0