|
@@ -100,7 +100,7 @@ public class SendSmsController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:sms:edit')")
|
|
@PreAuthorize("@ss.hasPermi('system:sms:edit')")
|
|
@Log(title = "短信日志", businessType = BusinessType.UPDATE)
|
|
@Log(title = "短信日志", businessType = BusinessType.UPDATE)
|
|
- @PutMapping
|
|
|
|
|
|
+ @PostMapping("/put")
|
|
public AjaxResult edit(@RequestBody SendSms sendSms)
|
|
public AjaxResult edit(@RequestBody SendSms sendSms)
|
|
{
|
|
{
|
|
return toAjax(sendSmsService.updateSendSms(sendSms));
|
|
return toAjax(sendSmsService.updateSendSms(sendSms));
|
|
@@ -111,7 +111,7 @@ public class SendSmsController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:sms:remove')")
|
|
@PreAuthorize("@ss.hasPermi('system:sms:remove')")
|
|
@Log(title = "短信日志", businessType = BusinessType.DELETE)
|
|
@Log(title = "短信日志", businessType = BusinessType.DELETE)
|
|
- @DeleteMapping("/{ids}")
|
|
|
|
|
|
+ @GetMapping("/delete/{ids}")
|
|
public AjaxResult remove(@PathVariable Long[] ids)
|
|
public AjaxResult remove(@PathVariable Long[] ids)
|
|
{
|
|
{
|
|
return toAjax(sendSmsService.deleteSendSmsByIds(ids));
|
|
return toAjax(sendSmsService.deleteSendSmsByIds(ids));
|
|
@@ -177,6 +177,6 @@ public class SendSmsController extends BaseController
|
|
String code = SendSmsUtils.getCode(4);
|
|
String code = SendSmsUtils.getCode(4);
|
|
String verifyKey = CacheConstants.SMS_CODE_KEY + sendSms.getPhone();
|
|
String verifyKey = CacheConstants.SMS_CODE_KEY + sendSms.getPhone();
|
|
redisCache.setCacheObject(verifyKey, code, Constants.SMS_EXPIRATION, TimeUnit.MINUTES);
|
|
redisCache.setCacheObject(verifyKey, code, Constants.SMS_EXPIRATION, TimeUnit.MINUTES);
|
|
- return AjaxResult.error("发送失败");
|
|
|
|
|
|
+ return AjaxResult.success("获取成功",code);
|
|
}
|
|
}
|
|
}
|
|
}
|