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()));
|
}
|
}
|