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

10 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',
];
/**
* 更新关系记录
10 months ago
* @param int $orderId
10 months ago
* @param array $imageIds 新的图片集
* @return array|false
*/
10 months ago
public static function updates(int $orderId, array $imageIds)
10 months ago
{
// 删除所有的sku记录
10 months ago
static::deleteAll(['order_id' => $orderId]);
10 months ago
// 批量写入商品图片记录
10 months ago
return static::increased($orderId, $imageIds);
10 months ago
}
}