Commit ec890291 authored by 高雅喆's avatar 高雅喆

fix bug in test/getFeatures.py of platform name

parent 8fbe67db
......@@ -24,8 +24,8 @@ class TopFeatures(object):
def get_click_times(self):
# rtype : dict
if self.cid_type[-2] == 'e':
self.cid_type = self.cid_type.replace(' ','')
if self.platform[-2] == 'e':
self.platform = self.platform.replace(' ','')
sql = "select cid,count(cid) from data_feed_click \
where from_unixtime(time,'%Y-%m-%d')=date_add(curdate(), interval -{0} day) \
and device_type{1} and cid_type='{2}' \
......@@ -36,8 +36,8 @@ class TopFeatures(object):
def get_impression_times(self):
# rtype : dict
if self.cid_type[-2] == 'e':
self.cid_type = self.cid_type[:-6] + ' ' + self.cid_type[:-6:]
if self.platform[-2] == 'e':
self.platform = self.platform[:-6] + ' ' + self.platform[:-6:]
sql = "select cid,count(cid) from data_feed_exposure \
where from_unixtime(time,'%Y-%m-%d')=date_add(curdate(), interval -{0} day) \
and device_type{1} and cid_type='{2}' \
......
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