chore: 添加静态资源文件和版本配置文件
添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材 添加系统版本配置文件(.version)和常量定义文件(.constant) 更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件 添加验证码配置文件(captcha.php)和.gitignore规则
This commit is contained in:
76
app/dao/activity/coupon/StoreCouponDao.php
Normal file
76
app/dao/activity/coupon/StoreCouponDao.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\dao\activity\coupon;
|
||||
|
||||
|
||||
use app\dao\BaseDao;
|
||||
use app\model\activity\coupon\StoreCoupon;
|
||||
|
||||
/**
|
||||
* 优惠卷
|
||||
* Class StoreCouponDao
|
||||
* @package app\dao\activity\coupon
|
||||
*/
|
||||
class StoreCouponDao extends BaseDao
|
||||
{
|
||||
/**
|
||||
* 设置模型
|
||||
* @return string
|
||||
*/
|
||||
protected function setModel(): string
|
||||
{
|
||||
return StoreCoupon::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文章列表
|
||||
* @param array $where
|
||||
* @param int $page
|
||||
* @param int $limit
|
||||
* @return mixed
|
||||
*/
|
||||
public function getList(array $where, int $page, int $limit)
|
||||
{
|
||||
return $this->search($where)->page($page, $limit)->order('sort desc,id desc')->select()->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* 写入优惠卷
|
||||
* @param $cid
|
||||
* @param int $total_count
|
||||
* @param int $start_time
|
||||
* @param int $end_time
|
||||
* @param int $remain_count
|
||||
* @param int $status
|
||||
* @param int $is_permanent
|
||||
* @param int $full_reduction
|
||||
* @param int $is_give_subscribe
|
||||
* @param int $is_full_give
|
||||
* @return \crmeb\basic\BaseModel|\think\Model
|
||||
*/
|
||||
public function setIssue($cid, $total_count = 0, $start_time = 0, $end_time = 0, $remain_count = 0, $status = 0, $is_permanent = 0, $full_reduction = 0, $is_give_subscribe = 0, $is_full_give = 0)
|
||||
{
|
||||
$add_time = time();
|
||||
$data['cid'] = $cid;
|
||||
$data['start_time'] = $start_time;
|
||||
$data['end_time'] = $end_time;
|
||||
$data['total_count'] = $total_count;
|
||||
$data['remain_count'] = $remain_count;
|
||||
$data['is_permanent'] = $is_permanent;
|
||||
$data['status'] = $status;
|
||||
$data['is_give_subscribe'] = $is_give_subscribe;
|
||||
$data['is_full_give'] = $is_full_give;
|
||||
$data['full_reduction'] = $full_reduction;
|
||||
$data['add_time'] = $add_time;
|
||||
return $this->getModel()->create(compact('cid', 'start_time', 'end_time', 'total_count', 'remain_count', 'is_permanent', 'status', 'is_give_subscribe', 'is_full_give', 'full_reduction', 'add_time'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user