宝体数据调用接口
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.
 
 
 
 
 
 

38 lines
789 B

<?php
namespace app\store\model;
use app\common\model\SpecValue as SpecValueModel;
/**
* 规格/属性(值)模型
* Class SpecValue
* @package app\store\model
*/
class SpecValue extends SpecValueModel
{
/**
* 根据规格组名称查询规格id
* @param $spec_id
* @param $spec_value
* @return mixed
*/
public function getSpecValueIdByName($spec_id, $spec_value)
{
return self::where(compact('spec_id', 'spec_value'))->value('spec_value_id');
}
/**
* 新增规格值
* @param $spec_id
* @param $spec_value
* @return false|int
*/
public function add($spec_id, $spec_value)
{
$wxapp_id = self::$wxapp_id;
return $this->save(compact('spec_value', 'spec_id', 'wxapp_id'));
}
}