智简魔方文档

获取订单相关变量

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\logic\NoticeTemplateVarLogic::getOrderVar
所属业务订单管理
来源模块/系统通知模板变量逻辑

功能说明

获取订单相关变量

调用示例

$param = [['order_id' => 1, 'client_id' => 1]];
$result = (new \app\common\logic\NoticeTemplateVarLogic())->getOrderVar($param);

参数

参数类型必填默认值校验规则说明
paramarray参数
param.order_idintrequire订单ID
param.client_idint用户ID

返回值

返回项类型说明
order_idstring订单ID
order_create_timestring订单创建时间
order_amountstring订单金额
pay_timestring支付时间

正常返回

{
  "order_id": "1",
  "order_create_time": "string",
  "order_amount": "string",
  "pay_time": "string"
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。