src/Biz/SearchKeyword/Service/Impl/SearchKeywordServiceImpl.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace Biz\SearchKeyword\Service\Impl;

use AppBundle\Common\ArrayToolkit;
use Biz\BaseService;
use Biz\Common\CommonException;
use Biz\SearchKeyword\Service\SearchKeywordService;

class SearchKeywordServiceImpl extends BaseService implements SearchKeywordService
{
    public function createSearchKeyword($keyword)
    {
        if (!ArrayToolkit::requireds($keyword, array('name'))) {
            $this->createNewException(CommonException::ERROR_PARAMETER_MISSING());
        }

        return $this->getSearchKeywordDao()->create($keyword);
    }

    public function updateSearchKeyword($id, $keyword)
    {
        return $this->getSearchKeywordDao()->update($id, $keyword);
    }

    public function getSearchKeyword($id)
    {
        return $this->getSearchKeywordDao()->get($id);
    }

    public function getSearchKeywordByNameAndType($name, $type)
    {
        return $this->getSearchKeywordDao()->getByNameAndType($name, $type);
    }

    public function searchSearchKeywords($conditions, $orderBy, $start, $limit)
    {
        return $this->getSearchKeywordDao()->search($conditions, $orderBy, $start, $limit);
    }

    public function countSearchKeywords($conditions)
    {
        return $this->getSearchKeywordDao()->count($conditions);
    }

    public function deleteSearchKeyword($id)
    {
        return $this->getSearchKeywordDao()->delete($id);
    }

    public function addSearchKeywordTimes($id)
    {
        return $this->getSearchKeywordDao()->wave(array($id), array('times' => 1));
    }

    /**
     * @return \Biz\SearchKeyword\Dao\Impl\SearchKeywordDaoImpl
     */
    protected function getSearchKeywordDao()
    {

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。