短信接口权限等
This commit is contained in:
wangshuai 2024-07-01 18:41:30 +08:00
parent 193a9ae15b
commit e81fb987d8
8 changed files with 45 additions and 16 deletions

View File

@ -38,9 +38,13 @@
</dependency>
<!-- Mysql驱动包 -->
<!-- <dependency>-->
<!-- <groupId>mysql</groupId>-->
<!-- <artifactId>mysql-connector-java</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<!-- 核心模块-->

View File

@ -113,7 +113,7 @@ public class SwaggerConfig
// 用ApiInfoBuilder进行定制
return new ApiInfoBuilder()
// 设置标题
.title("标题:若依管理系统_接口文档")
.title("标题:优势管理系统_接口文档")
// 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// 作者信息

View File

@ -1,13 +1,13 @@
# 项目相关配置
ruoyi:
# 名称
name: RuoYi
name: youshi
# 版本
version: 3.8.7
# 版权年份
copyrightYear: 2024
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: D:/ruoyi/uploadPath
profile: D:/youshi/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证

View File

@ -111,7 +111,7 @@ public class SecurityConfig
.authorizeHttpRequests((requests) -> {
permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
requests.antMatchers("/login", "/register", "/captchaImage","/sms").permitAll()
// 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

View File

@ -25,5 +25,10 @@ public interface ISmsService {
*/
Boolean validationCode(String phone, String code);
/**
* 验证验证码
* @param phone
* @return
*/
void sendSmsOne(String phone);
}

View File

@ -1,6 +1,7 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.config.TencentCloudProperties;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.system.service.ISmsService;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.sms.v20210111.models.SendSmsRequest;
@ -66,6 +67,10 @@ public class SmsServiceImpl implements ISmsService {
@Override
public void sendSmsOne(String phone) {
try {
/*验证手机号是否存在*/
if(false){
throw new ServiceException("手机号不存在,请联系管理员注册!");
}
String code = generateCode();
String[] phoneNumber = new String[]{phone};
String[] params = new String[]{code};
@ -75,7 +80,7 @@ public class SmsServiceImpl implements ISmsService {
redisTemplate.opsForValue().set(phone, code);
}
} catch (TencentCloudSDKException e) {
e.printStackTrace();
throw new ServiceException(e.getMessage());
}
}

View File

@ -1,8 +1,8 @@
{
"name": "ruoyi",
"version": "3.8.7",
"description": "若依管理系统",
"author": "若依",
"description": "优势管理系统",
"author": "优势",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",

View File

@ -1,28 +1,43 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="营销源名称" prop="roleName">
<el-form-item label="平台" prop="platform">
<el-select
v-model="queryParams.platform"
placeholder="选择平台"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.sys_platform_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="店铺名称" prop="roleName">
<el-input
v-model="queryParams.roleName"
placeholder="请输入营销源名称"
placeholder="请输入店铺名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="营销源标识" prop="roleKey">
<el-form-item label="店铺编号" prop="roleKey">
<el-input
v-model="queryParams.roleKey"
placeholder="请输入营销源标识"
placeholder="请输入店铺编号"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="仅当前账号" prop="status">
<el-form-item label="店铺归属" prop="status">
<el-select
v-model="queryParams.status"
placeholder="角色状态"
placeholder="店铺归属"
clearable
style="width: 240px"
>
@ -265,7 +280,7 @@ import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/m
export default {
name: "Role",
dicts: ['sys_normal_disable'],
dicts: ['sys_normal_disable','sys_platform_type'],
data() {
return {
//