const system = require("../../../system");
const mediaaggregationDao = system.getObject("db.mediaaggregation.mediaaggregationDao");

class MediaaggregationSve {
    constructor() {
        
    }
    //首页产品列表
    async productList(pobj) {
        if (!pobj || !pobj.actionBody) {
            return system.getResultFail(-100, "参数错误");
        }
        var res =await mediaaggregationDao.productList(pobj);
        return system.getResultSuccess(res);
    }

    //首页轮播图
    async rotationChartList(pobj) {
        if (!pobj || !pobj.actionBody) {
            return system.getResultFail(-100, "参数错误");
        }
        
        var res =await mediaaggregationDao.rotationChartList(pobj);
        return system.getResultSuccess(res);
    }
    //留资表单产品
    async needProductList(pobj) {
        if (!pobj || !pobj.actionBody) {
            return system.getResultFail(-100, "参数错误");
        }
        
        var res =await mediaaggregationDao.needProductList(pobj);
        return system.getResultSuccess(res);
    }


    //热门推荐
    async popularRecommendationList(pobj) {
        if (!pobj || !pobj.actionBody) {
            return system.getResultFail(-100, "参数错误");
        }
        
        var res =await mediaaggregationDao.popularRecommendationList(pobj);
        return system.getResultSuccess(res);
    }



    //产品分类一类
    async productTypeFirst(pobj) {
        if (!pobj || !pobj.actionBody) {
            return system.getResultFail(-100, "参数错误");
        }
        
        var res =await mediaaggregationDao.productTypeFirst(pobj);
        return system.getResultSuccess(res);
    }
    
    //产品分类二类
    async productTypeSecend(pobj) {
        if (!pobj || !pobj.actionBody) {
            return system.getResultFail(-100, "参数错误");
        }
        
        var res =await mediaaggregationDao.productTypeSecend(pobj);
        return system.getResultSuccess(res);
    }
    //产品详情
    async productDetail(pobj) {
        if (!pobj || !pobj.actionBody) {
            return system.getResultFail(-100, "参数错误");
        }
        
        var res =await mediaaggregationDao.productDetail(pobj);
        return system.getResultSuccess(res);
    }

    // //吸底菜单
    // async bottomMenuConfig(pobj) {
    //     if (!pobj || !pobj.actionBody) {
    //         return system.getResultFail(-100, "参数错误");
    //     }
        
    //     var res =await mediaaggregationDao.bottomMenuConfig(pobj);
    //     return system.getResultSuccess(res);
    // }
    
}


module.exports = MediaaggregationSve;