package com.xxfc.platform.universal.controller;


import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
import com.xxfc.platform.universal.service.SmsService;
import com.xxfc.platform.universal.service.UploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.UUID;


/**
 * Servlet implementation class FileDemo
 */
@RestController
@RequestMapping("sms")
@IgnoreUserToken
public class SmsController {

       @Autowired
       SmsService smsService;

    @RequestMapping(value = "/app/unauth/send", method = RequestMethod.GET) //匹配的是href中的download请求
    public JSONObject sendSms(@RequestParam("phone") String phone) throws Exception {
        return smsService.smsCode(phone);
    }
}

