liujie
2026-09-09 39f6fca28e3f78abe48f08e474ec011abb990b36
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.tourguide.api.mini;
 
import com.tourguide.common.api.ApiResponse;
import com.tourguide.modules.operation.dto.MiniCustomerServiceResponse;
import com.tourguide.modules.operation.dto.PlatformSettingsResponse;
import com.tourguide.modules.operation.service.PlatformSettingsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 游客小程序平台展示配置接口。
 * 仅返回小程序页面需要公开的配置字段,不暴露抽成比例、结算周期等后台运营参数。
 */
@RestController
@RequestMapping("/api/mini/platform-settings")
public class MiniPlatformSettingsController {
    private final PlatformSettingsService settingsService;
 
    public MiniPlatformSettingsController(PlatformSettingsService settingsService) {
        this.settingsService = settingsService;
    }
 
    /**
     * 查询后台当前配置的客服微信和客服电话,供发票及售后页面展示。
     *
     * @return 小程序售后与发票联系方式
     */
    @GetMapping("/customer-service")
    public ApiResponse<MiniCustomerServiceResponse> customerService() {
        PlatformSettingsResponse settings = settingsService.getSettings();
        return ApiResponse.success(new MiniCustomerServiceResponse(
                settings.getCustomerServiceWechat(), settings.getCustomerServicePhone()));
    }
}