$param["order_id"], "memo"=>$param["memo"], "create_id"=>empty($param['create_id'])?0:$param['create_id'], "create_name"=>"" ]; if (!empty($param['create_id'])) { $adminDao = new AdminDao(); $admin = $adminDao->getInfoById($param['create_id']); if ($admin["flag"]) { $data["create_name"] = $admin["data"]["nickname"]; } } $orderMemo = new OrderMemo(); $id = $orderMemo->insertGetId($data); return Util::returnArrSu("", $id); }catch (Exception $e){ return Util::returnArrEr("新增失败:".$e->getMessage()); } } /** * 获取订单列表 * @param $param * @return array */ public function getListByWhere($param){ try { $offset = ($param['pageNum'] - 1) * $param['pageSize']; $model = new OrderMemo(); $count = $model->where(["order_id"=>$param['order_id']])->count(); $list = $model->where(["order_id"=>$param['order_id']])->limit($offset,$param['pageSize'])->order("id","DESC")->select(); return Util::returnArrSu("", ["total" => $count, "list" => $list->toArray()]); }catch (Exception $e){ return Util::returnArrSu("", ["total" => 0, "list" => []]); } } }