From 4e0e36178d82ed486d8cec2c8f52ca96d715cc12 Mon Sep 17 00:00:00 2001
From: liyaozhi <lzhflash@163.com>
Date: Thu, 30 Oct 2025 19:16:05 +0800
Subject: [PATCH] 1、活动增加促销商品(完成后端) 2、修复小程序端活动相册下载不了的问题; 3、修复小程序端活动详情定位问题; 4、修复小程序端报名时免费的也弹出支付弹窗的问题; 5、修复分会后台活动核销码下载问题。
---
admin/app/common/model/plus/business/Order.php | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 48 insertions(+), 1 deletions(-)
diff --git a/admin/app/common/model/plus/business/Order.php b/admin/app/common/model/plus/business/Order.php
index e32413e..488326c 100644
--- a/admin/app/common/model/plus/business/Order.php
+++ b/admin/app/common/model/plus/business/Order.php
@@ -2,9 +2,56 @@
namespace app\common\model\plus\business;
use app\common\model\BaseModel;
+use app\common\service\order\OrderService;
+use app\common\enum\order\OrderPayStatusEnum;
+use app\common\enum\order\OrderPayTypeEnum;
+use app\api\service\order\PaymentService;
+use app\common\enum\order\OrderTypeEnum;
+/**
+ * 名片订单模型
+ */
class Order extends BaseModel
{
protected $name = 'business_card_order';
-
+
+ /**
+ * 关联用户表
+ */
+ public function user()
+ {
+ return $this->belongsTo('app\\common\\model\\user\\User', 'user_id', 'user_id');
+ }
+
+ /**
+ * 关联名片表
+ */
+ public function businessCard()
+ {
+ return $this->belongsTo('app\\common\\model\\plus\\business\\Business', 'business_card_id', 'business_card_id');
+ }
+
+ /**
+ * 关联名片等级表
+ */
+ public function grade()
+ {
+ return $this->belongsTo('app\\common\\model\\plus\\business\\Grade', 'grade_id', 'grade_id');
+ }
+
+ /**
+ * 生成订单号
+ */
+ public function orderNo()
+ {
+ return OrderService::createOrderNo();
+ }
+
+ /**
+ * 获取订单支付详情
+ */
+ public static function getPayDetail($orderNo)
+ {
+ return (new static())->with(['user', 'businessCard', 'grade'])->where(['order_no' => $orderNo])->find();
+ }
}
\ No newline at end of file
--
Gitblit v1.9.2