wupengfei 2 年之前
父節點
當前提交
a70c20714a

+ 4 - 2
application/api/controller/Appointment.php

@@ -107,6 +107,7 @@ class Appointment extends Base
      * @return name:code type:string default:--  desc:预约号
      * @return name:remark type:string default:--  desc:订单备注
      * @return name:goods_name type:string default:--  desc:商品名称
+     * @return name:desc type:string default:--  desc:商品副标题
      * @return name:cover type:string default:--  desc:商品封面
      * @return name:goods_spec type:string default:--  desc:商品规格
      * @return name:goods_id type:int default:--  desc:商品id
@@ -119,7 +120,7 @@ class Appointment extends Base
         $where[] = ['a.user_id','=',$this->user_id];
         $where[] = ['a.is_deleted','=',0];
         if($status > -1) $where[] = ['status','=',$status];
-        $list = AppOrder::field('a.id,a.goods_id,a.spec_id,a.order_no,a.status,a.code,a.remark,g.name goods_name,g.cover,i.goods_spec')->alias('a')
+        $list = AppOrder::field('a.id,a.goods_id,a.spec_id,a.order_no,a.status,a.code,a.remark,g.name goods_name,g.cover,i.goods_spec,g.desc')->alias('a')
             ->leftJoin('StoreGoods g','a.goods_id = g.id')
             ->leftJoin('StoreGoodsItem i','a.spec_id = i.id')
             ->where($where)
@@ -152,6 +153,7 @@ class Appointment extends Base
      * @return name:phone type:string default:--  desc:人联系
      * @return name:app_time type:string default:--  desc:预约时间
      * @return name:goods_name type:string default:--  desc:商品名称
+     * @return name:desc type:string default:--  desc:商品副标题
      * @return name:cover type:string default:--  desc:商品封面
      * @return name:goods_spec type:string default:--  desc:商品规格
      * @return name:goods_id type:int default:--  desc:商品id
@@ -160,7 +162,7 @@ class Appointment extends Base
     public function getAppointmentInfo()
     {
         $order_id = input('get.id');
-        $detail = AppOrder::field('a.*,g.name goods_name,i.goods_spec,g.cover')->alias('a')
+        $detail = AppOrder::field('a.*,g.name goods_name,i.goods_spec,g.cover,g.desc')->alias('a')
             ->leftJoin('StoreGoods g','a.goods_id = g.id')
             ->leftJoin('StoreGoodsItem i','a.spec_id = i.id')
             ->where('a.id',$order_id)

+ 1 - 1
application/common/model/GoodsOrder.php

@@ -9,7 +9,7 @@ class GoodsOrder extends Model
     {
         return $this->hasMany('GoodsOrderItem','order_id')
             ->alias('i')
-            ->field('i.*,g.cover goods_cover')
+            ->field('i.*,g.cover goods_cover,g.desc')
             ->leftJoin('StoreGoods g','i.goods_id = g.id');
     }
 

+ 1 - 1
application/common/model/GoodsOrderItem.php

@@ -9,7 +9,7 @@ class GoodsOrderItem extends Model
     public function getOrderItem($order_id)
     {
         $data = $this->where(['order_id'=>$order_id])->alias('o')
-            ->field('o.id,o.num,o.sell_price,o.goods_spec,g.cover,g.name')
+            ->field('o.id,o.num,o.sell_price,o.goods_spec,g.cover,g.name,g.desc')
             ->leftJoin('StoreGoods g','o.goods_id = g.id')->select();
         return $data;
     }