短信发送接口
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user