修复会员列表新增字段之后无法正常发送消息跟通知的问题

This commit is contained in:
zayac 2024-03-27 22:45:20 +08:00
parent a4f003d215
commit c947576a85

View File

@ -1,6 +1,6 @@
from dataclasses import dataclass
from dataclasses import dataclass, field
from datetime import datetime
from typing import List
from typing import List, Optional
from src.core import api_request
from src.core.constant import MEMBER_DETAIL_URL, MEMBER_LIST_URL
@ -31,7 +31,6 @@ class BaseMember:
vipGradeStr: str
firstPayAt: str
remark: str
status: int
@dataclass
@ -39,12 +38,14 @@ class MemberList(BaseMember):
venueNetAmountList: str
tagsIds: str
tagsInfo: str
status: Optional[int] = field(default=None)
@dataclass
class MemberDetail(BaseMember):
venueNetAmountList: list
tags: str
status: Optional[int] = field(default=None)
def get_first_pay_datetime(self) -> datetime:
return datetime.strptime(self.firstPayAt, "%Y-%m-%d %H:%M:%S")