You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/app/api/model/RecoveryImage.php

32 lines
703 B

11 months ago
<?php
declare (strict_types=1);
namespace app\api\model;
use app\common\model\RecoveryImage as BaseRecoveryImage;
class RecoveryImage extends BaseRecoveryImage
{
/**
* 隐藏字段
* @var array
*/
protected $hidden = [
'store_id',
'create_time',
];
/**
* 更新关系记录
11 months ago
* @param int $orderId
11 months ago
* @param array $imageIds 新的图片集
* @return array|false
*/
11 months ago
public static function updates(int $orderId, array $imageIds)
11 months ago
{
// 删除所有的sku记录
11 months ago
static::deleteAll(['order_id' => $orderId]);
11 months ago
// 批量写入商品图片记录
11 months ago
return static::increased($orderId, $imageIds);
11 months ago
}
}