package com.ruoyi.web.controller.common;

import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginBody;
import com.ruoyi.common.utils.SendSmsUtils;
import com.ruoyi.common.utils.WordUtil;
import com.ruoyi.system.domain.vo.WordVo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

import static com.ruoyi.common.constant.CommonConstants.LOGIN_USER_SMS;

/**
 * @Author: tjf
 * @Date: 2024/5/15 10:35
 * @Describe:
 */
@RestController
@RequestMapping("/word")
public class WordController {
    /**
     * word文档签名
     *
     * @return
     */
    @PostMapping("/wordFilePath")
    @RepeatSubmit(interval = 1000, message = "请求过于频繁")
    public AjaxResult wordFilePath(@RequestBody WordVo wordVo) {
        String wordFilePath = wordVo.getWordFilePath();
        String image = wordVo.getImage();
        AjaxResult ajaxResult = WordUtil.wordFilePath(wordFilePath, image);
        return ajaxResult;
    }
}
