From 58c0566e7ac30e82fdd778cc977a21dc47682b31 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 10:06:37 +0800
Subject: [PATCH] =?UTF-8?q?[fix]=20=E5=9F=BA=E7=A1=80=E8=B5=84=E6=96=99=20?=
=?UTF-8?q?=E5=91=98=E5=B7=A5=E7=AE=A1=E7=90=86=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=91=98=E5=B7=A5=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=E5=91=98=E5=B7=A5=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/SysUserController.java | 2 ++
.../src/main/resources/mapper/system/SysUserMapper.xml | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
index ac77fd13..39dbeda1 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -9,6 +9,7 @@ import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -138,6 +139,7 @@ public class SysUserController extends BaseController
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
user.setCreateBy(ShiroUtils.getLoginName());
+ user.setCreateTime(DateUtils.getNowDate());
return toAjax(userService.insertUser(user));
}
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 6285e139..470a3630 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -213,7 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
pwd_update_date,
create_by,
remark,
- create_time
+ create_time
)values(
#{userId},
#{deptId},
@@ -230,7 +230,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{pwdUpdateDate},
#{createBy},
#{remark},
- sysdate()
+ #{createTime}
)