TurnPrizeMember.php 1.2 KB
<?php
namespace app\common\model\serviceapi;
use app\common\model\ServiceApi;

/**
 * 功能描述  抽奖
 * Class turnPrize
 * @package app\common\model\commapi
 * Date: 2020/9/25
 * Time: 16:33
 * @author nyq
 */
class TurnPrizeMember extends ServiceApi
{
    protected $table = "sos_prize_turn_member";
    protected $pk = "id";

    /**
     * 函数功能描述  抽奖用户
     * Date: 2020/9/25
     * Time: 16:40
     * @author nyq
     */

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

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

    /**
     * 函数功能描述  抽奖
     * @param $where
     * @param $data
     * Date: 2020/9/21
     * Time: 16:47
     * @author nyq
     */
    public function getPrizeMemberAdd($data) {
        $res = static::insertGetId($data);
        return $res;

    }





}