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}, )