36 行
1.4 KiB
PHP
可执行文件
36 行
1.4 KiB
PHP
可执行文件
<?php
|
||
|
||
namespace Common\Model;
|
||
//[1.2.41]
|
||
/**
|
||
* 拼团
|
||
* Class RetailSkuGroupModel
|
||
* @package Common\Model
|
||
*/
|
||
class RetailSkuGroupModel extends BaseModel
|
||
{
|
||
protected $tableName = 'retail_sku_group';
|
||
|
||
const ID = 'id'; // `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||
const SKU_ID = 'sku_id'; // `sku_id` int(10) DEFAULT NULL COMMENT '关联规格id',
|
||
const GOODS_ID = 'goods_id'; // `goods_id` int(10) DEFAULT NULL COMMENT '关联商品id',
|
||
const STORE_ID = 'storeid'; // `storeid` int(10) DEFAULT NULL COMMENT '关联门店id',
|
||
const ACT_NUM = 'actnum'; // `actnum` int(10) DEFAULT NULL COMMENT '活动库存',
|
||
const ACT_PRICE = 'actprice'; // `actprice` decimal(10,2) DEFAULT NULL COMMENT '活动售价',
|
||
const SKU_ID_LIST = 'sku_id_list'; // `sku_id_list` varchar(100) DEFAULT NULL COMMENT '规格id(拼接)',
|
||
const ADD_TIME = 'addtime'; // `addtime` varchar(20) DEFAULT NULL COMMENT '添加时间',
|
||
|
||
/**
|
||
* 拼团规格联查(find)
|
||
*/
|
||
public function getSelectSku($map, $field = '*')
|
||
{
|
||
$find = $this->alias('gr')
|
||
->join('ls_retail_sku_goods as go on gr.' . $this::SKU_ID . '=go.id')
|
||
->field($field)
|
||
->where($map)
|
||
->select();
|
||
return $find;
|
||
}
|
||
}
|