<?php
/**
 * 分类管理
 * User: liuyuzhen
 * Date: 2018/5/28
 * Time: 17:59
 * Description:
 */
class GoodsclassController extends \Our\Controller_AbstractIndex{

    /**
     * 获取平台引导分类
     */
    public function platformClassesAction(){

    }

    /**
     * 获取店铺首页推荐分类
     */
    public function storeIndexClassesAction(){

    }

    /**
     * 店铺有在售商品的一级分类
     */
    public function getStoreTopClassesAction(){
        $data = $this->req[\Our\NameConst::data];
        $goodsClassServiceModel = \Business\Goods\GoodsClassServiceModel::getInstance();
        $result = $goodsClassServiceModel->getStoreTopClasses($data);
        $this->success($result);
    }

    /**
     * 获取店铺一级分类对应的存在可售商品下级分类
     */
    public function getStoreChildrenClassesAction(){
        $data = $this->req[\Our\NameConst::data];
        $goodsClassServiceModel = \Business\Goods\GoodsClassServiceModel::getInstance();
        $result = $goodsClassServiceModel->getStoreChildrenClasses($data);
        $this->success($result);
    }

}