<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2017/12/2
 * Time: 15:56
 */

namespace App\Modules\Channel\Services;

use App\Modules\Channel\Models\ChannelSellPlatforms;
use DB;

class ChannelSellPlatformService
{
    /**
     * 根据id获取
     * @param $id id
     * @return mixed
     */
    static function getById($id)
    {
        return ChannelSellPlatforms::getById($id);
    }

    /**
     * 根据名称获取
     * @param $name 名称
     * @return mixed
     */
    static function getByName($name)
    {
        return ChannelSellPlatforms::getByName($name);
    }

    /**
     * 根据code获取
     * @param $name 名称
     * @return mixed
     */
    static function getByCode($code)
    {
        return ChannelSellPlatforms::getByCode($code);
    }

    /**
     * 添加记录
     * @param $data
     * @return mixed
     */
    static function addInfo($data)
    {
        return ChannelSellPlatforms::addInfo($data);
    }

    /**
     * 通过id更新
     * @param $id
     * @param $params
     * @return mixed
     */
    static function updateById($id, $params)
    {
        return ChannelSellPlatforms::updateById($id, $params);
    }

    static function getList(){
        return ChannelSellPlatforms::getList();
    }
}