package cn.iocoder.yudao.module.mes.controller.admin.trace; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.mes.controller.admin.trace.vo.MesTraceQrConfigRespVO; import cn.iocoder.yudao.module.mes.framework.config.MesProperties; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** * 管理后台 - MES 溯源配置 *

* 向管理端前端暴露溯源 H5 页面基础地址,用于"查看二维码"预览/下载与打印标签保持一致的二维码内容。 */ @Tag(name = "管理后台 - MES 溯源配置") @RestController @RequestMapping("/mes/trace-config") @Validated public class MesTraceConfigController { @Resource private MesProperties mesProperties; @GetMapping("/qr-config") @Operation(summary = "获得溯源 H5 页面基础地址(二维码内容前缀)") public CommonResult getQrConfig() { MesTraceQrConfigRespVO respVO = new MesTraceQrConfigRespVO(); respVO.setTraceBaseUrl(mesProperties.getTraceBaseUrl()); return success(respVO); } }