package org.springblade.gateway.common_gateway.controller;

import io.swagger.annotations.Api;
import org.springblade.core.tool.api.R;
import org.springblade.modules.resource.enums.SmsCodeEnum;
import org.springblade.modules.resource.utils.SmsUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: lianghanqiang
 * @description:
 * @since: 8/26/21 -- 10:31 AM
 */
@RestController
@RequestMapping("/sms")
@Api(tags = "短信模块")
public class LdtSmsController {

	//发送短信
	@PostMapping("/sendSms")
	public R sendSms(String phone){
		return R.data(SmsUtil.sendValidate(SmsCodeEnum.VALIDATE.getName(),phone,5L));
	}
}
