mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-19 09:46:39 +08:00
Merge remote-tracking branch 'origin/fast' into fast
This commit is contained in:
commit
3fbf0a8e9e
@ -73,7 +73,9 @@ export default {
|
|||||||
if(router.path === "/") {
|
if(router.path === "/") {
|
||||||
router.children[item].path = "/redirect/" + router.children[item].path;
|
router.children[item].path = "/redirect/" + router.children[item].path;
|
||||||
} else {
|
} else {
|
||||||
router.children[item].path = router.path + "/" + router.children[item].path;
|
if(!this.ishttp(router.children[item].path)) {
|
||||||
|
router.children[item].path = router.path + "/" + router.children[item].path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
router.children[item].parentPath = router.path;
|
router.children[item].parentPath = router.path;
|
||||||
}
|
}
|
||||||
@ -122,7 +124,7 @@ export default {
|
|||||||
// 菜单选择事件
|
// 菜单选择事件
|
||||||
handleSelect(key, keyPath) {
|
handleSelect(key, keyPath) {
|
||||||
this.currentIndex = key;
|
this.currentIndex = key;
|
||||||
if (key.indexOf("http://") !== -1 || key.indexOf("https://") !== -1) {
|
if (this.ishttp(key)) {
|
||||||
// http(s):// 路径新窗口打开
|
// http(s):// 路径新窗口打开
|
||||||
window.open(key, "_blank");
|
window.open(key, "_blank");
|
||||||
} else if (key.indexOf("/redirect") !== -1) {
|
} else if (key.indexOf("/redirect") !== -1) {
|
||||||
@ -147,6 +149,9 @@ export default {
|
|||||||
this.$store.commit("SET_SIDEBAR_ROUTERS", routes);
|
this.$store.commit("SET_SIDEBAR_ROUTERS", routes);
|
||||||
}
|
}
|
||||||
return routes;
|
return routes;
|
||||||
|
},
|
||||||
|
ishttp(url) {
|
||||||
|
return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.4.0</version>
|
<version>3.4.0</version>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>RuoYi-Vue-Plus</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<url>https://gitee.com/JavaLionLi/RuoYi-Vue-Plus</url>
|
||||||
<description>若依管理系统</description>
|
<description>若依管理系统</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -73,11 +73,11 @@ public class SysUser implements Serializable
|
|||||||
/** 用户头像 */
|
/** 用户头像 */
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
/** 密码 */
|
/** 密码 */
|
||||||
@JsonProperty
|
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
|
@JsonProperty
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
@ -513,7 +513,10 @@ public class ExcelUtil<T>
|
|||||||
}
|
}
|
||||||
else if (ColumnType.NUMERIC == attr.cellType())
|
else if (ColumnType.NUMERIC == attr.cellType())
|
||||||
{
|
{
|
||||||
cell.setCellValue(StrUtil.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
|
if (Validator.isNotNull(value))
|
||||||
|
{
|
||||||
|
cell.setCellValue(StrUtil.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (ColumnType.IMAGE == attr.cellType())
|
else if (ColumnType.IMAGE == attr.cellType())
|
||||||
{
|
{
|
||||||
@ -653,7 +656,7 @@ public class ExcelUtil<T>
|
|||||||
* @param endCol 结束列
|
* @param endCol 结束列
|
||||||
*/
|
*/
|
||||||
public void setXSSFPrompt(Sheet sheet, String promptTitle, String promptContent, int firstRow, int endRow,
|
public void setXSSFPrompt(Sheet sheet, String promptTitle, String promptContent, int firstRow, int endRow,
|
||||||
int firstCol, int endCol)
|
int firstCol, int endCol)
|
||||||
{
|
{
|
||||||
DataValidationHelper helper = sheet.getDataValidationHelper();
|
DataValidationHelper helper = sheet.getDataValidationHelper();
|
||||||
DataValidationConstraint constraint = helper.createCustomConstraint("DD1");
|
DataValidationConstraint constraint = helper.createCustomConstraint("DD1");
|
||||||
|
@ -7,49 +7,39 @@ import org.apache.ibatis.reflection.MetaObject;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author woo
|
* MP注入处理器
|
||||||
* @date 2021/3/11
|
* @author Lion Li
|
||||||
|
* @date 2021/4/25
|
||||||
*/
|
*/
|
||||||
public class CreateAndUpdateMetaObjectHandler implements MetaObjectHandler {
|
public class CreateAndUpdateMetaObjectHandler implements MetaObjectHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertFill(MetaObject metaObject) {
|
public void insertFill(MetaObject metaObject) {
|
||||||
//region 处理创建人信息
|
//根据属性名字设置要填充的值
|
||||||
Object createBy = this.getFieldValByName("createBy", metaObject);
|
if (metaObject.hasGetter("createTime")) {
|
||||||
Object createTime = this.getFieldValByName("createTime", metaObject);
|
if (metaObject.getValue("createTime") == null) {
|
||||||
if (createBy == null) {
|
this.setFieldValByName("createTime", new Date(), metaObject);
|
||||||
createBy = SecurityUtils.getUsername();
|
}
|
||||||
this.setFieldValByName("createBy", createBy, metaObject);
|
|
||||||
}
|
}
|
||||||
if (createTime == null) {
|
if (metaObject.hasGetter("createBy")) {
|
||||||
createTime = new Date();
|
if (metaObject.getValue("createBy") == null) {
|
||||||
this.setFieldValByName("createTime", createTime, metaObject);
|
this.setFieldValByName("createBy", SecurityUtils.getUsername(), metaObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateFill(MetaObject metaObject) {
|
public void updateFill(MetaObject metaObject) {
|
||||||
//region 处理修改人信息
|
if (metaObject.hasGetter("updateBy")) {
|
||||||
Object updateBy = this.getFieldValByName("updateBy", metaObject);
|
if (metaObject.getValue("updateBy") == null) {
|
||||||
Object updateTime = this.getFieldValByName("updateTime", metaObject);
|
this.setFieldValByName("updateBy", SecurityUtils.getUsername(), metaObject);
|
||||||
if (updateBy == null) {
|
}
|
||||||
updateBy = SecurityUtils.getUsername();
|
|
||||||
this.setFieldValByName("updateBy", updateBy, metaObject);
|
|
||||||
}
|
}
|
||||||
if (updateTime == null) {
|
if (metaObject.hasGetter("updateTime")) {
|
||||||
updateTime = new Date();
|
if (metaObject.getValue("updateTime") == null) {
|
||||||
this.setFieldValByName("updateTime", updateTime, metaObject);
|
this.setFieldValByName("updateTime", new Date(), metaObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean openInsertFill() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean openUpdateFill() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import com.ruoyi.system.service.ISysLogininforService;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -28,6 +29,7 @@ public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, S
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void insertLogininfor(SysLogininfor logininfor) {
|
public void insertLogininfor(SysLogininfor logininfor) {
|
||||||
|
logininfor.setLoginTime(new Date());
|
||||||
save(logininfor);
|
save(logininfor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,10 +47,10 @@ public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, S
|
|||||||
.eq(StrUtil.isNotBlank(logininfor.getStatus()),SysLogininfor::getStatus,logininfor.getStatus())
|
.eq(StrUtil.isNotBlank(logininfor.getStatus()),SysLogininfor::getStatus,logininfor.getStatus())
|
||||||
.like(StrUtil.isNotBlank(logininfor.getUserName()),SysLogininfor::getUserName,logininfor.getUserName())
|
.like(StrUtil.isNotBlank(logininfor.getUserName()),SysLogininfor::getUserName,logininfor.getUserName())
|
||||||
.apply(Validator.isNotEmpty(params.get("beginTime")),
|
.apply(Validator.isNotEmpty(params.get("beginTime")),
|
||||||
"date_format(login_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
"date_format(login_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||||
params.get("beginTime"))
|
params.get("beginTime"))
|
||||||
.apply(Validator.isNotEmpty(params.get("endTime")),
|
.apply(Validator.isNotEmpty(params.get("endTime")),
|
||||||
"date_format(login_time,'%y%m%d') <= date_format({0},'%y%m%d'",
|
"date_format(login_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||||
params.get("endTime"))
|
params.get("endTime"))
|
||||||
.orderByDesc(SysLogininfor::getInfoId));
|
.orderByDesc(SysLogininfor::getInfoId));
|
||||||
}
|
}
|
||||||
|
@ -142,6 +142,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
|||||||
router.setRedirect("noRedirect");
|
router.setRedirect("noRedirect");
|
||||||
router.setChildren(buildMenus(cMenus));
|
router.setChildren(buildMenus(cMenus));
|
||||||
} else if (isMenuFrame(menu)) {
|
} else if (isMenuFrame(menu)) {
|
||||||
|
router.setMeta(null);
|
||||||
List<RouterVo> childrenList = new ArrayList<RouterVo>();
|
List<RouterVo> childrenList = new ArrayList<RouterVo>();
|
||||||
RouterVo children = new RouterVo();
|
RouterVo children = new RouterVo();
|
||||||
children.setPath(menu.getPath());
|
children.setPath(menu.getPath());
|
||||||
|
@ -11,6 +11,7 @@ import com.ruoyi.system.service.ISysOperLogService;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -29,6 +30,7 @@ public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOper
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void insertOperlog(SysOperLog operLog) {
|
public void insertOperlog(SysOperLog operLog) {
|
||||||
|
operLog.setOperTime(new Date());
|
||||||
save(operLog);
|
save(operLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,10 +56,10 @@ public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOper
|
|||||||
SysOperLog::getStatus,operLog.getStatus())
|
SysOperLog::getStatus,operLog.getStatus())
|
||||||
.like(StrUtil.isNotBlank(operLog.getOperName()),SysOperLog::getOperName,operLog.getOperName())
|
.like(StrUtil.isNotBlank(operLog.getOperName()),SysOperLog::getOperName,operLog.getOperName())
|
||||||
.apply(Validator.isNotEmpty(params.get("beginTime")),
|
.apply(Validator.isNotEmpty(params.get("beginTime")),
|
||||||
"date_format(login_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
"date_format(oper_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
||||||
params.get("beginTime"))
|
params.get("beginTime"))
|
||||||
.apply(Validator.isNotEmpty(params.get("endTime")),
|
.apply(Validator.isNotEmpty(params.get("endTime")),
|
||||||
"date_format(login_time,'%y%m%d') <= date_format({0},'%y%m%d'",
|
"date_format(oper_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
||||||
params.get("endTime"))
|
params.get("endTime"))
|
||||||
.orderByDesc(SysOperLog::getOperId));
|
.orderByDesc(SysOperLog::getOperId));
|
||||||
}
|
}
|
||||||
|
@ -198,11 +198,11 @@ mybatis-plus:
|
|||||||
# NOT_EMPTY 非空判断(只对字符串类型字段,其他类型字段依然为非NULL判断)
|
# NOT_EMPTY 非空判断(只对字符串类型字段,其他类型字段依然为非NULL判断)
|
||||||
# DEFAULT 默认的,一般只用于注解里
|
# DEFAULT 默认的,一般只用于注解里
|
||||||
# NEVER 不加入 SQL
|
# NEVER 不加入 SQL
|
||||||
insertStrategy: NOT_NULL
|
insertStrategy: NOT_EMPTY
|
||||||
# 字段验证策略之 update,在 update 的时候的字段验证策略
|
# 字段验证策略之 update,在 update 的时候的字段验证策略
|
||||||
updateStrategy: NOT_NULL
|
updateStrategy: NOT_EMPTY
|
||||||
# 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
|
# 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
|
||||||
selectStrategy: NOT_NULL
|
selectStrategy: NOT_EMPTY
|
||||||
|
|
||||||
# PageHelper分页插件
|
# PageHelper分页插件
|
||||||
pagehelper:
|
pagehelper:
|
||||||
|
Loading…
Reference in New Issue
Block a user