|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.business.model.SmsEmail; | 
|---|
|  |  |  | import com.doumee.dao.business.model.vo.ValidPhoneCodeVO; | 
|---|
|  |  |  | import com.doumee.service.business.SmsEmailService; | 
|---|
|  |  |  | import com.doumee.service.business.third.EmayService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.context.annotation.Lazy; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private SmsEmailService smsEmailService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private EmayService emayService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("发送短信验证码") | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success(smsEmailService.sendSms(smsEmail)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("根据手机号和验证码校验") | 
|---|
|  |  |  | @PostMapping("/validPhoneCaptcha") | 
|---|
|  |  |  | public ApiResponse validPhoneCaptcha(@RequestBody ValidPhoneCodeVO param) { | 
|---|
|  |  |  | smsEmailService.validPhoneCaptcha(param); | 
|---|
|  |  |  | return ApiResponse.success("请求成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("自定义短信内容") | 
|---|
|  |  |  | @PostMapping("/testSendSms") | 
|---|
|  |  |  | public ApiResponse testSendSms(@RequestBody SmsEmail smsEmail) { | 
|---|
|  |  |  | emayService.sendSmsByHk(smsEmail.getPhone(),smsEmail.getContent()); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|