jared 3 år sedan
förälder
incheckning
9387fede5f
1 ändrade filer med 11 tillägg och 0 borttagningar
  1. 11 0
      swire_shop_item_list.py

+ 11 - 0
swire_shop_item_list.py

@@ -111,6 +111,17 @@ def get_next_job(db,repeat=False,repkw=None,repnum=None):
         result['kw']=repkw
         result['num']=repnum
 
+    if repkw=='REP':
+        cursor = db.query('select  lat_txt,lon_txt,keyword,num from swire_store_list order by rand() limit 1')
+        for c in cursor:
+            result['kw']=c['keyword']
+            result['num']=c['num']
+            result['lat']=c['lat_txt']
+            result['lon']=c['lon_txt']
+            result['loc']=''
+            return result
+    
+
     cursor = db.query('select lat,lon,loc from lat_lon_loc where num ="'+str(result['num'])+'"')
     for c in cursor:
         result['lat']=c['lat']