Commit 2863fcc2 by larosa

add ext attr

parent ff83e25d
Showing with 33 additions and 16 deletions
......@@ -18,20 +18,19 @@ config_prod = {
conf = config_prod
if __name__ == '__main__':
host = conf["redis"]["host"]
port = conf["redis"]["port"]
password = conf["redis"]["password"]
db = redis.Redis(host=host, port=port, password=password, decode_responses=True)
# ans = db.hget("jd_ext_attr", "33836")
ans = db.hgetall("jd_ext_attr")
print(ans)
# if __name__ == '__main__':
# host = conf["redis"]["host"]
# port = conf["redis"]["port"]
# password = conf["redis"]["password"]
# db = redis.Redis(host=host, port=port, password=password, decode_responses=True)
# # ans = db.hget("jd_ext_attr", "33836")
# ans = db.hgetall("jd_ext_attr")
# print(ans)
# if __name__ == '__main__':
# query_sql = "select * from lie_shop_push_sku_log"
# db = pymysql.connect(host=conf["mysql"]["host"], port=3306, user=conf["mysql"]["user"], password=conf["mysql"]["password"], database=conf["mysql"]["database"])
# cursor = db.cursor()
# cursor.execute(query=query_sql)
# results = cursor.fetchall()
# print(results[0][4])
\ No newline at end of file
if __name__ == '__main__':
query_sql = "update lie_shop_attr set is_required = 0 where id = 5096 or id = 5097"
db = pymysql.connect(host=conf["mysql"]["host"], port=3306, user=conf["mysql"]["user"], password=conf["mysql"]["password"], database=conf["mysql"]["database"])
cursor = db.cursor()
cursor.execute(query=query_sql)
db.commit()
\ No newline at end of file
# 查找分类下拓展参数
import json
from common import request_to_jd_vc
method_name = "jingdong.vc.item.extProps.find"
token = "845ce8478b074103b9e78a769d5fa4831y2u"
app_key = "CA52430E90209F51D8F5D7B615DDE9AD"
app_secret = "c92691b2379c48de87e699c4c2f7fb32"
param = {
"category_leaf_id": 33465
}
if __name__ == '__main__':
ans = request_to_jd_vc(method_name, token, app_key, app_secret)
print(json.dumps(ans, ensure_ascii=False))
\ No newline at end of file
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 sign in to comment