初始化项目:添加后端代码、ThinkPHP框架、前端资源

This commit is contained in:
amb
2026-09-03 12:42:39 +08:00
commit 482bece22e
3726 changed files with 416708 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace app\admin\model\data;
use think\Model;
class Order extends Model
{
// 表名
protected $name = 'order';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
/**
* 获取时间区间内的支付人数
* @param $startTime
* @param $endTime
* @return void
*/
public function getTimeRangePayUserCount($startTime,$endTime){
return self::where([
'createtime'=>['between',[$startTime,$endTime]],
'status'=>['in',[\app\common\constant\order\Status::STATUS_PAID,\app\common\constant\order\Status::STATUS_UNRECEIVE,\app\common\constant\order\Status::STATUS_UNSEND,\app\common\constant\order\Status::STATUS_SUREUNRECEIVE,\app\common\constant\order\Status::STATUS_SUCCESS]]
])->group('user_id')
->count();
}
}