Commit 219c81c2 authored by lixiaofang's avatar lixiaofang

修改url

parent 16af23a3
This diff is collapsed.
...@@ -4,7 +4,7 @@ from libs.rpc import get_rpc_invoker ...@@ -4,7 +4,7 @@ from libs.rpc import get_rpc_invoker
from hera.models.city_rank import CityWhiteList from hera.models.city_rank import CityWhiteList
@bind('doris/hera/in_city_whitelist') @bind('dymas/hera/in_city_whitelist')
def city_is_in_whitelist(city_ids): def city_is_in_whitelist(city_ids):
rs = [] rs = []
if not city_ids: if not city_ids:
......
...@@ -12,12 +12,12 @@ class RankTestCase(DorisTestCase): ...@@ -12,12 +12,12 @@ class RankTestCase(DorisTestCase):
params = { params = {
"strategy_name":STRATEGY_TYPE.SERVICE_SEARCH "strategy_name":STRATEGY_TYPE.SERVICE_SEARCH
} }
resp = self.call("doris/strategy/get",params) resp = self.call("dymas/strategy/get",params)
self.assertDictEqual(resp.result,{'a': 12, 'b': 3, 'c': 1, 'd': 5, 'e': 3}) self.assertDictEqual(resp.result,{'a': 12, 'b': 3, 'c': 1, 'd': 5, 'e': 3})
def test_get_wrong_strategy(self): def test_get_wrong_strategy(self):
params = { params = {
"strategy_name":'test' "strategy_name":'test'
} }
resp = self.call("doris/strategy/get",params) resp = self.call("dymas/strategy/get",params)
self.assertEqual(resp.code, ERROR.UNSUPPORT_STRATEGY_TYPE) self.assertEqual(resp.code, ERROR.UNSUPPORT_STRATEGY_TYPE)
...@@ -8,7 +8,7 @@ from rank.models import Interpose ...@@ -8,7 +8,7 @@ from rank.models import Interpose
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@bind('doris/interpose/get') @bind('dymas/interpose/get')
def get_interpose_strategy(interpose_type, city_tag_id, tag_id, sort_order, keyword=None): def get_interpose_strategy(interpose_type, city_tag_id, tag_id, sort_order, keyword=None):
tag_ids = [0] tag_ids = [0]
city_tag_ids = [0] city_tag_ids = [0]
......
...@@ -7,7 +7,7 @@ from libs.types import ensure_str ...@@ -7,7 +7,7 @@ from libs.types import ensure_str
from recommend.models import ServiceHot from recommend.models import ServiceHot
from libs.cache import redis_client as service_hot_redis_client from libs.cache import redis_client as service_hot_redis_client
@bind('doris/stat/doctor') @bind('dymas/stat/doctor')
def doris_stat_doctor(doctor_id): def doris_stat_doctor(doctor_id):
redis_key = "doctor:{}".format(doctor_id) redis_key = "doctor:{}".format(doctor_id)
stat_json = redis_client.get(redis_key) stat_json = redis_client.get(redis_key)
...@@ -23,7 +23,7 @@ def doris_stat_doctor(doctor_id): ...@@ -23,7 +23,7 @@ def doris_stat_doctor(doctor_id):
# @rd 郑伟 # @rd 郑伟
# @param service_id 美购id # @param service_id 美购id
# @date 20170620 # @date 20170620
@bind("doris/stat/service") @bind("dymas/stat/service")
def doris_stat_service(service_id): def doris_stat_service(service_id):
redis_key = ServiceHot.get_stat_key(service_id) redis_key = ServiceHot.get_stat_key(service_id)
stat_json = service_hot_redis_client.get(redis_key) stat_json = service_hot_redis_client.get(redis_key)
......
...@@ -12,7 +12,7 @@ ALLOW_STRATEGY = [ ...@@ -12,7 +12,7 @@ ALLOW_STRATEGY = [
] ]
@bind('doris/strategy/get') @bind('dymas/strategy/get')
def get_doris_strategy(strategy_name=None): def get_doris_strategy(strategy_name=None):
if strategy_name is None: if strategy_name is None:
return {} return {}
......
...@@ -10,7 +10,7 @@ class RecommandTestCase(DorisTestCase): ...@@ -10,7 +10,7 @@ class RecommandTestCase(DorisTestCase):
params = { params = {
"device_id": "aaa" "device_id": "aaa"
} }
resp = self.call("doris/recommend/service", params) resp = self.call("dymas/recommend/service", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_get_hot_service_by_tags(self): def test_get_hot_service_by_tags(self):
...@@ -20,13 +20,13 @@ class RecommandTestCase(DorisTestCase): ...@@ -20,13 +20,13 @@ class RecommandTestCase(DorisTestCase):
params = { params = {
"device_id": "aaa" "device_id": "aaa"
} }
resp = self.call("doris/recommend/interest_tag", params) resp = self.call("dymas/recommend/interest_tag", params)
def test_tobuy_service(self): def test_tobuy_service(self):
params = { params = {
"device_id": "56D5E838-470E-42BB-87E1-FA07C47FC390" "device_id": "56D5E838-470E-42BB-87E1-FA07C47FC390"
} }
resp = self.call("doris/willbuy/service", params) resp = self.call("dymas/willbuy/service", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
......
...@@ -54,7 +54,7 @@ MAX_LOAD = 200 ...@@ -54,7 +54,7 @@ MAX_LOAD = 200
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@bind("doris/recommend/get_diaries") @bind("dymas/recommend/get_diaries")
def get_diaries(tags, city, offset=0, size=10, city_tag_id=None): def get_diaries(tags, city, offset=0, size=10, city_tag_id=None):
# NOTE: city as city id # NOTE: city as city id
sort_params = {} sort_params = {}
...@@ -94,7 +94,7 @@ def get_diaries(tags, city, offset=0, size=10, city_tag_id=None): ...@@ -94,7 +94,7 @@ def get_diaries(tags, city, offset=0, size=10, city_tag_id=None):
return {"diaries_ids": diaries_ids} return {"diaries_ids": diaries_ids}
@bind("doris/recommend/get_articles") @bind("dymas/recommend/get_articles")
def get_articles(tags, offset=0, size=10): def get_articles(tags, offset=0, size=10):
filters = { filters = {
"content_level": [CONTENT_CLASS.EXCELLENT, CONTENT_CLASS.FINE] "content_level": [CONTENT_CLASS.EXCELLENT, CONTENT_CLASS.FINE]
...@@ -107,7 +107,7 @@ def get_articles(tags, offset=0, size=10): ...@@ -107,7 +107,7 @@ def get_articles(tags, offset=0, size=10):
return {"article_ids": article_ids} return {"article_ids": article_ids}
@bind("doris/recommend/get_answers") @bind("dymas/recommend/get_answers")
def get_answers(tags, offset=0, size=10): def get_answers(tags, offset=0, size=10):
filters = { filters = {
"content_level": [CONTENT_CLASS.EXCELLENT, CONTENT_CLASS.FINE] "content_level": [CONTENT_CLASS.EXCELLENT, CONTENT_CLASS.FINE]
...@@ -129,7 +129,7 @@ def get_answers(tags, offset=0, size=10): ...@@ -129,7 +129,7 @@ def get_answers(tags, offset=0, size=10):
answer_ids = [answer['id'] for answer in answers] answer_ids = [answer['id'] for answer in answers]
return {"answer_ids": answer_ids} return {"answer_ids": answer_ids}
@bind('doris/recommend/icon') @bind('v/recommend/icon')
def fetch_icon(device_id, size): def fetch_icon(device_id, size):
try: try:
card_type = "icon" card_type = "icon"
...@@ -151,7 +151,7 @@ def fetch_icon(device_id, size): ...@@ -151,7 +151,7 @@ def fetch_icon(device_id, size):
logging_exception() logging_exception()
return {"icon": []} return {"icon": []}
@bind('doris/recommend/homepage_polymer') @bind('dymas/recommend/homepage_polymer')
def fetch_polymer_ids(device_id, size): def fetch_polymer_ids(device_id, size):
try: try:
card_type = "polymer_ids" card_type = "polymer_ids"
...@@ -173,7 +173,7 @@ def fetch_polymer_ids(device_id, size): ...@@ -173,7 +173,7 @@ def fetch_polymer_ids(device_id, size):
logging_exception() logging_exception()
return {"polymer_ids": []} return {"polymer_ids": []}
@bind('doris/recommend/feed') @bind('dymas/recommend/feed')
def recommend_feed(device_id, card_type, city_id, size): def recommend_feed(device_id, card_type, city_id, size):
try: try:
return RecommendFeed.dispatch(device_id, card_type, return RecommendFeed.dispatch(device_id, card_type,
......
...@@ -25,7 +25,7 @@ MAX_LOAD = 200 ...@@ -25,7 +25,7 @@ MAX_LOAD = 200
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@bind("doris/recommend/content_detail_tag") @bind("dymas/recommend/content_detail_tag")
def content_detail_tag(tag={}, page=1, city_id=None, city_tag_id=-1, def content_detail_tag(tag={}, page=1, city_id=None, city_tag_id=-1,
device_id=None, card_type="diary", card_id=-1): device_id=None, card_type="diary", card_id=-1):
""" """
......
...@@ -38,7 +38,7 @@ def get_gm_kv_ins(redis_ip, redis_port, redis_db,redis_password=""): ...@@ -38,7 +38,7 @@ def get_gm_kv_ins(redis_ip, redis_port, redis_db,redis_password=""):
return None return None
@bind("doris/recommend/user_portrait") @bind("dymas/recommend/user_portrait")
def get_user_portrait(device_id): def get_user_portrait(device_id):
try: try:
gm_kv_ins = None gm_kv_ins = None
......
...@@ -55,7 +55,7 @@ def get_willbuy_tags(device_id): ...@@ -55,7 +55,7 @@ def get_willbuy_tags(device_id):
# @param current_city_tag_id 用户美购首页选择城市tag_id # @param current_city_tag_id 用户美购首页选择城市tag_id
# @param size 一次推荐多少条美购 # @param size 一次推荐多少条美购
# @date 20170616 # @date 20170616
@bind('doris/recommend/service') @bind('dymas/recommend/service')
def recommend_service(device_id, current_city_tag_id=None, sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, offset=0, def recommend_service(device_id, current_city_tag_id=None, sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, offset=0,
size=10): size=10):
""" """
...@@ -96,13 +96,13 @@ def recommend_service(device_id, current_city_tag_id=None, sort_type=SERVICE_ORD ...@@ -96,13 +96,13 @@ def recommend_service(device_id, current_city_tag_id=None, sort_type=SERVICE_ORD
return {"service_ids": service_ids} return {"service_ids": service_ids}
@bind("doris/recommend/interest_tag") @bind("dymas/recommend/interest_tag")
def get_recommend_interest_tag(device_id): def get_recommend_interest_tag(device_id):
interest_tags = get_device_interest(device_id) interest_tags = get_device_interest(device_id)
return {"interest_tags": interest_tags} return {"interest_tags": interest_tags}
@bind("doris/willbuy/service") @bind("dymas/willbuy/service")
def tobuy_service(device_id, current_city_tag_id=None, offset=0, size=40): def tobuy_service(device_id, current_city_tag_id=None, offset=0, size=40):
tobuy_tags = get_willbuy_tags(device_id) tobuy_tags = get_willbuy_tags(device_id)
service_ids = get_hot_service_by_tags(tobuy_tags, area_tag_id=current_city_tag_id, offset=offset, size=size) service_ids = get_hot_service_by_tags(tobuy_tags, area_tag_id=current_city_tag_id, offset=offset, size=size)
...@@ -397,7 +397,7 @@ def supplement_service_ids(user_city_tag_id, in_whitelist, had_read_service_list ...@@ -397,7 +397,7 @@ def supplement_service_ids(user_city_tag_id, in_whitelist, had_read_service_list
return [] return []
@bind('doris/recommend/order/service') @bind('dymas/recommend/order/service')
def get_recommend_order_service(service_ids, query_params): def get_recommend_order_service(service_ids, query_params):
# params # params
try: try:
...@@ -468,7 +468,7 @@ def get_recommend_order_service(service_ids, query_params): ...@@ -468,7 +468,7 @@ def get_recommend_order_service(service_ids, query_params):
return {"service_ids": res_service_ids} return {"service_ids": res_service_ids}
@bind('doris/recommend/shopcart/service') @bind('dymas/recommend/shopcart/service')
def get_recommend_shopcart_service(service_ids, query_params): def get_recommend_shopcart_service(service_ids, query_params):
try: try:
# params # params
...@@ -543,7 +543,7 @@ def get_recommend_shopcart_service(service_ids, query_params): ...@@ -543,7 +543,7 @@ def get_recommend_shopcart_service(service_ids, query_params):
return {"service_ids": res_service_ids} return {"service_ids": res_service_ids}
@bind('doris/recommend/point/service') @bind('dymas/recommend/point/service')
def get_recommend_point_service(service_ids, query_params): def get_recommend_point_service(service_ids, query_params):
try: try:
user_id = query_params['user_id'] user_id = query_params['user_id']
...@@ -620,7 +620,7 @@ def get_recommend_point_service(service_ids, query_params): ...@@ -620,7 +620,7 @@ def get_recommend_point_service(service_ids, query_params):
# 小程序签到页面美购展示接口 # 小程序签到页面美购展示接口
@bind('doris/recommend/views/wechat_check_in') @bind('dymas/recommend/views/wechat_check_in')
def wechat_check_in(query_params): def wechat_check_in(query_params):
try: try:
user_city_tag_id = query_params['user_city_tag_id'] user_city_tag_id = query_params['user_city_tag_id']
...@@ -643,7 +643,7 @@ def wechat_check_in(query_params): ...@@ -643,7 +643,7 @@ def wechat_check_in(query_params):
# 美购app签到接口 # 美购app签到接口
@bind('doris/recommend/views/check_in') @bind('dymas/recommend/views/check_in')
def check_in_service_ids(query_params): def check_in_service_ids(query_params):
try: try:
# params # params
......
...@@ -11,7 +11,7 @@ class SearchTestCase(DorisTestCase): ...@@ -11,7 +11,7 @@ class SearchTestCase(DorisTestCase):
params = { params = {
"doctor_id":'bjgmhyy' "doctor_id":'bjgmhyy'
} }
resp = self.call("doris/search/guess_you_like_service",params) resp = self.call("dymas/search/guess_you_like_service",params)
...@@ -19,13 +19,13 @@ class SearchTestCase(DorisTestCase): ...@@ -19,13 +19,13 @@ class SearchTestCase(DorisTestCase):
params = { params = {
"tag_id":1682, "tag_id":1682,
} }
resp = self.call("doris/search/guess_you_like_service",params) resp = self.call("dymas/search/guess_you_like_service",params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_guess_you_like_service(self): def test_guess_you_like_service(self):
params = { params = {
} }
resp = self.call("doris/search/guess_you_like_service",params) resp = self.call("dymas/search/guess_you_like_service",params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
...@@ -33,7 +33,7 @@ class SearchTestCase(DorisTestCase): ...@@ -33,7 +33,7 @@ class SearchTestCase(DorisTestCase):
"doctor_id":'bjgmhyy', "doctor_id":'bjgmhyy',
"tag_id":1682, "tag_id":1682,
} }
resp = self.call("doris/search/guess_you_like_service",params) resp = self.call("dymas/search/guess_you_like_service",params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
...@@ -41,18 +41,18 @@ class SearchTestCase(DorisTestCase): ...@@ -41,18 +41,18 @@ class SearchTestCase(DorisTestCase):
params = { params = {
"special_id":309, "special_id":309,
} }
resp = self.call("doris/search/get_diaries_by_special_id",params) resp = self.call("dymas/search/get_diaries_by_special_id",params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_get_index_diaries(self): def test_get_index_diaries(self):
resp = self.call("doris/search/get_index_diaries") resp = self.call("dymas/search/get_index_diaries")
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_get_doctors_by_special_id(self): def test_get_doctors_by_special_id(self):
params = { params = {
"special_id":491, "special_id":491,
} }
resp = self.call("doris/search/get_doctors_by_special_id", params) resp = self.call("dymas/search/get_doctors_by_special_id", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_get_questions_by_tag_id(self): def test_get_questions_by_tag_id(self):
...@@ -60,7 +60,7 @@ class SearchTestCase(DorisTestCase): ...@@ -60,7 +60,7 @@ class SearchTestCase(DorisTestCase):
"tag_id":87, "tag_id":87,
"sort_type": QUESTION_ORDER_TYPE.HOT "sort_type": QUESTION_ORDER_TYPE.HOT
} }
resp = self.call("doris/filter/question", params) resp = self.call("dymas/filter/question", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_get_questions_by_tag_id(self): def test_get_questions_by_tag_id(self):
...@@ -68,7 +68,7 @@ class SearchTestCase(DorisTestCase): ...@@ -68,7 +68,7 @@ class SearchTestCase(DorisTestCase):
"tag_id":87, "tag_id":87,
"sort_type": QUESTION_ORDER_TYPE.UPDATE "sort_type": QUESTION_ORDER_TYPE.UPDATE
} }
resp = self.call("doris/filter/question", params) resp = self.call("dymas/filter/question", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_query_sku_with_cashback(self): def test_query_sku_with_cashback(self):
...@@ -78,14 +78,14 @@ class SearchTestCase(DorisTestCase): ...@@ -78,14 +78,14 @@ class SearchTestCase(DorisTestCase):
"share_get_cashback":True "share_get_cashback":True
} }
} }
resp = self.call("doris/search/query_sku", params) resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code,0) self.assertEqual(resp.code,0)
def test_query_sku(self): def test_query_sku(self):
params = { params = {
"query" : u'北京' "query" : u'北京'
} }
resp = self.call("doris/search/query_sku",params) resp = self.call("dymas/search/query_sku",params)
self.assertEqual(resp.code,0) self.assertEqual(resp.code,0)
def test_query_sku_lowest_price(self): def test_query_sku_lowest_price(self):
...@@ -93,7 +93,7 @@ class SearchTestCase(DorisTestCase): ...@@ -93,7 +93,7 @@ class SearchTestCase(DorisTestCase):
"query" : u'北京', "query" : u'北京',
"sort_type": SERVICE_ORDER_TYPE.ORDER_LOWEST_PRICE "sort_type": SERVICE_ORDER_TYPE.ORDER_LOWEST_PRICE
} }
resp = self.call("doris/search/query_sku",params) resp = self.call("dymas/search/query_sku",params)
self.assertEqual(resp.code,0) self.assertEqual(resp.code,0)
...@@ -102,7 +102,7 @@ class SearchTestCase(DorisTestCase): ...@@ -102,7 +102,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京', "query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.ORDER_HIGHEST_SALES "sort_type": SERVICE_ORDER_TYPE.ORDER_HIGHEST_SALES
} }
resp = self.call("doris/search/query_sku", params) resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_query_sku_case_count(self): def test_query_sku_case_count(self):
...@@ -110,7 +110,7 @@ class SearchTestCase(DorisTestCase): ...@@ -110,7 +110,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京', "query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.CASE_COUNT "sort_type": SERVICE_ORDER_TYPE.CASE_COUNT
} }
resp = self.call("doris/search/query_sku", params) resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_query_sku_order_evaluate(self): def test_query_sku_order_evaluate(self):
...@@ -118,7 +118,7 @@ class SearchTestCase(DorisTestCase): ...@@ -118,7 +118,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京', "query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.ORDER_EVALUATE "sort_type": SERVICE_ORDER_TYPE.ORDER_EVALUATE
} }
resp = self.call("doris/search/query_sku", params) resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_query_sku_popularity(self): def test_query_sku_popularity(self):
...@@ -126,7 +126,7 @@ class SearchTestCase(DorisTestCase): ...@@ -126,7 +126,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京', "query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.POPULARITY "sort_type": SERVICE_ORDER_TYPE.POPULARITY
} }
resp = self.call("doris/search/query_sku", params) resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_query_sku_distance(self): def test_query_sku_distance(self):
...@@ -134,7 +134,7 @@ class SearchTestCase(DorisTestCase): ...@@ -134,7 +134,7 @@ class SearchTestCase(DorisTestCase):
"query": u'北京', "query": u'北京',
"sort_type": SERVICE_ORDER_TYPE.DISTANCE "sort_type": SERVICE_ORDER_TYPE.DISTANCE
} }
resp = self.call("doris/search/query_sku", params) resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_query_seckill(self): def test_query_seckill(self):
...@@ -144,7 +144,7 @@ class SearchTestCase(DorisTestCase): ...@@ -144,7 +144,7 @@ class SearchTestCase(DorisTestCase):
"is_seckill":True "is_seckill":True
} }
} }
resp = self.call("doris/search/query_sku", params) resp = self.call("dymas/search/query_sku", params)
self.assertEqual(resp.code, 0) self.assertEqual(resp.code, 0)
def test_recall_board(self): def test_recall_board(self):
...@@ -155,5 +155,5 @@ class SearchTestCase(DorisTestCase): ...@@ -155,5 +155,5 @@ class SearchTestCase(DorisTestCase):
def test_recall_boadr_api(self): def test_recall_boadr_api(self):
params = {"query": u'医生',"filters":{"city_tag_id":576}} params = {"query": u'医生',"filters":{"city_tag_id":576}}
resp = self.call("doris/search/board", params) resp = self.call("dymas/search/board", params)
print(resp.result) print(resp.result)
\ No newline at end of file
...@@ -14,7 +14,7 @@ GROUP_SIZE = 10 ...@@ -14,7 +14,7 @@ GROUP_SIZE = 10
variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE) variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE)
@bind("doris/query/answer") @bind("dymas/query/answer")
def filter_answer(query="", offset=0, size=10, filters={}, sort_type=ANSWER_SORT_TYPE.DEFAULT, sort_params={}, def filter_answer(query="", offset=0, size=10, filters={}, sort_type=ANSWER_SORT_TYPE.DEFAULT, sort_params={},
have_read_answer_list=[]): have_read_answer_list=[]):
logging.info("get context:%s" % context) logging.info("get context:%s" % context)
...@@ -55,7 +55,7 @@ def filter_answer(query="", offset=0, size=10, filters={}, sort_type=ANSWER_SORT ...@@ -55,7 +55,7 @@ def filter_answer(query="", offset=0, size=10, filters={}, sort_type=ANSWER_SORT
return {"answer_ids": [], "answer_extra": []} return {"answer_ids": [], "answer_extra": []}
@bind('doris/search/qa_sort') @bind('dymas/search/qa_sort')
def answer_sort(filters=None, offset=0, size=10, use_fresh_tag=False, device_id='', source_type=-1): def answer_sort(filters=None, offset=0, size=10, use_fresh_tag=False, device_id='', source_type=-1):
try: try:
""" """
...@@ -148,7 +148,7 @@ def answer_sort(filters=None, offset=0, size=10, use_fresh_tag=False, device_id= ...@@ -148,7 +148,7 @@ def answer_sort(filters=None, offset=0, size=10, use_fresh_tag=False, device_id=
return {'answer_id_list': []} return {'answer_id_list': []}
@bind('doris/search/qa_check_in') @bind('dymas/search/qa_check_in')
def qa_check_in(device_id,size): def qa_check_in(device_id,size):
try: try:
key = 'device_register_qa_queue:'+str(device_id) key = 'device_register_qa_queue:'+str(device_id)
......
...@@ -5,7 +5,7 @@ from search.utils.article import recall_art ...@@ -5,7 +5,7 @@ from search.utils.article import recall_art
@bind("doris/query/article") @bind("dymas/query/article")
def filter_article(query, offset, size, filters={}, sort_type=ARTICLE_SORT_TYPE.DEFAULT, sort_params={},use_fresh_tag=False): def filter_article(query, offset, size, filters={}, sort_type=ARTICLE_SORT_TYPE.DEFAULT, sort_params={},use_fresh_tag=False):
articles = recall_art(query, offset, size, filters,use_fresh_tag) articles = recall_art(query, offset, size, filters,use_fresh_tag)
article_list = [] article_list = []
......
from gm_rpcd.all import bind from gm_rpcd.all import bind
from search.utils.board import recall_board from search.utils.board import recall_board
@bind("doris/search/board") @bind("dymas/search/board")
def search_board(query, filters = {},offset=0, size=2): def search_board(query, filters = {},offset=0, size=2):
board_ids = recall_board(query,offset, size,filters) board_ids = recall_board(query,offset, size,filters)
return {"board_ids":board_ids} return {"board_ids":board_ids}
......
...@@ -21,7 +21,7 @@ logger = logging.getLogger(__name__) ...@@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
# top_data={CARD_TYPE.DIARY: [], CARD_TYPE.USERTOPIC: [], CARD_TYPE.QA: [], } # top_data={CARD_TYPE.DIARY: [], CARD_TYPE.USERTOPIC: [], CARD_TYPE.QA: [], }
@bind("doris/search/content_aggre_communit_sort") @bind("dymas/search/content_aggre_communit_sort")
def content_aggre_communit_sort(current_tag=[], size=10, offset=0, is_video=False, sort_type=CONTENT_AGGRE_SORT.DEFAULT, def content_aggre_communit_sort(current_tag=[], size=10, offset=0, is_video=False, sort_type=CONTENT_AGGRE_SORT.DEFAULT,
sun_tag=[], parent_tag=[], device_id="", user_city_tag_id=None, in_whitelist=False, sun_tag=[], parent_tag=[], device_id="", user_city_tag_id=None, in_whitelist=False,
top_data={CARD_TYPE.DIARY: [], CARD_TYPE.USERTOPIC: [], CARD_TYPE.QA: []}): top_data={CARD_TYPE.DIARY: [], CARD_TYPE.USERTOPIC: [], CARD_TYPE.QA: []}):
...@@ -1308,7 +1308,7 @@ def _get_tractate_ret_list(ret_list, tractate_results_list, tractate_index, scor ...@@ -1308,7 +1308,7 @@ def _get_tractate_ret_list(ret_list, tractate_results_list, tractate_index, scor
return (True, tractate_index) return (True, tractate_index)
@bind("doris/search/content_aggre_sku_sort") @bind("dymas/search/content_aggre_sku_sort")
def content_aggre_sku_sort(current_tag=[], size=10, offset=0, sun_tag=[], parent_tag=[], user_city_tag_id=None, def content_aggre_sku_sort(current_tag=[], size=10, offset=0, sun_tag=[], parent_tag=[], user_city_tag_id=None,
in_whitelist=False, source_from="sku"): in_whitelist=False, source_from="sku"):
""" """
...@@ -1687,7 +1687,7 @@ def process_sorting(sort_params): ...@@ -1687,7 +1687,7 @@ def process_sorting(sort_params):
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
@bind("doris/search/category_aggre_sort") @bind("dymas/search/category_aggre_sort")
def category_aggre_sort(current_tag=[], size=10, offset=0, device_id="", user_city_tag_id=None, in_whitelist=False, def category_aggre_sort(current_tag=[], size=10, offset=0, device_id="", user_city_tag_id=None, in_whitelist=False,
is_video=False, need_cpc_data=False): is_video=False, need_cpc_data=False):
""" """
...@@ -2125,7 +2125,7 @@ def get_answer_data_category(all_new_tag=[], have_read_dict=[], offset=0, size=1 ...@@ -2125,7 +2125,7 @@ def get_answer_data_category(all_new_tag=[], have_read_dict=[], offset=0, size=1
# ai扫脸或测肤报告页最美购或日记分类展示,下面参数tag_list是列表嵌套列表 # ai扫脸或测肤报告页最美购或日记分类展示,下面参数tag_list是列表嵌套列表
@bind("doris/search/ai_content") @bind("dymas/search/ai_content")
def ai_content(has_order, tag_list, in_whitelist, user_city_tag_id, device_id): def ai_content(has_order, tag_list, in_whitelist, user_city_tag_id, device_id):
if has_order: if has_order:
data = ai_service(tag_list, in_whitelist, user_city_tag_id, device_id) data = ai_service(tag_list, in_whitelist, user_city_tag_id, device_id)
...@@ -2272,7 +2272,7 @@ def ai_diary(tag_list, in_whitelist, user_city_tag_id, device_id): ...@@ -2272,7 +2272,7 @@ def ai_diary(tag_list, in_whitelist, user_city_tag_id, device_id):
# ai测肤报告页最上面美购或日记展示。下面参数tag_list是列表嵌套列表 # ai测肤报告页最上面美购或日记展示。下面参数tag_list是列表嵌套列表
@bind("doris/search/skin_ai_total_content") @bind("dymas/search/skin_ai_total_content")
def skin_ai_total_content(has_order, tag_list, in_whitelist, user_city_tag_id, device_id): def skin_ai_total_content(has_order, tag_list, in_whitelist, user_city_tag_id, device_id):
if has_order: if has_order:
data = skin_service(tag_list, in_whitelist, user_city_tag_id, device_id) data = skin_service(tag_list, in_whitelist, user_city_tag_id, device_id)
......
...@@ -2110,7 +2110,7 @@ def index_filter_diary(filters, offset=0, size=10): ...@@ -2110,7 +2110,7 @@ def index_filter_diary(filters, offset=0, size=10):
# todo # todo
# 取美购列表中美购关联的日记本 # 取美购列表中美购关联的日记本
# 排序按照首页精选排序 # 排序按照首页精选排序
@bind('doris/search/get_diaries_by_special_id') @bind('dymas/search/get_diaries_by_special_id')
def get_diaries_by_special_id(special_id, offset=0, size=10): def get_diaries_by_special_id(special_id, offset=0, size=10):
filters = {"special_id": special_id} filters = {"special_id": special_id}
hitids = index_filter_diary(filters, offset, size) hitids = index_filter_diary(filters, offset, size)
...@@ -2120,14 +2120,14 @@ def get_diaries_by_special_id(special_id, offset=0, size=10): ...@@ -2120,14 +2120,14 @@ def get_diaries_by_special_id(special_id, offset=0, size=10):
# todo # todo
# 取美购列表中美购关联的日记本 # 取美购列表中美购关联的日记本
# 排序按照首页精选排序 # 排序按照首页精选排序
@bind('doris/search/get_index_diaries') @bind('dymas/search/get_index_diaries')
def get_index_diaries(offset=0, size=10): def get_index_diaries(offset=0, size=10):
hitids = index_filter_diary({}, offset, size) hitids = index_filter_diary({}, offset, size)
return {'diaries': hitids} return {'diaries': hitids}
# 将gaia 请求es日记数据代码合并过来 # 将gaia 请求es日记数据代码合并过来
@bind("doris/search/query_diary") @bind("dymas/search/query_diary")
def query_diary( def query_diary(
query='', query='',
offset=0, offset=0,
...@@ -2172,7 +2172,7 @@ def query_diary( ...@@ -2172,7 +2172,7 @@ def query_diary(
return res return res
@bind("doris/search/query_diary_alpha") @bind("dymas/search/query_diary_alpha")
def query_diary_alpha( def query_diary_alpha(
query='', query='',
offset=0, offset=0,
...@@ -2196,7 +2196,7 @@ def query_diary_alpha( ...@@ -2196,7 +2196,7 @@ def query_diary_alpha(
# 将gaia 请求es日记数据代码合并过来 # 将gaia 请求es日记数据代码合并过来
@bind("doris/search/query_filter_diary") @bind("dymas/search/query_filter_diary")
def query_filter_diary( def query_filter_diary(
offset=0, offset=0,
size=5, size=5,
...@@ -2214,7 +2214,7 @@ def query_filter_diary( ...@@ -2214,7 +2214,7 @@ def query_filter_diary(
filter_invalid_picture, fields, use_fresh_tag, device_id, source_type) filter_invalid_picture, fields, use_fresh_tag, device_id, source_type)
@bind("doris/search/diaries") @bind("dymas/search/diaries")
def get_diaries(query='', offset=0, size=10, user_city_tag_id=None, sort_type=DIARY_ORDER_TYPE.DEFAULT, filters={}): def get_diaries(query='', offset=0, size=10, user_city_tag_id=None, sort_type=DIARY_ORDER_TYPE.DEFAULT, filters={}):
sort_params = {} sort_params = {}
if user_city_tag_id: if user_city_tag_id:
......
...@@ -404,7 +404,7 @@ def filter_doctor(offset=0, size=5, sort_type=DOCTOR_ORDER_TYPE.DEFAULT2, filter ...@@ -404,7 +404,7 @@ def filter_doctor(offset=0, size=5, sort_type=DOCTOR_ORDER_TYPE.DEFAULT2, filter
#todo #todo
#取美购列表中美购关联的医生 #取美购列表中美购关联的医生
#排序按照找医生默认排序输出 #排序按照找医生默认排序输出
@bind('doris/search/get_doctors_by_special_id') @bind('dymas/search/get_doctors_by_special_id')
def get_doctors_by_special_id(special_id, offset=0, size=10, sort_type=DOCTOR_ORDER_TYPE.DEFAULT): def get_doctors_by_special_id(special_id, offset=0, size=10, sort_type=DOCTOR_ORDER_TYPE.DEFAULT):
nested_fields = { "special_id": special_id} nested_fields = { "special_id": special_id}
es_data = filter_doctor( es_data = filter_doctor(
......
...@@ -77,7 +77,7 @@ def get_device_unread(device_id, tab_type, feed_type, city_id, offset, size, ...@@ -77,7 +77,7 @@ def get_device_unread(device_id, tab_type, feed_type, city_id, offset, size,
return ret if ret else recommends[:size] return ret if ret else recommends[:size]
@bind("doris/recommend/home_feed") @bind("dymas/recommend/home_feed")
def get_home_feed_recommend(device_id, tab_type, feed_type, offset, size, city_id, **kwargs): def get_home_feed_recommend(device_id, tab_type, feed_type, offset, size, city_id, **kwargs):
"""获取首页feed推荐的id列表。 """获取首页feed推荐的id列表。
...@@ -91,7 +91,7 @@ def get_home_feed_recommend(device_id, tab_type, feed_type, offset, size, city_i ...@@ -91,7 +91,7 @@ def get_home_feed_recommend(device_id, tab_type, feed_type, offset, size, city_i
return {feed_type: res} return {feed_type: res}
@bind("doris/recommend/video_tab") @bind("dymas/recommend/video_tab")
def get_video_tab_recommend(card_type, offset, size, device_id, source_type, **kwargs): def get_video_tab_recommend(card_type, offset, size, device_id, source_type, **kwargs):
try: try:
logging.info("get redis_client:%s" % redis_client) logging.info("get redis_client:%s" % redis_client)
......
...@@ -36,7 +36,7 @@ def label_key(label): ...@@ -36,7 +36,7 @@ def label_key(label):
return LABEL_VALUE.get(label) return LABEL_VALUE.get(label)
@bind('doris/query/inference') @bind('dymas/query/inference')
def query_inference(query=''): def query_inference(query=''):
try: try:
labels = list() labels = list()
......
...@@ -15,7 +15,7 @@ MAX_LOAD = 200 ...@@ -15,7 +15,7 @@ MAX_LOAD = 200
GROUP_SIZE = 10 GROUP_SIZE = 10
@bind('doris/search/query_principal') @bind('dymas/search/query_principal')
def query_principal(query='', doctor_type=0, offset=0, size=10): def query_principal(query='', doctor_type=0, offset=0, size=10):
now = int(time.time()) now = int(time.time())
...@@ -61,7 +61,7 @@ def query_principal(query='', doctor_type=0, offset=0, size=10): ...@@ -61,7 +61,7 @@ def query_principal(query='', doctor_type=0, offset=0, size=10):
return {'video_list': [], "tractate_list": []} return {'video_list': [], "tractate_list": []}
@bind('doris/search/query_principal_sort') @bind('dymas/search/query_principal_sort')
def query_principal_sort(query='', doctor_type=0, offset=0, size=10): def query_principal_sort(query='', doctor_type=0, offset=0, size=10):
""" """
医生医院二级页面混排 医生医院二级页面混排
...@@ -710,7 +710,7 @@ def get_two_page_data(query, doctor_type): ...@@ -710,7 +710,7 @@ def get_two_page_data(query, doctor_type):
return [] return []
@bind("doris/search/user_principal") @bind("dymas/search/user_principal")
def user_principal(query=0, offset=0, size=10, show_type=[]): def user_principal(query=0, offset=0, size=10, show_type=[]):
try: try:
channel_type = 0 channel_type = 0
...@@ -932,7 +932,7 @@ def user_principal(query=0, offset=0, size=10, show_type=[]): ...@@ -932,7 +932,7 @@ def user_principal(query=0, offset=0, size=10, show_type=[]):
return {'user_principal_sort': []} return {'user_principal_sort': []}
@bind("doris/search/user_photoalbum_sort") @bind("v/search/user_photoalbum_sort")
def get_user_album(user_id=-1, offset=0, size=10): def get_user_album(user_id=-1, offset=0, size=10):
""" """
用户主页下的相册的排序 日记问答帖子的排序 用户主页下的相册的排序 日记问答帖子的排序
......
...@@ -56,7 +56,7 @@ def query_by_question_term(es, term, sort, offset, size): ...@@ -56,7 +56,7 @@ def query_by_question_term(es, term, sort, offset, size):
return hit_ids return hit_ids
@bind('doris/filter/question') @bind('dymas/filter/question')
def filter_question(tag_id, sort_type, offset=0, size=10, filters={},use_fresh_tag=False): def filter_question(tag_id, sort_type, offset=0, size=10, filters={},use_fresh_tag=False):
# term = {"term": {"closure_tag_ids": tag_id}} # term = {"term": {"closure_tag_ids": tag_id}}
# es = get_es() # es = get_es()
...@@ -82,12 +82,12 @@ def filter_question(tag_id, sort_type, offset=0, size=10, filters={},use_fresh_t ...@@ -82,12 +82,12 @@ def filter_question(tag_id, sort_type, offset=0, size=10, filters={},use_fresh_t
return {"questions": question_ids} return {"questions": question_ids}
@bind("doris/search/recommend_question") @bind("dymas/search/recommend_question")
def recommend_question(query="", offset=0, size=10, filters={}, sort_type=QUESTION_ORDER_TYPE.DEFAULT): def recommend_question(query="", offset=0, size=10, filters={}, sort_type=QUESTION_ORDER_TYPE.DEFAULT):
res = recall_recommend_question_and_sku(query,offset,size,filters,sort_type) res = recall_recommend_question_and_sku(query,offset,size,filters,sort_type)
return {"result":res} return {"result":res}
@bind("doris/search/question") @bind("dymas/search/question")
def search_question(query="", offset=0, size=10, filters={}, sort_type=QUESTION_ORDER_TYPE.DEFAULT, drop_duplicated=True, need_diary_data=False): def search_question(query="", offset=0, size=10, filters={}, sort_type=QUESTION_ORDER_TYPE.DEFAULT, drop_duplicated=True, need_diary_data=False):
tail = offset + size tail = offset + size
question_ids = [] question_ids = []
...@@ -130,7 +130,7 @@ def search_question(query="", offset=0, size=10, filters={}, sort_type=QUESTION_ ...@@ -130,7 +130,7 @@ def search_question(query="", offset=0, size=10, filters={}, sort_type=QUESTION_
return {"question_problem_ids": question_ids} return {"question_problem_ids": question_ids}
@bind('doris/filter/top_question') @bind('dymas/filter/top_question')
def filter_top_question(sort_type=TOP_QUESTION_ORDER_TYPE.DEFAULT, filters={}, offset=0, size=10): def filter_top_question(sort_type=TOP_QUESTION_ORDER_TYPE.DEFAULT, filters={}, offset=0, size=10):
""" """
召回置顶问题 召回置顶问题
......
...@@ -59,7 +59,7 @@ class Tag(models.Model): ...@@ -59,7 +59,7 @@ class Tag(models.Model):
tag_type = models.CharField(verbose_name=u'标签类型', max_length=128) tag_type = models.CharField(verbose_name=u'标签类型', max_length=128)
@bind('doris/search/get_relation_query') @bind('dymas/search/get_relation_query')
def get_relation_query(query="", size=6, offset=0, device_id=""): def get_relation_query(query="", size=6, offset=0, device_id=""):
""" """
搜索相关 搜索相关
...@@ -120,7 +120,7 @@ def get_relation_query(query="", size=6, offset=0, device_id=""): ...@@ -120,7 +120,7 @@ def get_relation_query(query="", size=6, offset=0, device_id=""):
return {"relation_search_word": []} return {"relation_search_word": []}
@bind('doris/search/get_default_word') @bind('dymas/search/get_default_word')
def get_default_word(device_id=""): def get_default_word(device_id=""):
""" """
个性化展示数据限制为9个,热门词4-5个,运营配置词1-2个,总数保证为15个 个性化展示数据限制为9个,热门词4-5个,运营配置词1-2个,总数保证为15个
...@@ -166,7 +166,7 @@ def get_default_word(device_id=""): ...@@ -166,7 +166,7 @@ def get_default_word(device_id=""):
# #
@bind('doris/search/feed_other_watch') @bind('dymas/search/feed_other_watch')
def feed_other_watch(device_id="", tag_ids=[], size=4): def feed_other_watch(device_id="", tag_ids=[], size=4):
""" """
个性化展示数据限制为9个,热门词4-5个,运营配置词1-2个,总数保证为15个 个性化展示数据限制为9个,热门词4-5个,运营配置词1-2个,总数保证为15个
......
...@@ -230,7 +230,7 @@ def _get_article_ret_list(ret_list, article_results_list, article_index, score_b ...@@ -230,7 +230,7 @@ def _get_article_ret_list(ret_list, article_results_list, article_index, score_b
return (True, article_index) return (True, article_index)
@bind("doris/search/query_comprehensive") @bind("dymas/search/query_comprehensive")
def query_comprehensive(query='', def query_comprehensive(query='',
offset=0, offset=0,
size=10, size=10,
......
...@@ -12,7 +12,7 @@ import logging ...@@ -12,7 +12,7 @@ import logging
import time import time
@bind('doris/search/guess_you_like_service') @bind('dymas/search/guess_you_like_service')
def guess_you_like_service(hospital_id=None, tag_id=None, user_city_info=None, def guess_you_like_service(hospital_id=None, tag_id=None, user_city_info=None,
doctor_id=None, offset=0, size=10): doctor_id=None, offset=0, size=10):
""" """
......
...@@ -303,7 +303,7 @@ def query_sku(query='', user_city_tag_id=None, offset=0, size=2, ...@@ -303,7 +303,7 @@ def query_sku(query='', user_city_tag_id=None, offset=0, size=2,
# @param sort_params 排序条件 # @param sort_params 排序条件
# @date 20180409 # @date 20180409
@bind('doris/search/as_query_sku') @bind('dymas/search/as_query_sku')
def as_query_sku(query='', user_city_tag_id=None, offset=0, size=10, def as_query_sku(query='', user_city_tag_id=None, offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[], must_filters=False, sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[], must_filters=False,
inner_hits=False, have_get_service_ids=[]): inner_hits=False, have_get_service_ids=[]):
...@@ -393,7 +393,7 @@ def as_query_sku(query='', user_city_tag_id=None, offset=0, size=10, ...@@ -393,7 +393,7 @@ def as_query_sku(query='', user_city_tag_id=None, offset=0, size=10,
return {"sku_ids": [], "rank_mode": RANK_MODE.DEFAULT, "is_cpc": []} return {"sku_ids": [], "rank_mode": RANK_MODE.DEFAULT, "is_cpc": []}
@bind('doris/search/as_query_sku_pure') @bind('dymas/search/as_query_sku_pure')
def as_query_sku_pure(query='', user_city_tag_id=None, offset=0, size=10, def as_query_sku_pure(query='', user_city_tag_id=None, offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[]): sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[]):
"""基于sku mapping的es高级搜索""" """基于sku mapping的es高级搜索"""
...@@ -784,7 +784,7 @@ def get_mix_floor_hits(offset=0, size=10, special_id=None, sort_type=SERVICE_ORD ...@@ -784,7 +784,7 @@ def get_mix_floor_hits(offset=0, size=10, special_id=None, sort_type=SERVICE_ORD
return {}, RANK_MODE.DEFAULT return {}, RANK_MODE.DEFAULT
@bind('doris/search/seckill') @bind('dymas/search/seckill')
def seckill_query(special_id, user_city_info=None, offset=0, size=10, def seckill_query(special_id, user_city_info=None, offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[]): sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[]):
"""秒杀美购列表 """秒杀美购列表
...@@ -839,7 +839,7 @@ def seckill_query(special_id, user_city_info=None, offset=0, size=10, ...@@ -839,7 +839,7 @@ def seckill_query(special_id, user_city_info=None, offset=0, size=10,
return {'skus': skus_info, 'rank_mode': rest_result['rank_mode']} return {'skus': skus_info, 'rank_mode': rest_result['rank_mode']}
@bind('doris/search/special') @bind('dymas/search/special')
def special_query(special_id, user_city_info=None, floor_id=None, def special_query(special_id, user_city_info=None, floor_id=None,
offset=0, size=10, sort_type=SERVICE_ORDER_TYPE.DEFAULT, offset=0, size=10, sort_type=SERVICE_ORDER_TYPE.DEFAULT,
filters={}, sort_params={}, or_filters=[], mix_floor=False): filters={}, sort_params={}, or_filters=[], mix_floor=False):
...@@ -923,7 +923,7 @@ def special_query(special_id, user_city_info=None, floor_id=None, ...@@ -923,7 +923,7 @@ def special_query(special_id, user_city_info=None, floor_id=None,
return {'skus': skus_info, 'rank_mode': result['rank_mode']} return {'skus': skus_info, 'rank_mode': result['rank_mode']}
@bind('doris/search/judge_service_cpc') @bind('dymas/search/judge_service_cpc')
def judge_service_cpc(service_ids=[]): def judge_service_cpc(service_ids=[]):
""" """
统计接口判断美购是否是cpc 统计接口判断美购是否是cpc
...@@ -968,7 +968,7 @@ def judge_service_cpc(service_ids=[]): ...@@ -968,7 +968,7 @@ def judge_service_cpc(service_ids=[]):
return [] return []
@bind('doris/search/service_home_recommend') @bind('dymas/search/service_home_recommend')
def recommend_service_feed(device_id="", offset=0, size=10, def recommend_service_feed(device_id="", offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, sort_type=SERVICE_ORDER_TYPE.DEFAULT,
filters=None, sort_params=None, filters=None, sort_params=None,
...@@ -1158,7 +1158,7 @@ def recommend_service_feed(device_id="", offset=0, size=10, ...@@ -1158,7 +1158,7 @@ def recommend_service_feed(device_id="", offset=0, size=10,
return {"user_portrait_data": {}, "normal_sort_data": {}} return {"user_portrait_data": {}, "normal_sort_data": {}}
@bind('doris/search/content_detail_service') @bind('dymas/search/content_detail_service')
def content_detail_service(card_id=-1, card_type=None, card_author_message={}, user_city_tag_id=-1, tags={}, size=3, def content_detail_service(card_id=-1, card_type=None, card_author_message={}, user_city_tag_id=-1, tags={}, size=3,
related_serviceid=[]): related_serviceid=[]):
""" """
......
...@@ -6,7 +6,7 @@ from recommend.utils.device import get_realtime_interest ...@@ -6,7 +6,7 @@ from recommend.utils.device import get_realtime_interest
from search.utils.service import recall_spu, SMARTRANK_SORT from search.utils.service import recall_spu, SMARTRANK_SORT
@bind('doris/search/query_spu') @bind('dymas/search/query_spu')
def query_spu(query='', user_city_tag_id=None, offset=0, size=10, def query_spu(query='', user_city_tag_id=None, offset=0, size=10,
sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[]): sort_type=SERVICE_ORDER_TYPE.DEFAULT, filters={}, sort_params={}, or_filters=[]):
if sort_type == SERVICE_ORDER_TYPE.DEFAULT_REALTIME and ('device_id' in sort_params): if sort_type == SERVICE_ORDER_TYPE.DEFAULT_REALTIME and ('device_id' in sort_params):
......
...@@ -14,7 +14,7 @@ from libs.algorithms import variousness,variousness_for_problem ...@@ -14,7 +14,7 @@ from libs.algorithms import variousness,variousness_for_problem
from search.utils.subscript_article import recall_subscript_article from search.utils.subscript_article import recall_subscript_article
@bind('doris/filter/subscript_article') @bind('dymas/filter/subscript_article')
def filter_subscript_article(query, sort_type=SUBSCRIPT_ARTICLE_SORT.ORDERING, offset=0, count=10, filters={}): def filter_subscript_article(query, sort_type=SUBSCRIPT_ARTICLE_SORT.ORDERING, offset=0, count=10, filters={}):
"""搜索公众号文章。 """搜索公众号文章。
......
...@@ -257,7 +257,7 @@ def query_filter_comprehensive_tractate(query=None, have_read_tractate_list=[], ...@@ -257,7 +257,7 @@ def query_filter_comprehensive_tractate(query=None, have_read_tractate_list=[],
return dict() return dict()
@bind('doris/search/query_filter_tractate') @bind('dymas/search/query_filter_tractate')
def query_filter_tractate(query=None, offset=0, size=10, have_read_tractate_list=[], use_fresh_tag=False, def query_filter_tractate(query=None, offset=0, size=10, have_read_tractate_list=[], use_fresh_tag=False,
device_id=""): device_id=""):
try: try:
...@@ -411,7 +411,7 @@ def scatter(data, size): ...@@ -411,7 +411,7 @@ def scatter(data, size):
return data[:size] return data[:size]
@bind('doris/search/tractate_sort') @bind('dymas/search/tractate_sort')
def tractate_sort(filters=None, offset=0, size=10, query=None, use_fresh_tag=False, device_id='', source_type=0, def tractate_sort(filters=None, offset=0, size=10, query=None, use_fresh_tag=False, device_id='', source_type=0,
get_query=False, have_read_tractate=[], noarea_tags=[], all_tags=[], content_star_keyword=[]): get_query=False, have_read_tractate=[], noarea_tags=[], all_tags=[], content_star_keyword=[]):
try: try:
...@@ -639,7 +639,7 @@ def tractate_sort(filters=None, offset=0, size=10, query=None, use_fresh_tag=Fal ...@@ -639,7 +639,7 @@ def tractate_sort(filters=None, offset=0, size=10, query=None, use_fresh_tag=Fal
return {'tractate_id_list': []} return {'tractate_id_list': []}
@bind('doris/search/doctor_tractate_sort') @bind('dymas/search/doctor_tractate_sort')
def doctor_tractate_sort(filters=None, offset=0, size=10, query=None): def doctor_tractate_sort(filters=None, offset=0, size=10, query=None):
try: try:
filters = filters or {} filters = filters or {}
...@@ -686,7 +686,7 @@ def doctor_tractate_sort(filters=None, offset=0, size=10, query=None): ...@@ -686,7 +686,7 @@ def doctor_tractate_sort(filters=None, offset=0, size=10, query=None):
return {'tractate_id_list': []} return {'tractate_id_list': []}
@bind('doris/search/tractate_hotword') @bind('dymas/search/tractate_hotword')
def tractate_hotword(query='', size=10): def tractate_hotword(query='', size=10):
try: try:
redis_key = "gaia:hot_tractate_keyword:city_id:" + str(query) redis_key = "gaia:hot_tractate_keyword:city_id:" + str(query)
...@@ -702,7 +702,7 @@ def tractate_hotword(query='', size=10): ...@@ -702,7 +702,7 @@ def tractate_hotword(query='', size=10):
return {"hot_recommends": []} return {"hot_recommends": []}
@bind('doris/search/tractate_check_in') @bind('dymas/search/tractate_check_in')
def tractate_check_in(device_id, size): def tractate_check_in(device_id, size):
try: try:
key = 'device_register_tractate_queue:' + str(device_id) key = 'device_register_tractate_queue:' + str(device_id)
......
...@@ -14,7 +14,7 @@ GROUP_SIZE = 10 ...@@ -14,7 +14,7 @@ GROUP_SIZE = 10
variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE) variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE)
@bind('doris/search/query_wiki') @bind('dymas/search/query_wiki')
def query_wiki(query='', offset=0, size=10): def query_wiki(query='', offset=0, size=10):
try: try:
...@@ -142,7 +142,7 @@ def query_wiki(query='', offset=0, size=10): ...@@ -142,7 +142,7 @@ def query_wiki(query='', offset=0, size=10):
return {'wiki_all': []} return {'wiki_all': []}
@bind('doris/search/wiki_sort') @bind('dymas/search/wiki_sort')
def wiki_sort(filters=None, offset=0, size=10): def wiki_sort(filters=None, offset=0, size=10):
try: try:
filters = filters or {} filters = filters or {}
......
...@@ -18,7 +18,7 @@ GROUP_SIZE = 10 ...@@ -18,7 +18,7 @@ GROUP_SIZE = 10
variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE) variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE)
@bind('doris/search/query_wikitab_keyword') @bind('dymas/search/query_wikitab_keyword')
def query_wiki_keyword(query, offset=0, size=10, flag=False): def query_wiki_keyword(query, offset=0, size=10, flag=False):
try: try:
wiki_hot_keyword = HotKeyWord.fetch_keyword(query) wiki_hot_keyword = HotKeyWord.fetch_keyword(query)
......
...@@ -22,7 +22,7 @@ GROUP_SIZE = 10 ...@@ -22,7 +22,7 @@ GROUP_SIZE = 10
variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE) variousness_per_10 = functools.partial(variousness, variety_size=GROUP_SIZE)
@bind('doris/search/query_wikitab') @bind('dymas/search/query_wikitab')
def query_wiki(query='', offset=0, size=10, city_id='', source_type="tab", device_id=""): def query_wiki(query='', offset=0, size=10, city_id='', source_type="tab", device_id=""):
size = min(size, MAX_LOAD) size = min(size, MAX_LOAD)
...@@ -655,7 +655,7 @@ def get_zonghe_query(query, synonym_term_list): ...@@ -655,7 +655,7 @@ def get_zonghe_query(query, synonym_term_list):
return [] return []
@bind('doris/search/query_wiki_card') @bind('dymas/search/query_wiki_card')
def get_collect_wiki_card(query=""): def get_collect_wiki_card(query=""):
try: try:
all_data = {} all_data = {}
......
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