添加开发者发货功能
This commit is contained in:
@@ -35,4 +35,38 @@ class OrderShipService
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 需求交付发货单(开发者发货:凭证截图+交付附件+备注)
|
||||
* @param $order_no
|
||||
* @param $order_goods_spu_id
|
||||
* @param $demand_id
|
||||
* @param array $images
|
||||
* @param array $files
|
||||
* @param string $remark
|
||||
* @return mixed
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function createDemandDelivery($order_no, $order_goods_spu_id, $demand_id, array $images, array $files, $remark = '')
|
||||
{
|
||||
$imagesStr = json_encode($images, JSON_UNESCAPED_UNICODE);
|
||||
$filesStr = json_encode($files, JSON_UNESCAPED_UNICODE);
|
||||
if (mb_strlen($imagesStr) > 1000 || mb_strlen($filesStr) > 1000) {
|
||||
exception('附件内容过多,请精简后重新发货');
|
||||
}
|
||||
$data = [
|
||||
'order_no' => $order_no,
|
||||
'order_goods_spu_id' => $order_goods_spu_id,
|
||||
'demand_id' => $demand_id,
|
||||
'images' => $imagesStr,
|
||||
'files' => $filesStr,
|
||||
'remark' => $remark,
|
||||
];
|
||||
$res = self::create($data);
|
||||
if (!$res) {
|
||||
exception('创建发货单数据失败');
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user