123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <?php
- /**
- * Created by PhpStorm.
- * User: hp
- * Date: 2017/12/2
- * Time: 15:21
- */
- namespace App\Modules\Promotion\Services;
- use App\Modules\Promotion\Models\BgImages;
- use App\Modules\Promotion\Models\BodyTemplates;
- use App\Modules\Promotion\Models\DocumentCovers;
- use App\Modules\Promotion\Models\Headline;
- use App\Modules\Promotion\Models\OriginalGuides;
- use App\Modules\Promotion\Models\PromotionPage;
- use App\Modules\Promotion\Models\QrCodes;
- class PromotionService
- {
- /**
- * category:类型 (1: 男频,2:女频)
- * @return mixed 获取类型下的所有的标题
- */
- static function getAllHeadlines($category)
- {
- return Headline::getAllHeadlines($category);
- }
- /**
- * @return mixed 获取所有的标题
- */
- static function getHeadlines()
- {
- return Headline::getHeadlines();
- }
- /**
- * category:类型 (1: 男频,2:女频)
- * count: 获取的条数(默认为1条)
- * @return mixed 随机获取标题库中的若干条标题
- */
- static function getRandomHeadline($category, $count = 1)
- {
- return Headline::getRandomHeadline($category, $count);
- }
- /**
- * @return mixed 获取所有的原文引导
- */
- static function getAllOriginalGuides()
- {
- return OriginalGuides::getAllOriginalGuides();
- }
- /**
- * @return mixed 获取所有的二维码信息
- */
- static function getQrCodes()
- {
- return QrCodes::getQrCodes();
- }
- /**
- * @return mixed 获取所有的推广页面链接
- */
- static function getAllPromotionPage()
- {
- return PromotionPage::getAllPromotionPage();
- }
- /**
- * @return mixed 获取单个推广页面
- */
- static function getById($page_id)
- {
- return PromotionPage::getById($page_id);
- }
- /**
- * @return mixed 获取所有的文案封面
- */
- static function getAllDocumentCovers($distribution_channel_id)
- {
- return DocumentCovers::getAllDocumentCovers($distribution_channel_id);
- }
- /**
- * @return mixed 获取客服消息所有的文案封面
- */
- static function getAllMessageDocumentCovers($distribution_channel_id = 0)
- {
- return DocumentCovers::getAllMessageDocumentCovers($distribution_channel_id);
- }
- /**
- * @return mixed 获取文案封面
- */
- static function getCovers($params=[])
- {
- return DocumentCovers::search($params);
- }
- /**
- * @return mixed 随机获取模板消息的文案封面
- * $type: 类型(2: 带黄的, 3: 不带黄的)
- * $count:条数(默认为 1 条)
- */
- static function getMessageRandomDocumentCovers($type, $count = 1)
- {
- return DocumentCovers::getMessageRandomDocumentCovers($type, $count);
- }
- /**
- * 获取所有的模板图
- * @return mixed
- */
- static function getBgImages()
- {
- return BgImages::getAllBgImages();
- }
- /**
- * @return mixed获取所有的内容模板
- */
- static function getAllBodyTemplates()
- {
- return BodyTemplates::getAllBodyTemplates();
- }
- static function getHeadlineByParams($param)
- {
- return Headline::getHeadlineByParams($param);
- }
- static function delCover($ids)
- {
- return DocumentCovers::delCover($ids);
- }
-
- static function getFullHeadline(){
- return Headline::getFullHeadline();
- }
- static function getFullMessageRandomDocumentCovers($type){
- return DocumentCovers::getFullMessageRandomDocumentCovers($type);
- }
- }
|