30 行
1.1 KiB
PHP
可执行文件
30 行
1.1 KiB
PHP
可执行文件
<?php
|
|
|
|
namespace Common\Model;
|
|
//[1.2.41]
|
|
class RetailGiftCardCoverModel extends BaseModel
|
|
{
|
|
protected $tableName = 'gift_card_cover';
|
|
const ID = 'id'; //int(11) NOT NULL AUTO_INCREMENT,
|
|
const MERCHANT_ID = 'merchantid'; //int(11) DEFAULT NULL COMMENT '商家id',
|
|
const GIFT_CARD_ID = 'gift_cardid'; //int(11) DEFAULT NULL COMMENT '礼品卡id',
|
|
const IMG_URL = 'img_url'; //varchar(255) DEFAULT NULL COMMENT '礼品卡封面',
|
|
const ADD_TIME = 'addtime'; //varchar(255) DEFAULT NULL,
|
|
const STATUS = 'status'; //varchar(1) DEFAULT '0' COMMENT '0为停用 1为启用',
|
|
const STATE = 'state'; //varchar(1) DEFAULT '1' COMMENT '1 正常 2 删除',
|
|
const IMG_URL_ID = 'img_url_id'; //varchar(255) DEFAULT '0',
|
|
|
|
/*
|
|
* 获取礼品卡的图片
|
|
*/
|
|
public function getGiftImg($where,$field)
|
|
{
|
|
$detail = $this->alias('c')
|
|
->join('ls_gift_card_record as r on r.gift_cover_id=c.'.$this::ID)
|
|
->join('ls_gift_card as g on g.id=r.gift_id')
|
|
->where($where)
|
|
->field($field)
|
|
->find();
|
|
return $detail;
|
|
}
|
|
} |