OrderModel.php
529 字节
<?php
/**
* Created by PhpStorm.
* User: yhbr
* Date: 2018/9/5
* Time: 15:03
*/
namespace app\order\model;
use think\Model;
use think\Db;
class OrderModel extends Model
{
//暂定
public function orderList($status, $orderSn)
{
$where = [];
if ($orderSn != null) {
$where['order_sn'] = ['like', "%$orderSn%"];
}
if ($status !== false) {
$where['status'] = ['eq', $status];
}
return Db::name('order_info')->where($where)->select();
}
}