短信发送接口

This commit is contained in:
张松
2025-02-12 11:34:37 +08:00
parent 59046df4d7
commit 87e8c59cf0
9 changed files with 173 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
package com.czg.controller;
import com.czg.account.service.CommonService;
import com.czg.resp.CzgResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 公共接口
* @author Administrator
*/
@RestController("/admin/common")
public class CommonController {
@Resource
private CommonService commonService;
/**
* 发送验证码
* @param type 验证码类型
* @return 是否成功
*/
@PostMapping
public CzgResult<Boolean> sendSms(@RequestParam String type) {
return CzgResult.success(commonService.sendSms(type));
}
}