SellerSmsController.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package com.zhongzheng.controller.distribution;
  2. import com.zhongzheng.common.core.controller.BaseController;
  3. import com.zhongzheng.common.core.domain.AjaxResult;
  4. import com.zhongzheng.modules.alisms.bo.SmsAddBo;
  5. import com.zhongzheng.modules.alisms.service.IAliSmsService;
  6. import io.swagger.annotations.Api;
  7. import io.swagger.annotations.ApiOperation;
  8. import lombok.RequiredArgsConstructor;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.web.bind.annotation.PostMapping;
  11. import org.springframework.web.bind.annotation.RequestBody;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RestController;
  14. /**
  15. * 客户端用户Controller
  16. *
  17. * @author hjl
  18. * @date 2021-06-08
  19. */
  20. @Api(value = "短信控制器", tags = {"短信控制器"})
  21. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  22. @RestController
  23. @RequestMapping("/app/common/seller/sms")
  24. public class SellerSmsController extends BaseController {
  25. private final IAliSmsService iSmsService;
  26. @ApiOperation("获取业务员注册短信")
  27. @PostMapping("/register")
  28. public AjaxResult register(@RequestBody SmsAddBo bo) {
  29. iSmsService.sendSellerRegisterSms(bo.getTel());
  30. return AjaxResult.success();
  31. }
  32. @ApiOperation("获取业务员登录短信")
  33. @PostMapping("/login")
  34. public AjaxResult login(@RequestBody SmsAddBo bo) {
  35. iSmsService.sendSellerLoginSms(bo.getTel());
  36. return AjaxResult.success();
  37. }
  38. @ApiOperation("获取业务员忘记短信")
  39. @PostMapping("/forget")
  40. public AjaxResult forget(@RequestBody SmsAddBo bo) {
  41. iSmsService.sendSellerForgetSms(bo.getTel());
  42. return AjaxResult.success();
  43. }
  44. }