package com.flossom.miniProgram.controller;

import com.flossom.common.core.web.controller.BaseController;
import com.flossom.common.core.web.domain.AjaxResult;
import com.flossom.miniProgram.service.ISystemSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 平台参数设置
 */
@RestController
@RequestMapping("/setting")
public class SystemSettingController extends BaseController {

    @Autowired
    private ISystemSettingService systemSettingService;

    /**
     * 获取 用户协议
     *
     * @return
     */
    @GetMapping("/getUserAgreement")
    public AjaxResult getUserAgreement() {
        return AjaxResult.success(systemSettingService.getUserAgreement());
    }

    /**
     * 获取 隐私协议
     *
     * @return
     */
    @GetMapping("/getPrivacyAgreement")
    public AjaxResult getPrivacyAgreement() {
        return AjaxResult.success(systemSettingService.getPrivacyAgreement());
    }

    /**
     * 获取 积分规则
     *
     * @return
     */
    @GetMapping("/getIntegralRule")
    public AjaxResult getIntegralRule() {
        return AjaxResult.success(systemSettingService.getIntegralRule());
    }

    /**
     * 获取 关于我们
     *
     * @return
     */
    @GetMapping("/getAboutUs")
    public AjaxResult getAboutUs() {
        return AjaxResult.success(systemSettingService.getAboutUs());
    }

    /**
     * 获取 蓝牙指引权限
     *
     * @return
     */
    @GetMapping("/getBluetoothGuidance")
    public AjaxResult getBluetoothGuidance() {
        return AjaxResult.success(systemSettingService.getBluetoothGuidance());
    }


    /**
     * 获取 定位指引权限
     *
     * @return
     */
    @GetMapping("/getLocationGuidance")
    public AjaxResult getLocationGuidance() {
        return AjaxResult.success(systemSettingService.getLocationGuidance());
    }


    /**
     * 获取 联系客服
     *
     * @return
     */
    @GetMapping("/getContactWorker")
    public AjaxResult getContactWorker() {
        return AjaxResult.success(systemSettingService.getContactWorker());
    }

    /**
     * 获取 其他配置
     *
     * @return
     */
    @GetMapping("/getOtherSetting")
    public AjaxResult getOtherSetting() {
        return AjaxResult.success(systemSettingService.getOtherSetting());
    }

}
