From 6179fbd6ded4f2fe8414c8b67fa84af935695763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Tue, 22 Oct 2024 11:26:50 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E5=9F=BA=E7=A1=80=E8=B5=84=E6=96=99=20?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86=E6=8F=92=E5=85=A5mapper?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=B5=8B=E5=80=BC=E8=AF=AD=E5=8F=A5=EF=BC=9B?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=96=B0=E5=A2=9Econtroller=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=BE=E7=BD=AE=E5=BD=93=E5=89=8D=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=B8=BA=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/system/SysRoleController.java | 2 ++ .../src/main/resources/mapper/system/SysRoleMapper.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java index 514ca1be..1d678422 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java @@ -7,6 +7,7 @@ import java.util.stream.Collectors; import com.alibaba.excel.EasyExcel; import com.ruoyi.common.core.domain.Ztree; import com.ruoyi.common.core.domain.entity.vo.ExportRoleMenuVo; +import com.ruoyi.common.utils.DateUtils; import com.ruoyi.system.domain.SysSalesShippingInform; import com.ruoyi.system.service.ISysMenuService; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -105,6 +106,7 @@ public class SysRoleController extends BaseController return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在"); } role.setCreateBy(ShiroUtils.getLoginName()); + role.setCreateTime(DateUtils.getNowDate()); AuthorizationUtils.clearAllCachedAuthorizationInfo(); return toAjax(roleService.insertRole(role)); diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index f1d18ad2..4629a159 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -122,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status, remark, create_by, - create_time + create_time )values( #{roleId}, #{roleName}, @@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate() + #{createTime}, )