sql_ZIdatabase.cursor.execute(f"select SubTitle from VW_Relation_Property where SubCategoryCode='{categorycode}' and (Isimportant = '1' or Ispeijian = '1')")
sql_ZIdatabase.cursor.execute(f"select SubTitle,Isimportant,Isbiaozhunzhi,ispeijian from VW_Relation_Property where SubCategoryCode='{categorycode}' and (Isimportant = '1' or Ispeijian = '1')")
self.sql_LXWL.cursor.execute("select sku from product_all where productcode is null and state='1' and (ziying='1' or ziying is null) and (dingzhi='1' or ziying is null)")
exceptpymssql.ProgrammingError:
self.sql_LXWL.cursor.execute("select sku from product_all where productcode is null and state='1'")
sku_data=self.sql_LXWL.cursor.fetchall()
sku_list=[]
#print(len(sku_data))
forskuinsku_data:
sku=sku[0]
sku_list.append(sku)
sku_set=list(set(sku_list))
#print(len(sku_set))
returnsku_set
defget_JD_sku(self):
self.sql_JDZH.cursor.execute("select sku from SKU2pcode where productcode = 'NULL'")
#self.sql_JDZH.cursor.execute("select sku from goods_detail where band_name like '%联想%'")
sku_data=self.sql_JDZH.cursor.fetchall()
sku_list=[]
forskuinsku_data:
sku=sku[0]
sku_list.append(sku)
sku_set=list(set(sku_list))
returnsku_set
defget_data_LXWL(self,sku):
self.sql_LXWL.cursor.execute(f"select sku,brand,name,category,createdate,url from product_detail where sku='{sku}'")
data=self.sql_LXWL.cursor.fetchall()[0]
data=list(data)
symbol=0
#sql_ZIdatabase.cursor.execute(f'select * from Product_Relation_Attribute_SubTitle where SourceSubCategory={data[3]}')
self.sql_ZIdatabase_local.cursor.execute(f"select ZI_SubCategoryCode,ZI_SubTitle from Product_Relation_Attribute_SubTitle where SourceSubCategory='{data[3]}' and Source='{self.channel}'")
self.sql_ZIdatabase_local.cursor.execute(f"select ZI_SubCategoryCode,ZI_SubTitle from Product_Relation_Attribute_SubTitle where SourceSubCategory='{data[3]}'")