weizong song 5 years ago
parent dad919abe4
commit a1c8705f12

@ -563,8 +563,46 @@ class OrdersController extends CommonController
* @OA\Parameter(name="skip_warnings", in="query", @OA\Schema(type="integer"), required=false, description="跳过警示项目"),
* @OA\Response(
* response="200",
* description="子订单修改"
*
* description="子订单修改",
* content={
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* property="errorcode",
* type="integer",
* description="错误码;仅在发生错误时发送"
* ),
* @OA\Property(
* property="errormsg",
* type="string",
* description="返回消息有errorcode时为错误内容无errorcode时为提示内容"
* ),
* @OA\Property(
* property="has_warnings",
* type="boolean",
* description="是否有警告内容仅在有警告内容且无错误代码的情况下发送此时读取errormsg为警告内容"
* ),
* @OA\Property(
* property="updated_items",
* type="integer",
* description="更新的子订单总数;仅在成功的情况下发送"
* ),
* @OA\Property(
* property="updated_paid_items",
* type="integer",
* description="产生了价格波动的子订单总数,连锁效应为每条价格波动会新增一条财务记录,并影响客户的余额;仅在成功的情况下发送"
* ),
* example={
* "errorcode": "105",
* "errormsg": "价格补差100超过了客户余额90请先充值",
* "has_warnings": 1,
* "updated_items": 10,
* "updated_paid_items": 3
* }
* )
* )
* }
* )
* )
*/
@ -642,7 +680,10 @@ class OrdersController extends CommonController
}
DB::commit();
return response()->json(["updated_items" => count($order_items)]);
return response()->json([
"updated_items" => count($order_items),
"updated_paid_items" => count($price_changed_paid_items)
]);
} catch (\Exception $exception) {
DB::rollBack();
return response()->json([

Loading…
Cancel
Save