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

合并分支 'heshupeng' 到 'master'

订单备注



查看合并请求 !375
... ... @@ -236,7 +236,7 @@ class Litestoreorder extends Model
];
}
public function order_add($user_id, $order){
public function order_add($user_id, $order, $remark=''){
// if (empty($order['address'])) {
// $this->error = '请先选择收货地址';
// return false;
... ... @@ -249,6 +249,7 @@ class Litestoreorder extends Model
'order_no' => $this->orderNo(),
'total_price' => $order['order_total_price'],
'pay_price' => $order['order_pay_price'],
'remark' => $remark,
// 'express_price' => $order['express_price'],
]);
// 订单商品列表
... ...
... ... @@ -525,6 +525,7 @@ class Goods extends Api
* @ApiParams (name="goods_id", type="integer", required=true, description="商品id")
* @ApiParams (name="goods_num", type="integer", required=true, description="数量")
* @ApiParams (name="goods_sku_id", type="integer", required=true, description="商品规格")
* @ApiParams (name="remark", type="integer", required=false, description="备注")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
... ... @@ -538,6 +539,7 @@ class Goods extends Api
$goods_id = $this->request->param('goods_id');
$goods_num = $this->request->param('goods_num');
$goods_sku_id = $this->request->param('goods_sku_id');
$remark = $this->request->param('remark','');
$order = $this->model->getBuyNow($this->user_id, $goods_id, $goods_num, $goods_sku_id);
... ... @@ -546,7 +548,7 @@ class Goods extends Api
}
// 创建订单
if ($this->model->order_add($this->user_id, $order)) {
if ($this->model->order_add($this->user_id, $order, $remark)) {
// 发起微信支付
// if($this->request->request('type')&&$this->request->request('type')=='gzh'){
$this->init_wx_pay_for_gzh(true);
... ...