package com.bohuikeji.delivery.backstage.controller.views;

import com.bohuikeji.frame.module.admin.entity.back.PageEntity;
import com.bohuikeji.frame.module.admin.service.ISysConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * 用户协议页面
 */
@Slf4j
@Controller
@RequestMapping("/views/treaty")
public class TreatyPage {

    @Autowired
    ISysConfigService configService;

    /**
     * 派送员APP隐私政策访问
     * @return
     */
    @GetMapping("/html")
    public PageEntity treaty(String key) {
        return PageEntity.page("/page/treaty").add("treaty",configService.getOneByKey(key));
    }
}
