package com.ruoyi.web.controller.api;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.mall.domain.BusinessBulletin;
import com.ruoyi.mall.domain.MallConfig;
import com.ruoyi.mall.domain.MallConfigFunction;
import com.ruoyi.mall.domain.Vo.BusinessBulletinResponse;
import com.ruoyi.mall.service.IMallConfigFunctionService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**更多功能*/
@RestController
@RequestMapping("/api/ConfigFunction")
public class ApiConfigFunctionController {

    @Resource
    private IMallConfigFunctionService mallConfigFunctionService;
    /**
     * 更多功能列表
     */
    @GetMapping("/getConfigFunctionList")
    public AjaxResult getConfigFunctionList() {
        try{
            MallConfigFunction mallConfigFunction = new MallConfigFunction();
            //启用状态
            mallConfigFunction.setStatus("0");
            //是否展示
            mallConfigFunction.setIsShow("0");
            return AjaxResult.success().put("data", mallConfigFunctionService.selectMallConfigFunctionList(mallConfigFunction));
        } catch (Exception e) {
            e.printStackTrace();
            return AjaxResult.error("更多功能列表查询异常");
        }
    }
}
