28 行
1.3 KiB
PHP
可执行文件
28 行
1.3 KiB
PHP
可执行文件
<?php
|
|
|
|
namespace Common\Model;
|
|
//[1.2.41]
|
|
class RetailScoreMallExchangeModel extends BaseModel
|
|
{
|
|
protected $tableName = 'retail_score_mall_exchange';
|
|
const ID = 'id';
|
|
const SCORE_MALL_ID = 'shopid'; //int(11) DEFAULT NULL COMMENT '商品id',
|
|
const VID = 'vid'; //int(11) DEFAULT NULL COMMENT '用户id',
|
|
const STATUS = 'status'; //varchar(255) DEFAULT NULL COMMENT '1未领取,2已领取',
|
|
const MERCHANT_ID = 'merchantid'; //int(11) DEFAULT NULL COMMENT '商户id',
|
|
const BAR_CODE = 'barcode'; //varchar(255) DEFAULT NULL COMMENT '条形码',
|
|
const TIME = 'time'; //varchar(255) DEFAULT NULL COMMENT '兑换时间',
|
|
const PAY_ORDER_ID = 'pay_order_id'; //int(11) DEFAULT NULL COMMENT '支付订单id',
|
|
const STATE = 'state'; //tinyint(4) DEFAULT '1' COMMENT '0未支付 1已支付',
|
|
const CASHIER_ID = 'cashier_id'; //tinyint(4) DEFAULT '1' COMMENT '0未支付 1已支付',
|
|
//收银端核销兑换商品
|
|
public function getGoods($where,$field)
|
|
{
|
|
$goods = $this->alias('e')
|
|
->join('ls_retail_scoremall as s on s.id=e.'.$this::SCORE_MALL_ID)
|
|
->field($field)
|
|
->where($where)
|
|
->find();
|
|
return $goods;
|
|
}
|
|
} |