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

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

    /**
     * 函数功能描述 根据条件获取奖品列表
     * Date: 2020/9/21
     * Time: 16:40
     * @author nyq
     */

    public function getPrize($code,$offset,$rows)
    {
        $user = static::where($code)->limit($offset,$rows)->select();

        return $user;
    }

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

    public function getPrizePrize($code){

        $user = static::where($code)->find();
        return $user;
    }
    /**
     * 函数功能描述  添加奖品
     * Date: 2020/9/25
     * Time: 15:00
     * @author nyq
     */
    public function prizeAdd($data)
    {
        $res = static::insertGetId($data);
        return $res;
    }

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










}