Ejemplo n.º 1
0
    def send_refund_agree_weixin_message(self):
        # type : () -> None
        from flashsale.xiaolumm.models import WeixinPushEvent
        from shopapp.weixin.apis import WeixinPush

        push = WeixinPush()
        push.push_refund_notify(
            self, WeixinPushEvent.SALE_REFUND_AGREE)  # 推送同意退款微信消息
Ejemplo n.º 2
0
    def send_refund_success_weixin_message(self):
        # type : () -> None
        """发送退款成功微信推送
        """
        from flashsale.xiaolumm.models import WeixinPushEvent
        from shopapp.weixin.apis import WeixinPush

        push = WeixinPush()
        push.push_refund_notify(
            self, WeixinPushEvent.SALE_REFUND_GOODS_SUCCESS)  # 推送退款成功微信消息
Ejemplo n.º 3
0
    def send_goods_backed_message(self):
        """
        功能: 发送 用户的退货 已经到达仓库的 消息给用户
        """
        from shopapp.weixin.apis import WeixinPush
        from flashsale.xiaolumm.models import WeixinPushEvent

        salerefund = self.get_sale_refund()
        if not salerefund:
            return
        push = WeixinPush()
        push.push_refund_notify(salerefund, WeixinPushEvent.SALE_REFUND_ARRIVE)
        return
Ejemplo n.º 4
0
def test_push_salerefund():
    from flashsale.pay.models import SaleRefund
    salerefund = SaleRefund.objects.get(id=54103)
    push = WeixinPush()
    push.push_refund_notify(salerefund, 9)