发布 v4.2.0

This commit is contained in:
疯狂的狮子Li
2022-06-28 22:51:57 +08:00
parent e0527b3350
commit c5f4dec559
168 changed files with 3232 additions and 2756 deletions

View File

@ -130,8 +130,8 @@ spring:
port: 6379
# 数据库索引
database: 0
# 密码
password:
# 密码(如没有密码请注释掉)
# password:
# 连接超时时间
timeout: 10s
# 是否开启ssl
@ -156,3 +156,37 @@ redisson:
timeout: 3000
# 发布和订阅连接池大小
subscriptionConnectionPoolSize: 50
--- # mail 邮件发送
mail:
enabled: false
host: smtp.163.com
port: 465
# 是否需要用户名密码验证
auth: true
# 发送方遵循RFC-822标准
from: xxx@163.com
# 用户名注意如果使用foxmail邮箱此处user为qq号
user: xxx@163.com
# 密码注意某些邮箱需要为SMTP服务单独设置密码详情查看相关帮助
pass: xxxxxxxxxx
# 使用 STARTTLS安全连接STARTTLS是对纯文本通信协议的扩展。
starttlsEnable: true
# 使用SSL安全连接
sslEnable: true
# SMTP超时时长单位毫秒缺省值不超时
timeout: 0
# Socket连接超时值单位毫秒缺省值不超时
connectionTimeout: 0
--- # sms 短信
sms:
enabled: false
# 阿里云 dysmsapi.aliyuncs.com
# 腾讯云 sms.tencentcloudapi.com
endpoint: "dysmsapi.aliyuncs.com"
accessKeyId: xxxxxxx
accessKeySecret: xxxxxx
signName: 测试
# 腾讯专用
sdkAppId:

View File

@ -133,8 +133,8 @@ spring:
port: 6379
# 数据库索引
database: 0
# 密码
password:
# 密码(如没有密码请注释掉)
# password:
# 连接超时时间
timeout: 10s
# 是否开启ssl
@ -159,3 +159,37 @@ redisson:
timeout: 3000
# 发布和订阅连接池大小
subscriptionConnectionPoolSize: 50
--- # mail 邮件发送
mail:
enabled: false
host: smtp.163.com
port: 465
# 是否需要用户名密码验证
auth: true
# 发送方遵循RFC-822标准
from: xxx@163.com
# 用户名注意如果使用foxmail邮箱此处user为qq号
user: xxx@163.com
# 密码注意某些邮箱需要为SMTP服务单独设置密码详情查看相关帮助
pass: xxxxxxxxxx
# 使用 STARTTLS安全连接STARTTLS是对纯文本通信协议的扩展。
starttlsEnable: true
# 使用SSL安全连接
sslEnable: true
# SMTP超时时长单位毫秒缺省值不超时
timeout: 0
# Socket连接超时值单位毫秒缺省值不超时
connectionTimeout: 0
--- # sms 短信
sms:
enabled: false
# 阿里云 dysmsapi.aliyuncs.com
# 腾讯云 sms.tencentcloudapi.com
endpoint: "dysmsapi.aliyuncs.com"
accessKeyId: xxxxxxx
accessKeySecret: xxxxxx
signName: 测试
# 腾讯专用
sdkAppId:

View File

@ -118,12 +118,6 @@ sa-token:
security:
# 排除路径
excludes:
- /login
- /smsLogin
- /xcxLogin
- /logout
- /register
- /captchaImage
# 静态资源
- /*.html
- /**/*.html

Binary file not shown.

Binary file not shown.

View File

@ -97,17 +97,9 @@
<appender-ref ref="file_error"/>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.ruoyi" level="info" />
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" />
<root level="info">
<appender-ref ref="console" />
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="console" />
<appender-ref ref="async_info" />
<appender-ref ref="async_error" />
<appender-ref ref="file_console" />

View File

@ -32,8 +32,8 @@
m.perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role ro on ur.role_id = ro.role_id
left join sys_user_role sur on rm.role_id = sur.role_id
left join sys_role ro on sur.role_id = ro.role_id
${ew.getCustomSqlSegment}
</select>
@ -55,9 +55,9 @@
m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role ro on ur.role_id = ro.role_id
left join sys_user u on ur.user_id = u.user_id
left join sys_user_role sur on rm.role_id = sur.role_id
left join sys_role ro on sur.role_id = ro.role_id
left join sys_user u on sur.user_id = u.user_id
where u.user_id = #{userId}
and m.menu_type in ('M', 'C')
and m.status = '0'
@ -81,18 +81,18 @@
select distinct m.perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_user_role sur on rm.role_id = sur.role_id
</select>
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
select distinct m.perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role r on r.role_id = ur.role_id
left join sys_user_role sur on rm.role_id = sur.role_id
left join sys_role r on r.role_id = sur.role_id
where m.status = '0'
and r.status = '0'
and ur.user_id = #{userId}
and sur.user_id = #{userId}
</select>
</mapper>

View File

@ -34,8 +34,8 @@
r.create_time,
r.remark
from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id
left join sys_user u on u.user_id = ur.user_id
left join sys_user_role sur on sur.role_id = r.role_id
left join sys_user u on u.user_id = sur.user_id
left join sys_dept d on u.dept_id = d.dept_id
</sql>
@ -51,14 +51,14 @@
<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
<include refid="selectRoleVo"/>
WHERE r.del_flag = '0' and ur.user_id = #{userId}
WHERE r.del_flag = '0' and sur.user_id = #{userId}
</select>
<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
select r.role_id
from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id
left join sys_user u on u.user_id = ur.user_id
left join sys_user_role sur on sur.role_id = r.role_id
left join sys_user u on u.user_id = sur.user_id
where u.user_id = #{userId}
</select>

View File

@ -80,12 +80,12 @@
r.status as role_status
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
left join sys_user_role sur on u.user_id = sur.user_id
left join sys_role r on r.role_id = sur.role_id
</sql>
<select id="selectPageUserList" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from
sys_user u
left join sys_dept d on u.dept_id = d.dept_id
@ -93,7 +93,7 @@
</select>
<select id="selectUserList" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from
sys_user u
left join sys_dept d on u.dept_id = d.dept_id
@ -104,8 +104,8 @@
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
left join sys_user_role sur on u.user_id = sur.user_id
left join sys_role r on r.role_id = sur.role_id
${ew.getCustomSqlSegment}
</select>
@ -113,8 +113,8 @@
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
left join sys_user_role sur on u.user_id = sur.user_id
left join sys_role r on r.role_id = sur.role_id
${ew.getCustomSqlSegment}
</select>

View File

@ -10,8 +10,8 @@
</resultMap>
<select id="selectUserIdsByRoleId" resultType="Long">
select u.user_id from sys_user u
inner join sys_user_role ur
on u.user_id = ur.user_id and ur.role_id = #{roleId}
inner join sys_user_role sur
on u.user_id = sur.user_id and sur.role_id = #{roleId}
</select>
</mapper>

View File

@ -53,11 +53,11 @@ public class ${ClassName}Controller extends BaseController {
@SaCheckPermission("${permissionPrefix}:list")
@GetMapping("/list")
#if($table.crud || $table.sub)
public TableDataInfo<${ClassName}Vo> list(@Validated(QueryGroup.class) ${ClassName}Bo bo, PageQuery pageQuery) {
public TableDataInfo<${ClassName}Vo> list(${ClassName}Bo bo, PageQuery pageQuery) {
return i${ClassName}Service.queryPageList(bo, pageQuery);
}
#elseif($table.tree)
public R<List<${ClassName}Vo>> list(@Validated(QueryGroup.class) ${ClassName}Bo bo) {
public R<List<${ClassName}Vo>> list(${ClassName}Bo bo) {
List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo);
return R.ok(list);
}
@ -70,7 +70,7 @@ public class ${ClassName}Controller extends BaseController {
@SaCheckPermission("${permissionPrefix}:export")
@Log(title = "${functionName}", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(@Validated ${ClassName}Bo bo, HttpServletResponse response) {
public void export(${ClassName}Bo bo, HttpServletResponse response) {
List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo);
ExcelUtil.exportExcel(list, "${functionName}", ${ClassName}Vo.class, response);
}
@ -82,8 +82,8 @@ public class ${ClassName}Controller extends BaseController {
@SaCheckPermission("${permissionPrefix}:query")
@GetMapping("/{${pkColumn.javaField}}")
public R<${ClassName}Vo> getInfo(@ApiParam("主键")
@NotNull(message = "主键不能为空")
@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) {
@NotNull(message = "主键不能为空")
@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) {
return R.ok(i${ClassName}Service.queryById(${pkColumn.javaField}));
}

View File

@ -2,7 +2,7 @@ package ${packageName}.domain;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
@ -28,6 +28,7 @@ import com.ruoyi.common.core.domain.TreeEntity;
#set($Entity="TreeEntity<${ClassName}>")
#end
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("${tableName}")
public class ${ClassName} extends ${Entity} {

View File

@ -21,52 +21,33 @@ public interface I${ClassName}Service {
/**
* 查询${functionName}
*
* @param ${pkColumn.javaField} ${functionName}主键
* @return ${functionName}
*/
${ClassName}Vo queryById(${pkColumn.javaType} ${pkColumn.javaField});
#if($table.crud || $table.sub)
/**
* 查询${functionName}列表
*
* @param ${className} ${functionName}
* @return ${functionName}集合
*/
TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}Bo bo, PageQuery pageQuery);
#end
/**
* 查询${functionName}列表
*
* @param ${className} ${functionName}
* @return ${functionName}集合
*/
List<${ClassName}Vo> queryList(${ClassName}Bo bo);
/**
* 修改${functionName}
*
* @param ${className} ${functionName}
* @return 结果
*/
Boolean insertByBo(${ClassName}Bo bo);
/**
* 修改${functionName}
*
* @param ${className} ${functionName}
* @return 结果
*/
Boolean updateByBo(${ClassName}Bo bo);
/**
* 校验并批量删除${functionName}信息
*
* @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合
* @param isValid 是否校验,true-删除前校验,false-不校验
* @return 结果
*/
Boolean deleteWithValidByIds(Collection<${pkColumn.javaType}> ids, Boolean isValid);
}

View File

@ -35,9 +35,6 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
/**
* 查询${functionName}
*
* @param ${pkColumn.javaField} ${functionName}主键
* @return ${functionName}
*/
@Override
public ${ClassName}Vo queryById(${pkColumn.javaType} ${pkColumn.javaField}){
@ -47,9 +44,6 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
#if($table.crud || $table.sub)
/**
* 查询${functionName}列表
*
* @param bo ${functionName}
* @return ${functionName}
*/
@Override
public TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}Bo bo, PageQuery pageQuery) {
@ -61,9 +55,6 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
/**
* 查询${functionName}列表
*
* @param bo ${functionName}
* @return ${functionName}
*/
@Override
public List<${ClassName}Vo> queryList(${ClassName}Bo bo) {
@ -100,9 +91,6 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
/**
* 新增${functionName}
*
* @param bo ${functionName}
* @return 结果
*/
@Override
public Boolean insertByBo(${ClassName}Bo bo) {
@ -118,9 +106,6 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
/**
* 修改${functionName}
*
* @param bo ${functionName}
* @return 结果
*/
@Override
public Boolean updateByBo(${ClassName}Bo bo) {
@ -131,8 +116,6 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
/**
* 保存前的数据校验
*
* @param entity 实体类数据
*/
private void validEntityBeforeSave(${ClassName} entity){
//TODO 做一些数据校验,如唯一约束
@ -140,9 +123,6 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service {
/**
* 批量删除${functionName}
*
* @param ${pkColumn.javaField}s 需要删除的${functionName}主键
* @return 结果
*/
@Override
public Boolean deleteWithValidByIds(Collection<${pkColumn.javaType}> ids, Boolean isValid) {

View File

@ -173,11 +173,13 @@
#set($dictType=$column.dictType)
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
<el-form-item label="${comment}" prop="${treeParentCode}">
<tree-select
v-model:value="form.${treeParentCode}"
:options="${businessName}Options"
:objMap="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
<el-tree-select
v-model="form.${treeParentCode}"
:data="${businessName}Options"
:props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
value-key="${treeCode}"
placeholder="请选择${comment}"
check-strictly
/>
</el-form-item>
#elseif($column.htmlType == "input")
@ -353,8 +355,8 @@ function getList() {
}
/** 查询${functionName}下拉树结构 */
async function getTreeselect() {
await list${BusinessName}().then(response => {
function getTreeselect() {
list${BusinessName}().then(response => {
${businessName}Options.value = [];
const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] };
data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
@ -403,9 +405,9 @@ function resetQuery() {
}
/** 新增按钮操作 */
async function handleAdd(row) {
function handleAdd(row) {
reset();
await getTreeselect();
getTreeselect();
if (row != null && row.${treeCode}) {
form.value.${treeParentCode} = row.${treeCode};
} else {