Commit 378f5712 authored by 李小芳's avatar 李小芳

修改ID的存储方式

parent fc38cd07
......@@ -24,7 +24,7 @@ class BrandWikiTransfer(object):
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.name))
if ret_bol:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "brandwiki" + str(instance.id)
item_dict["id"] = "brandwiki_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.name)
......@@ -51,7 +51,7 @@ class BrandWikiTransferV1(object):
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.name), type_v1=True)
if ret_bol:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "brandwiki" + str(instance.id)
item_dict["id"] = "brandwiki_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.name)
......
......@@ -24,7 +24,7 @@ class CollectWikiTransfer(object):
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.name))
if ret_bol:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "collectwiki" + str(instance.id)
item_dict["id"] = "collectwiki_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.name)
......@@ -51,7 +51,7 @@ class CollectWikiTransferV1(object):
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.name), type_v1=True)
if ret_bol:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "collectwiki" + str(instance.id)
item_dict["id"] = "collectwiki_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.name)
......
......@@ -92,7 +92,7 @@ class DoctorTransfer(object):
suggest_list = list()
if cut_bool == False:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "doctor" + str(instance.id)
item_dict["id"] = "doctor_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_doctor_query_word_weight(name=instance.name,
......@@ -190,7 +190,7 @@ class DoctorTransferV1(object):
suggest_list = list()
if not cut_bool:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "doctor" + str(instance.id)
item_dict["id"] = "doctor_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_doctor_query_word_weight(name=instance.name,
......
......@@ -31,7 +31,7 @@ class HospitalTransfer(object):
if cut_bool == False:
item_dict = dict()
# item_dict["id"] = getMd5Digest(str(name))
item_dict["id"] = "hospital" + str(instance.id)
item_dict["id"] = "hospital_" + str(instance.id)
item_dict["ori_name"] = name
item_dict["is_online"] = by_hospital_id_judge_office_online(is_online=instance.is_online,
hospital_id=instance.id, name=name)
......@@ -83,7 +83,7 @@ class HospitalTransferV1(object):
if cut_bool == False:
item_dict = dict()
# item_dict["id"] = getMd5Digest(str(name))
item_dict["id"] = "hospital" + str(instance.id)
item_dict["id"] = "hospital_" + str(instance.id)
item_dict["ori_name"] = name
item_dict["is_online"] = by_hospital_id_judge_office_online(is_online=instance.is_online,
hospital_id=instance.id, name=name)
......
......@@ -90,7 +90,7 @@ class ItemWikiTransfer(object):
logging.info("get_wiki_query:%s,ret_bol:%s" % (instance.name, ret_bol))
if ret_bol:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "itemwiki" + str(instance.id)
item_dict["id"] = "itemwiki_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.name)
......@@ -181,7 +181,7 @@ class ItemWikiTransferV1(object):
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.name), type_v1=True)
if ret_bol:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "itemwiki" + str(instance.id)
item_dict["id"] = "itemwiki_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.name)
......
......@@ -24,7 +24,7 @@ class ProduceWikiTransfer(object):
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.name))
if ret_bol:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "productwiki" + str(instance.id)
item_dict["id"] = "productwiki_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.name)
......@@ -51,7 +51,7 @@ class ProduceWikiTransferV1(object):
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.name), type_v1=True)
if ret_bol:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["id"] = "productwiki" + str(instance.id)
item_dict["id"] = "productwiki_" + str(instance.id)
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.name)
......
......@@ -22,7 +22,7 @@ class SearchWord(object):
is_online = False
if ret_bol:
# item_dict["id"] = getMd5Digest(keyword)
item_dict["id"] = "search_query" + str(instance.id)
item_dict["id"] = "search_query_" + str(instance.id)
item_dict["ori_name"] = keyword
total_num = QueryWordAttr.get_search_query_results_num(keyword)
if total_num > 3:
......@@ -56,7 +56,7 @@ class SearchWord(object):
ret_bol = QueryWordAttr.save_query_to_redis(query=sub_query, type_v1=True)
if ret_bol:
# item_dict["id"] = getMd5Digest(keyword)
item_dict["id"] = "search_query" + str(instance.id)
item_dict["id"] = "search_query_" + str(instance.id)
item_dict["ori_name"] = keyword
if QueryWordAttr.get_search_query_results_num(keyword):
is_online = False if instance.is_delete else True
......
......@@ -54,7 +54,7 @@ class WordResemble(object):
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.keyword))
if not cut_bool and ret_bol:
# item_dict["id"] = getMd5Digest(str(instance.keyword))
item_dict["id"] = "resemble" + str(instance.id)
item_dict["id"] = "resemble_" + str(instance.id)
item_dict["ori_name"] = instance.keyword
item_dict["is_online"] = True
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.keyword)
......@@ -241,7 +241,8 @@ class WordResembleV1(object):
cut_bool = True
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.keyword), type_v1=True)
if not cut_bool and ret_bol:
item_dict["id"] = getMd5Digest(str(instance.keyword))
# item_dict["id"] = getMd5Digest(str(instance.keyword))
item_dict["id"] = "resemble_" + str(instance.id)
item_dict["ori_name"] = instance.keyword
item_dict["is_online"] = True
item_dict["order_weight"] = QueryWordAttr.get_project_query_word_weight(instance.keyword)
......
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