package com.fs.app.controller;



import com.fs.common.OrderUtils;
import com.fs.common.core.domain.R;
import com.fs.common.core.redis.RedisCache;

import com.fs.core.utils.OrderCodeUtils;
import com.fs.fastGpt.service.IFastGptRoleService;

import io.swagger.annotations.Api;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api("公共接口")
@RestController
@RequestMapping(value="/app/common")
public class CommonController {


    @GetMapping("/genOrderCode")
    public R genOrderCode() {

        String orderCode= OrderCodeUtils.genOrderSn();
        if(StringUtils.isNotEmpty(orderCode)){
            return R.ok().put("orderCode",orderCode);
        }
        else{
            return R.error("订单号生成失败");
        }

    }



}
