Beispiel #1
0
def getMallByItemtemplateid(itemid):
    """根据物品模板Id获取特价商品剩余时间"""
    info = dbaccess.getMallItemById(itemid)
    if info:
        if info["tag"].find("1") != -1:
            nowtime = datetime.datetime.fromtimestamp(time.time())  # 系统当前时间
            down = info["cheapend"]
            s1 = (down - nowtime).days * 24 * 3600
            s2 = (down - nowtime).seconds
            #            hours=s2//3600
            #            m=s2%3600
            #            m1=m//60
            #            s=m%60
            return {"result": True, "message": u"返回数据", "daga": s1 + s2}
        else:
            return {"result": False, "message": Lg().g(194)}
    return {"result": False, "message": Lg().g(189)}
Beispiel #2
0
def getMallByItemtemplateid(itemid):
    '''根据物品模板Id获取特价商品剩余时间'''
    info = dbaccess.getMallItemById(itemid)
    if info:
        if info['tag'].find('1') != -1:
            nowtime = datetime.datetime.fromtimestamp(time.time())  #系统当前时间
            down = info['cheapend']
            s1 = (down - nowtime).days * 24 * 3600
            s2 = (down - nowtime).seconds
            #            hours=s2//3600
            #            m=s2%3600
            #            m1=m//60
            #            s=m%60
            return {'result': True, 'message': u'返回数据', 'daga': s1 + s2}
        else:
            return {'result': False, 'message': Lg().g(194)}
    return {'result': False, 'message': Lg().g(189)}
Beispiel #3
0
 def initmallitem(self,itemid):
     info=dbaccess.getMallItemById(id)
     
Beispiel #4
0
 def initmallitem(self, itemid):
     info = dbaccess.getMallItemById(id)