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.
 
 
 
 
 
 
shipin/app/services/product/sku/StoreProductVirtualServices...

26 lines
629 B

<?php
namespace app\services\product\sku;
use app\dao\product\sku\StoreProductVirtualDao;
use app\services\BaseServices;
class StoreProductVirtualServices extends BaseServices
{
public function __construct(StoreProductVirtualDao $dao)
{
$this->dao = $dao;
}
public function getArr($unique, $product_id)
{
$res = $this->dao->getColumn(['attr_unique' => $unique, 'product_id' => $product_id], 'card_no,card_pwd');
$data = [];
foreach ($res as $item) {
$data[] = ['key' => $item['card_no'], 'value' => $item['card_pwd']];
}
return $data;
}
}