package org.jeecg.modules.adweb.logistics.controller;

import lombok.extern.slf4j.Slf4j;

import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Time 2024/12/2 14:05 @Description
 */
@RestController
@RequestMapping("/adweb/logistics")
@Slf4j
public class LogisticsController {
    @Value("${logistics.meiri56.token}")
    private String meiri56Token;

    /** 获取每日出运token */
    @AutoLog(value = "获取每日出运token")
    @GetMapping(value = "/getMeiri56Token")
    public Result<?> getMeiri56Token() {
        // 读取配置文件中的 token
        if (StringUtils.isNotBlank(meiri56Token)) {
            return Result.OK(meiri56Token);
        }

        return Result.error("获取失败");
    }
}
