CarOrder.php 1.7 KB
<?php
namespace app\common\model\serviceapi;
use app\common\model\ServiceApi;

/**
 * 功能描述 华安车险订单信息
 * Class CarOrder
 * @package app\common\model\commapi
 * Date: 2020/7/21
 * Time: 16:33
 * @author nyq
 */
class CarOrder extends ServiceApi
{
    protected $table = "sos_car_order";
    protected $pk = "id";

    /**
     * 函数功能描述 根据通知订单号获取订单信息
     * Date: 2020/7/21
     * Time: 16:40
     * @author nyq
     */
    public function getCarOrder($where) {
        $res = static::where($where)->find();
        return $res;
    }
    /**
     * 函数功能描述 根据返回的查询码获取订单信息
     * Date: 2020/7/22
     * Time: 10:06
     * @author nyq
     */
    public function getCarOrderList($where) {
        $res = static::where($where)->select();
        return $res;
    }
    /**
     * 函数功能描述 根据用户信息修改订单信息
     * @param $where
     * @param $data
     * Date: 2020/7/21
     * Time: 16:47
     * @author nyq
     */
    public function getCarOrderUpdate($where, $data) {
        $res = static::where($where)->update($data);
        return $res;
    }

    /**
     * 函数功能描述 添加订单信息
     * @param $data
     * Date: 2020/7/21
     * Time: 16:50
     * @author nyq
     */
    public function addCarOrder($data) {
        $res = static::insertGetId($data);
        return $res;
    }


    /**
     * 函数功能描述 根据用户信息修改订单信息
     * @param $where
     * @param $data
     * Date: 2020/7/22
     * Time: 16:47
     * @author gxd
     */
    public function getCarOrderUpdateAll($where, $data) {
        $res = static::whereIn('appNo',$where)->update($data);
        return $res;
    }



}