def is_ok(self): if self.method == 'verify': ok = self.message.data.isSuccess if not ok: self.error = PropDict( coupon_sn=mix_str(self.message.data.siteCode), msg=mix_str(self.message.data.message).replace('糯米', '')) return ok
def is_ok(self): if self.method == 'verify': ok = self.message.data.isSuccess if not ok: self.error = PropDict( coupon_sn=mix_str(self.message.data.siteCode), msg=mix_str(self.message.data.message).replace('糯米','') ) return ok
def is_ok(self): if self.method == 'verify': ok = self.message.status == 1 if not ok: self.error = PropDict( coupon_sn=mix_str(self.message.data.code), msg=(mix_str(self.message.data.errmsg)) ) return ok
def is_ok(self): if self.method == 'verify': result = self.message.msg.serialNumList for i in result: if i.result.code != 200: self.error.append( PropDict(coupon_sn=mix_str(i.serialNum), msg=mix_str(i.result.msg.message))) return any([i.result.code == 200 for i in result])
def is_ok(self): if self.method == 'verify': result = self.message.msg.serialNumList for i in result: if i.result.code != 200: self.error.append(PropDict( coupon_sn=mix_str(i.serialNum), msg=mix_str(i.result.msg.message) )) return any([i.result.code == 200 for i in result])
def find_order_info(self): logging.info('nuomi self.message: %s', self.message) for key in self.params.goods_keys: if self.message.data.dealName.encode('utf-8').find(key) >= 0: return PropDict(goods_id=self.params.goods_keys[key], coupon_sn=mix_str(self.message.data.siteCode), distributor_shop_id=self.params.distributor_shop_id) return None
def find_order_info(self): logging.info('nuomi self.message: %s', self.message) for key in self.params.goods_keys: if self.message.data.dealName.encode('utf-8').find(key) >= 0: return PropDict( goods_id=self.params.goods_keys[key], coupon_sn=mix_str(self.message.data.siteCode), distributor_shop_id=self.params.distributor_shop_id) return None