修复内容

This commit is contained in:
2026-01-16 18:26:15 +08:00
parent daae84b827
commit 41ad75af08
4 changed files with 81 additions and 41 deletions

View File

@@ -0,0 +1,17 @@
<?php
namespace app\api\model;
use think\Model;
use think\model\relation\HasOne;
class OrderEvaluate extends Model
{
protected $name = 'orderexe_evaluate';
//关联子订单
public function orderexe():HasOne
{
return $this->hasOne('Orderexe','id','order_id');
}
}

View File

@@ -97,6 +97,13 @@ class Orderexe extends Model
return $this->hasMany('order_goods', 'order_id', 'id');
}
//关联商品
public function goods()
{
return $this->belongsTo('goods', 'goods_id', 'id')
->field('id,name,image,min_price');
}
public function getGoodsCountAttr($value, $data)
{