|
@@ -525,6 +525,7 @@ class Goods extends Api |
|
@@ -525,6 +525,7 @@ class Goods extends Api |
525
|
* @ApiParams (name="goods_id", type="integer", required=true, description="商品id")
|
525
|
* @ApiParams (name="goods_id", type="integer", required=true, description="商品id")
|
526
|
* @ApiParams (name="goods_num", type="integer", required=true, description="数量")
|
526
|
* @ApiParams (name="goods_num", type="integer", required=true, description="数量")
|
527
|
* @ApiParams (name="goods_sku_id", type="integer", required=true, description="商品规格")
|
527
|
* @ApiParams (name="goods_sku_id", type="integer", required=true, description="商品规格")
|
|
|
528
|
+ * @ApiParams (name="remark", type="integer", required=false, description="备注")
|
528
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
529
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
529
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
530
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
530
|
* @ApiReturn ({
|
531
|
* @ApiReturn ({
|
|
@@ -538,6 +539,7 @@ class Goods extends Api |
|
@@ -538,6 +539,7 @@ class Goods extends Api |
538
|
$goods_id = $this->request->param('goods_id');
|
539
|
$goods_id = $this->request->param('goods_id');
|
539
|
$goods_num = $this->request->param('goods_num');
|
540
|
$goods_num = $this->request->param('goods_num');
|
540
|
$goods_sku_id = $this->request->param('goods_sku_id');
|
541
|
$goods_sku_id = $this->request->param('goods_sku_id');
|
|
|
542
|
+ $remark = $this->request->param('remark','');
|
541
|
|
543
|
|
542
|
$order = $this->model->getBuyNow($this->user_id, $goods_id, $goods_num, $goods_sku_id);
|
544
|
$order = $this->model->getBuyNow($this->user_id, $goods_id, $goods_num, $goods_sku_id);
|
543
|
|
545
|
|
|
@@ -546,7 +548,7 @@ class Goods extends Api |
|
@@ -546,7 +548,7 @@ class Goods extends Api |
546
|
}
|
548
|
}
|
547
|
|
549
|
|
548
|
// 创建订单
|
550
|
// 创建订单
|
549
|
- if ($this->model->order_add($this->user_id, $order)) {
|
551
|
+ if ($this->model->order_add($this->user_id, $order, $remark)) {
|
550
|
// 发起微信支付
|
552
|
// 发起微信支付
|
551
|
// if($this->request->request('type')&&$this->request->request('type')=='gzh'){
|
553
|
// if($this->request->request('type')&&$this->request->request('type')=='gzh'){
|
552
|
$this->init_wx_pay_for_gzh(true);
|
554
|
$this->init_wx_pay_for_gzh(true);
|