ProductOrder.php 1.4 KB
<?php
namespace app\common\model\serviceapi;
use app\common\model\ServiceApi;

/**
 * 功能描述 用户管理
 * Class Product
 * @package app\common\model\commapi
 * Date: 2020/11/2
 * Time: 16:33
 * @author nyq
 */
class ProductOrder extends ServiceApi
{
    protected $table = "sos_product_order";
    protected $pk = "id";


    /**
     * 函数功能描述  添加订单
     * Date: 2020/11/2
     * Time: 15:00
     * @author nyq
     */
    public function add($data)
    {
        $res = static::insertGetId($data);
        return $res;
    }
    /**
     * 函数功能描述  删除订单
     * Date: 2020/11/2
     * Time: 15:00
     * @author nyq
     */
    public function orderDel($data)
    {
        $res = static::where($data)->delete();
        return $res;
    }


    /**
     * 函数功能描述   编辑奖品
     * @param $where
     * @param $data
     * Date: 2020/7/21
     * Time: 16:47
     * @author nyq
     */
    public function productUp($where, $data) {
        $res = static::where($where)->update($data);
        return $res;
    }

    /**
     * 函数功能描述 获取商品列表
     * Date: 2020/11/2
     * Time: 16:40
     * @author nyq
     */

    public function orderList($code){
        $user = static::where($code)->select();
        return $user;
    }


    public function getGoodsList($code){

        $user = static::where($code)->find();
        return $user;
    }


}