|
|
|
@ -183,7 +183,7 @@ class Goods extends GoodsModel |
|
|
|
|
public function setIsPool(array $goodsIds, int $is_pool): bool |
|
|
|
|
{ |
|
|
|
|
// 批量更新记录 |
|
|
|
|
return static::updateBase(['is_pool' => $is_pool,'update_time' => time()], [['goods_id', 'in', $goodsIds]]); |
|
|
|
|
return static::updateBase(['is_pool' => $is_pool,'update_time' => time(),'sale_time' => time()], [['goods_id', 'in', $goodsIds]]); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 修改商品状态 |
|
|
|
@ -194,7 +194,7 @@ class Goods extends GoodsModel |
|
|
|
|
public function setIsSale(array $goodsIds, int $is_sale): bool |
|
|
|
|
{ |
|
|
|
|
// 批量更新记录 |
|
|
|
|
return static::updateBase(['is_sale' => $is_sale,'update_time' => time()], [['goods_id', 'in', $goodsIds]]); |
|
|
|
|
return static::updateBase(['is_sale' => $is_sale,'update_time' => time(),'sale_time' => time()], [['goods_id', 'in', $goodsIds]]); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 修改商品状态 |
|
|
|
|