作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

合并分支 'heshupeng' 到 'master'

订单备注



查看合并请求 !375
@@ -236,7 +236,7 @@ class Litestoreorder extends Model @@ -236,7 +236,7 @@ class Litestoreorder extends Model
236 ]; 236 ];
237 } 237 }
238 238
239 - public function order_add($user_id, $order){ 239 + public function order_add($user_id, $order, $remark=''){
240 // if (empty($order['address'])) { 240 // if (empty($order['address'])) {
241 // $this->error = '请先选择收货地址'; 241 // $this->error = '请先选择收货地址';
242 // return false; 242 // return false;
@@ -249,6 +249,7 @@ class Litestoreorder extends Model @@ -249,6 +249,7 @@ class Litestoreorder extends Model
249 'order_no' => $this->orderNo(), 249 'order_no' => $this->orderNo(),
250 'total_price' => $order['order_total_price'], 250 'total_price' => $order['order_total_price'],
251 'pay_price' => $order['order_pay_price'], 251 'pay_price' => $order['order_pay_price'],
  252 + 'remark' => $remark,
252 // 'express_price' => $order['express_price'], 253 // 'express_price' => $order['express_price'],
253 ]); 254 ]);
254 // 订单商品列表 255 // 订单商品列表
@@ -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);