13 小时以前 b29d86d9ed34fd890eb14cb7a75f6ae4f7148865
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
36
37
38
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 溯源配置
 * <p>
 * 向管理端前端暴露溯源 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<MesTraceQrConfigRespVO> getQrConfig() {
        MesTraceQrConfigRespVO respVO = new MesTraceQrConfigRespVO();
        respVO.setTraceBaseUrl(mesProperties.getTraceBaseUrl());
        return success(respVO);
    }
 
}