123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Elton
- * Date: 2019/4/28
- * Time: 14:26
- */
- namespace app\common\service;
- class RecommandBookService
- {
- private static $self;
- public static function instance()
- {
- if(self::$self == NULL){
- self::$self = new self();
- }
- return self::$self;
- }
- public static function getClientSignRecommandModel()
- {
- return model('ClientSignRecommand');
- }
- public function getRecommandBooks()
- {
- $data = self::getClientSignRecommandModel()
- ->alias('rbook')
- ->join('book','rbook.book_id = book.id')
- ->field('rbook.*')
- ->field('book.name,book.image,book.first_chapter_id,book.first_chapter_name')
- ->where('rbook.status', 'eq', 'normal') -> select();
- return $data;
- }
- }
|