update
This commit is contained in:
parent
5fc1acfbf9
commit
2ba47c5e25
@ -1,11 +1,13 @@
|
|||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
from app.core.mpclient import mp_client
|
from app.core.mpclient import mp_client
|
||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
|
import logging
|
||||||
|
|
||||||
|
|
||||||
# 发送订单状态改变消息
|
# 发送订单状态改变消息
|
||||||
async def sent_order_status_change_message(openid: str, template_id: str, data: dict):
|
async def sent_order_status_change_message(openid: str, template_id: str, data: dict):
|
||||||
|
|
||||||
|
try:
|
||||||
await mp_client.send_template_message(
|
await mp_client.send_template_message(
|
||||||
openid=openid,
|
openid=openid,
|
||||||
template_id=template_id,
|
template_id=template_id,
|
||||||
@ -15,3 +17,5 @@ async def sent_order_status_change_message(openid: str, template_id: str, data:
|
|||||||
"path": f"/pages/order/detail/index?id={data.orderid}"
|
"path": f"/pages/order/detail/index?id={data.orderid}"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
except Exception as e:
|
||||||
|
logging.exception(f"发送模板消息失败: {str(e)}")
|
||||||
Loading…
Reference in New Issue
Block a user