v2.0.4 更新

Merge pull request !50 from 小诺/dev
pull/51/head v2.0.4
小诺 2 years ago committed by Gitee
commit cbacecb81e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -53,7 +53,7 @@ Snowy谐音“小诺”恰应小诺团队名称意思为”下雪的、纯
文档地址:[https://xiaonuo.vip/doc](https://xiaonuo.vip/doc)
## 支撑组件及启动
## 快速启动
全栈工程师推荐idea
@ -133,6 +133,16 @@ snowy
1.x分支目前已停止新增功能只限于bug的维护推荐使用2x版本
## 视频教程
免费教程地址:[https://space.bilibili.com/50101698/channel/collectiondetail?sid=739071](https://space.bilibili.com/50101698/channel/collectiondetail?sid=739071)
<img src="https://pan.xiaonuo.vip/?explorer/share/file&hash=4016e9m3XODiVlJlUQUS03pg7bCCXa_TYalxvdtil320XXItVMh4-gAe&name=/001.jpg"/>
<img src="https://pan.xiaonuo.vip/?explorer/share/file&hash=902bZPTH7tjPGGSj05qVl8OHdqZFO-EBeD_OmmYnr3Bg-vUuxXnr0COr&name=/002.jpg"/>
作者也在上班工作,所以在利用休息时间为大家创作,录制视频的目的也是为各位小伙伴提供文档跟技术交流群聊之外的上手学习资料
> 视频由小诺开源技术团队王同学(每天一点)进行录制
## 效果图:fire:

@ -73,5 +73,9 @@ export default {
// 获取权限授权树
rolePermissionTreeSelector(data) {
return request('permissionTreeSelector', data, 'get')
},
// 获取汇总数据
roleSummary(data) {
return request('summary', data, 'get')
}
}

@ -69,9 +69,11 @@
//
const setModuleBackColor = () => {
if (moduleUnfoldOpen.value) {
try {
const moduleMunu = document.getElementById('moduleMunu')
moduleBackColor.value? moduleMunu.classList.add('module-menu-color')
: moduleMunu.classList.remove('module-menu-color')
} catch (err) { }
setSelectedKeys()
}
}

@ -142,6 +142,7 @@
const echoModuleData = (data, resEcho) => {
//
data.forEach((module) => {
if (module.menu) {
//
module.menu.forEach((item) => {
const menueCheck = ref(0)
@ -182,6 +183,7 @@
firstShowMap[item.parentName] = [index]
}
})
}
})
return data
}
@ -254,6 +256,7 @@
const convertData = () => {
resultDataModel.grantInfoList = []
echoDatalist.value.forEach((table) => {
if (table.menu) {
table.menu.forEach((item) => {
const grantInfo = {
menuId: '',
@ -269,6 +272,7 @@
resultDataModel.grantInfoList.push(grantInfo)
}
})
}
})
return resultDataModel
}

@ -45,6 +45,7 @@
bordered
:row-key="(record) => record.id"
:row-selection="options.rowSelection"
@resizeColumn="handleResizeColumn"
>
<template #operator class="table-operator">
<a-space>
@ -87,6 +88,17 @@
</a-dropdown>
</template>
</template>
<!-- <template #summary>
<a-table-summary-row>
<a-table-summary-cell :index="0"> </a-table-summary-cell>
<a-table-summary-cell :index="1"></a-table-summary-cell>
<a-table-summary-cell :index="2"></a-table-summary-cell>
<a-table-summary-cell :index="3">
<a-typography-text type="danger">{{ summaryData.sortCode }}</a-typography-text>
</a-table-summary-cell>
<a-table-summary-cell :index="4"></a-table-summary-cell>
</a-table-summary-row>
</template> -->
</s-table>
</a-card>
</a-col>
@ -114,7 +126,9 @@
const columns = [
{
title: '角色名称',
dataIndex: 'name'
dataIndex: 'name',
resizable: true,
width: 150
},
{
title: '分类',
@ -165,10 +179,22 @@
// Promise
const loadDate = (parameter) => {
return roleApi.rolePage(Object.assign(parameter, searchFormState)).then((res) => {
let param = Object.assign(parameter, searchFormState)
summaryDataReq(param)
return roleApi.rolePage(param).then((res) => {
return res
})
}
//
const summaryData = {}
const summaryDataReq = (param) => {
summaryData.sortCode = ref(0)
roleApi.roleSummary(param).then((summary) => {
if(summary != null){
return summaryData.sortCode = summary.sortCode
}
})
}
//
orgApi.orgTree().then((res) => {
cardLoading.value = false
@ -213,6 +239,10 @@
}
table.value.refresh(true)
}
//
const handleResizeColumn = (w, col) => {
col.width = w;
}
//
const removeOrg = (record) => {
let params = [

@ -16,7 +16,7 @@
<properties>
<lombok.versin>1.18.22</lombok.versin>
<druid.version>1.2.8</druid.version>
<druid.version>1.2.9</druid.version>
<mybatis.plus.version>3.5.2</mybatis.plus.version>
<easy.trans.version>2.0.3</easy.trans.version>
<commons.pool2.version>2.11.1</commons.pool2.version>

@ -276,4 +276,17 @@ public class SysRoleController {
public CommonResult<List<SysUser>> userSelector(SysRoleSelectorUserParam sysRoleSelectorUserParam) {
return CommonResult.data(sysRoleService.userSelector(sysRoleSelectorUserParam));
}
/**
*
*
* @author jax
* @date 2022/10/18 20:00
*/
@ApiOperationSupport(order = 17)
@ApiOperation("获取页面统计数据")
@GetMapping("/sys/role/summary")
public CommonResult<SysRole> summary(SysRolePageParam sysRolePageParam) {
return CommonResult.data(sysRoleService.summary(sysRolePageParam));
}
}

@ -169,4 +169,12 @@ public interface SysRoleService extends IService<SysRole> {
* @date 2022/8/22 13:39
**/
List<SysUser> userSelector(SysRoleSelectorUserParam sysRoleSelectorUserParam);
/**
*
*
* @author jax
* @date 2022/8/22 13:39
**/
SysRole summary(SysRolePageParam sysRolePageParam);
}

@ -403,6 +403,14 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
return sysUserService.list(lambdaQueryWrapper);
}
@Override
public SysRole summary(SysRolePageParam sysRolePageParam) {
// 实现自己业务逻辑计算 以下是伪代码
SysRole sysRole = new SysRole();
sysRole.setSortCode(2000);
return sysRole;
}
/* ====以下为各种递归方法==== */
public JSONObject getParentNode(List<Tree<String>> treeList, SysMenu sysMenu) {

@ -83,7 +83,6 @@ import vip.xiaonuo.sys.modular.user.service.SysUserService;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.IOException;
@ -433,7 +432,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
// 执行校验验证码
validValidCode(sysUserGetEmailValidCodeParam.getValidCode(), sysUserGetEmailValidCodeParam.getValidCodeReqNo());
// 根据手机号获取用户信息,判断用户是否存在
// 根据邮箱获取用户信息,判断用户是否存在
if (ObjectUtil.isEmpty(this.getUserByEmail(email))) {
throw new CommonException("邮箱:{}不存在", email);
}
@ -488,8 +487,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
SysUser sysUser = this.queryEntity(StpUtil.getLoginIdAsString());
try {
String suffix = Objects.requireNonNull(FileUtil.getSuffix(file.getOriginalFilename())).toLowerCase();
BufferedImage bufferedImage = ImgUtil.toImage(file.getBytes());
String base64 = ImgUtil.toBase64DataUri(bufferedImage, suffix);
String base64 = ImgUtil.toBase64DataUri(ImgUtil.scale(ImgUtil.toImage(file.getBytes()),
100, 100, null), suffix);
this.update(new LambdaUpdateWrapper<SysUser>().eq(SysUser::getId,
sysUser.getId()).set(SysUser::getAvatar, base64));
return base64;
@ -502,9 +501,15 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Override
public void updateSignature(SysUserSignatureParam sysUserSignatureParam) {
SysUser sysUser = this.queryEntity(StpUtil.getLoginIdAsString());
String sysUserSignatureStr = sysUserSignatureParam.getSignature();
if(sysUserSignatureParam.getSignature().contains(StrUtil.COMMA)) {
sysUserSignatureStr = StrUtil.split(sysUserSignatureStr, StrUtil.COMMA).get(1);
}
String base64 = ImgUtil.toBase64DataUri(ImgUtil.scale(ImgUtil.toImage(sysUserSignatureStr),
100, 50, null), ImgUtil.IMAGE_TYPE_PNG);
// 更新指定字段
this.update(new LambdaUpdateWrapper<SysUser>().eq(SysUser::getId, sysUser.getId())
.set(SysUser::getSignature, sysUserSignatureParam.getSignature()));
.set(SysUser::getSignature, base64));
}
@Override

@ -21,7 +21,7 @@
<mysql.connector.java.version>8.0.28</mysql.connector.java.version>
<oracle.connector.java.version>21.5.0.0</oracle.connector.java.version>
<oracle.nls.orai18n.version>19.7.0.0</oracle.nls.orai18n.version>
<mssql.connector.java.version>11.2.1.jre8</mssql.connector.java.version>
<mssql.connector.java.version>9.4.1.jre8</mssql.connector.java.version>
</properties>
<dependencies>

@ -125,9 +125,11 @@ public class GlobalExceptionUtil {
CommonException commonException = (CommonException) secondCause;
commonResult = CommonResult.get(commonException.getCode(), commonException.getMsg(), null);
} else {
e.printStackTrace();
commonResult = CommonResult.error("数据操作异常");
}
} else {
e.printStackTrace();
commonResult = CommonResult.error("数据操作异常");
}
} else if (e instanceof CommonException) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -2,7 +2,7 @@
# server configuration
#########################################
server.port=82
server.max-http-header-size=10240
server.max-http-header-size=100MB
#########################################
# spring profiles configuration
@ -35,6 +35,13 @@ spring.datasource.dynamic.strict=true
#spring.datasource.dynamic.datasource.master.password=12345678
#spring.datasource.dynamic.strict=true
# mssql
#spring.datasource.dynamic.datasource.master.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
#spring.datasource.dynamic.datasource.master.url=jdbc:sqlserver://localhost:1433;DatabaseName=SNOWY
#spring.datasource.dynamic.datasource.master.username=sa
#spring.datasource.dynamic.datasource.master.password=123456
#spring.datasource.dynamic.strict=true
# dm database
#spring.datasource.dynamic.datasource.master.driver-class-name=dm.jdbc.driver.DmDriver
#spring.datasource.dynamic.datasource.master.url=jdbc:dm://localhost:5236/SYSDBA
@ -89,6 +96,7 @@ spring.redis.lettuce.pool.min-idle=0
# mybatis-plus configuration
#########################################
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
mybatis-plus.configuration.jdbc-type-for-null=null
mybatis-plus.global-config.banner=false
mybatis-plus.global-config.db-config.id-type=ASSIGN_ID
mybatis-plus.global-config.db-config.logic-delete-field=DELETE_FLAG
@ -96,10 +104,6 @@ mybatis-plus.global-config.db-config.logic-delete-value=DELETED
mybatis-plus.global-config.db-config.logic-not-delete-value=NOT_DELETE
mybatis-plus.mapper-locations=classpath*:vip/xiaonuo/**/mapping/*.xml
mybatis-plus.type-handlers-package=vip.xiaonuo.common.handler
#如果数据库为postgresql则需要配置为blobType: BINARY
mybatis-plus.configuration-properties.blobType=BLOB
#如果数据库为oracle或mssql则需要配置为boolValue: 1
mybatis-plus.configuration-properties.boolValue=false
#########################################
# easy-trans configuration

Loading…
Cancel
Save