| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.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.dao.system.model.SystemUser; |
| | | 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.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "çä¿¡é®ä»¶ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/smsEmail") |
| | | public class SmsEmailColudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SmsEmailService smsEmailService; |
| | | |
| | | @Autowired |
| | | private EmayService emayService; |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("åéçä¿¡éªè¯ç ") |
| | | @PostMapping("/sendSms") |
| | | public ApiResponse sendSms(@RequestBody SmsEmail smsEmail) { |
| | | 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("/validDriverPhone") |
| | | public ApiResponse<SystemUser> validDriverPhone(@RequestBody ValidPhoneCodeVO param) { |
| | | return ApiResponse.success(smsEmailService.validDriverPhone(param)); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | public ApiResponse<PageData<SmsEmail>> findPage (@RequestBody PageWrap<SmsEmail> pageWrap) { |
| | | return ApiResponse.success(smsEmailService.findPage(pageWrap)); |
| | | } |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("èªå®ä¹çä¿¡å
容") |
| | | @PostMapping("/testSendSms") |
| | | public ApiResponse testSendSms(@RequestBody SmsEmail smsEmail) { |
| | | emayService.sendSmsByHk(smsEmail.getPhone(),smsEmail.getContent()); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | } |