\Ordergoods_model

Model Class

Summary

Methods
Properties
Constants
__construct()
__get()
getGoodsById()
orderGoodsCount()
addOrderGoods()
orderGoods()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$table
N/A

Properties

$table

$table : 

Type

Methods

__construct()

__construct() : void

Class constructor

__get()

__get(string  $key) 

__get magic

Allows models to access CI's loaded classes using the same syntax as controllers.

Parameters

string $key

getGoodsById()

getGoodsById(integer  $orderId) 

获取订单下的所有商品

Parameters

integer $orderId

orderGoodsCount()

orderGoodsCount(  $orderId) 

拿去商品数

Parameters

$orderId

addOrderGoods()

addOrderGoods(  $data) 

添加订单商品

Parameters

$data

array

orderGoods()

orderGoods(  $goodsId,   $goodsSku = '',   $orderId,   $spec = '') : array

拿去订单某个商品

Parameters

$goodsId

int 商品id

$goodsSku

str 商品sku

$orderId

int 订单id

$spec

str 商品规格

Returns

array