<?php
/**
 * 图书路由文件
 * by zhanyang
 *
 * 2017-11-20
 */

/**
 * 图书路由文件
 */
Route::group(['domain'=>env('MANAGE_DOMAIN'), 'namespace'=>'App\Http\Controllers\Manage\Book','prefix'=>'api','middleware'=>'ManageApiAuth'],function () {
//Route::group(['domain'=>env('MANAGE_DOMAIN'), 'namespace'=>'App\Http\Controllers\Manage\Book','prefix'=>'api'],function () {

    //按关键词或者分类id获取并排序
    Route::get('books/search','BookController@getBooksByWhere');
    //获取id 图书
    Route::get('book/{bid}','BookController@getBookById');
    //修改上架状态
    Route::post('books/shelf/status','BookController@changeShelfStatus');
    //获取下架图书列表
    Route::get('offshelf/books','BookController@getOffShelfBooks');
    //获取上架图书列表
    Route::get('onshelf/books','BookController@getOnShelfBooks');
    //编辑推荐文案
    Route::post('books/editRecommendChapterPositionWords','BookController@editRecommendChapterPositionWords');
    //获取推荐文案
    Route::get('books/getRecommendChapterPositionWords','BookController@getRecommendChapterPositionWords');
    //编辑推荐章节
    Route::get('books/editRecommendcid','BookController@editRecommendcid');
    //优质图书
    Route::get('getHighQualityBooks/books','BookController@getHighQualityBooks');
    //编辑优质图书
    Route::get('books/editHighQuality','BookController@editHighQuality');

    //获取图书域名
    Route::get('books/domain','BookDomainController@getBookDomain');
    //新增图书域名
    Route::post('books/domain','BookDomainController@addBookDomain');
    //上传封面
    Route::post('books/uploadcover','BookController@uploadCover');
    //更新描述
    Route::post('books/updateIntro','BookController@updateIntro');

    //设置书本的渠道标识
    Route::post('books/setChannelSpecialBook','BookController@setChannelSpecialBook');

    //获取屏蔽图书列表
    Route::get('cover/books','BookController@getCoverBooks');

    //编辑图书信息
    Route::post('books/{bid}/edit','BookController@editBookConfig');
    //编辑版权信息
    Route::post('books/editcopyright','BookController@editCopyRight');
    //编辑图书域名
    Route::post('books/editPromotionUrl','BookController@editPromotionDomain');
    //前5章内容
    Route::get('books/{bid}/fivechapter','ChapterController@getTopFiveChapter');

    Route::get('books/{bid}/chapter','ChapterController@getCatalogPagination');

    Route::get('chapter/setvip','ChapterController@editChapterVip');

    //编辑章节
    Route::post('chapter/content','ChapterController@editChapterContent');
    //分类
    Route::get('books/getCategory','BookCategoryController@getCategory');
    //充值产品列表
    Route::get('product/chargelists','ProductController@getChargeLists');
    //
    Route::get('product','ProductController@createProduct');

    Route::post('product/update','ProductController@updateProduct');

    Route::get('product/{id}','ProductController@getProductInfoById');
    //获取cp列表
    Route::get('bookcp/getAllCp','CpBookController@getAllCp');
    //获取cp统计
    Route::get('bookcp/cpTotal','CpBookController@cpTotal');
    Route::get('bookcp/everyDayCpTotal','CpBookController@everyDayCpTotal');
    Route::get('bookcp/bookCpTotal','CpBookController@bookCpTotal');
    Route::get('bookcp/everyBookTotal','CpBookController@everyBookTotal');
    //复制图书
    Route::get('copyBook','BookController@copyBook');
    Route::get('books/getAllBookSimple','BookController@getAllBookSimple');


    Route::get('books/getBookPromotionInfo','BookPromotionController@getBookPromotionInfo');
    Route::get('books/exportBookPromotionInfo','BookPromotionController@exportBookPromotionInfo');

    Route::get('books/setChapterPrice','BookController@setChapterPrice');

    //获取简单图书列表
    Route::get('books/getSimpleBookListByName','BookController@getSimpleBookListByName');
    //设置分销编辑推荐榜
    Route::any('books/setEditorRecommendBooks','BookController@setEditorRecommendBooks');
    //获取排行榜
    Route::get('books/getEditorRecommendBooks','BookController@getEditorRecommendBooks');


    //添加不良书籍信息
    Route::post('books/addBadBookInfo','BadBookController@addBadBookInfo');

    //编辑不良书籍信息
    Route::post('books/editBadBookInfo','BadBookController@editBadBookInfo');

    //获取不良书籍信息
    Route::get('books/getBadBookInfos','BadBookController@getBadBookInfos');

    //获取图书
    Route::get('books/getBooks','BookController@getBooks');


    Route::post('books/setPromotionStatus','BookPromotionController@setPromotionStatus');
    Route::any('books/commitPromotionStatus','BookPromotionController@commitPromotionStatus');

    Route::get('books/getPromotionBooksUnCheck','BookPromotionController@getPromotionBooksUnCheck');
    Route::get('books/getPromotionBooksChecked','BookPromotionController@getPromotionBooksChecked');

    Route::post('books/deleteBookChapterImage','ChapterImageController@deleteBookChapterImage');

    //获取图书简介
    Route::get('books/getBookIntro','BookController@getBookIntro');

    //图书标签
    Route::get('books/get_tags','BooksTagController@getTags');
    Route::get('books/searchBooks','BooksTagController@getSearchBooks');
    Route::post('books/addBookTags','BooksTagController@addBookTags');
    Route::post('books/deleteBookTags','BooksTagController@deleteBookTags');
    //断更作品
    Route::get('books/getSuspendProduct','SuspendBookController@getSuspendBooks');
    //优质书库
    Route::get('books/getSuperiorNewBook','SuperiorBookController@getSuperiorNewBook');
    Route::get('books/getSuperiorHistoryBook','SuperiorBookController@getSuperiorHistoryBook');
    Route::get('books/exportSuperiorHistoryBook','SuperiorBookController@exportSuperiorHistoryBook');
    Route::post('books/sortSuperiorHistoryBooks','SuperiorBookController@sortSuperiorHistoryBooks');
    Route::get('books/adjustHistorySuperiorBooksSequence','SuperiorBookController@adjustHistorySuperiorBooksSequence');

    Route::post('books/modifySuperiorNewBook','SuperiorBookController@modifySuperiorNewBook');
    Route::post('books/modifySuperiorHistoryBook','SuperiorBookController@modifySuperiorHistoryBook');

    //更新测书信息
    Route::get('books/updateTestBook','BookController@updateTestBook');
    //测书统计信息
    Route::get('books/getTestBookStatistics','BookController@getTestBookStatistics');
    //智能推送统计信息
    Route::get('books/getSmartPushBookStatistics','BookController@getSmartPushBookStatistics');
    //导出测试统计信息
    Route::any('books/exportGetTestBookStatistics','BookController@exportGetTestBookStatistics');
    //导出智能推送统计信息
    Route::get('books/exportGetSmartPushBookStatistics','BookController@exportGetSmartPushBookStatistics');

    //编辑推荐 editorRecommendMsg
    Route::post('books/editorRecommendMsg','BookController@editorRecommendMsg');
    Route::get('books/getEditorRecommendMsg','BookController@getEditorRecommendMsg');

    //送礼统计
    Route::get('gifts/getBookGiftsStatsByBook','BookGiftsController@getBookGiftsStatsByBook');
    Route::get('gifts/getBookGiftsStatsByGift','BookGiftsController@getBookGiftsStatsByGift');

    Route::get('gifts/getBookGiftDailyStatsByBook','BookGiftsController@getBookGiftDailyStatsByBook');
    Route::get('gifts/getBookGiftDailyStatsByGift','BookGiftsController@getBookGiftDailyStatsByGift');

    Route::post('chapter/addChapter','ChapterController@addChapter');
    Route::get('chapter/editChapterName','ChapterController@editChapterName');
    Route::get('chapter/deleteChapter','ChapterController@deleteChapter');
});