Browse Source

记录下单人

dev
nizongfeng 3 years ago
parent
commit
36cc6a3f81
2 changed files with 5 additions and 3 deletions
  1. +2
    -2
      application/admin/controller/OrderMain.php
  2. +3
    -1
      application/admin/service/OrderMainDao.php

+ 2
- 2
application/admin/controller/OrderMain.php View File

@@ -16,8 +16,6 @@ use think\exception\ValidateException;
*/
class OrderMain extends Backend
{
protected $noNeedLogin = ['save'];
/**
* OrderMain模型对象
* @var \app\admin\model\OrderMain
@@ -229,6 +227,8 @@ class OrderMain extends Backend
*/
public function save(){
$params=$this->request->post();
$params['create_id']=$this->auth->id;
$params['group_id']=$this->auth->getGroupId();
$orderMainService = new OrderMainService();
Db::startTrans();
$result = $orderMainService->saveOrder($params);


+ 3
- 1
application/admin/service/OrderMainDao.php View File

@@ -33,7 +33,9 @@ class OrderMainDao
"channel_order_no"=>$param["channel_order_no"],
"user_name"=>$param["user_name"],
"user_phone"=>$param["user_phone"],
"order_memo"=>$param["order_memo"]
"order_memo"=>$param["order_memo"],
"create_id"=>empty($param['create_id'])?0:$param['create_id'],
"group_id"=>empty($param['group_id'])?0:$param['group_id']
];
$orderMain = new OrderMain();
if (empty($param['id'])) {


Loading…
Cancel
Save