Commit b6449fc2 authored by Fred's avatar Fred

公共字段更新

parent 881e04d3
......@@ -20,10 +20,10 @@ public class MyMetaObjectHandler extends MetaObjectHandler {
// 获取当前时间
Date date = DateUtil.date();
metaObject.setValue("createBy", ue.getId());
metaObject.setValue("modifyBy", ue.getId());
metaObject.setValue("createTime", date);
metaObject.setValue("modifyTime", date);
setFieldValByName("createBy", ue.getId(), metaObject);
setFieldValByName("createTime", date, metaObject);
setFieldValByName("modifyBy", ue.getId(), metaObject);
setFieldValByName("modifyTime", date, metaObject);
setFieldValByName("state", 1, metaObject);
}
......@@ -33,10 +33,8 @@ public class MyMetaObjectHandler extends MetaObjectHandler {
//获取当前登录用户
UserEntity ue = new UserEntity();
ue.setId(1L);
// 获取当前时间
Date date = DateUtil.date();
metaObject.setValue("modifyBy", ue.getId());
metaObject.setValue("modifyTime", date);
setFieldValByName("modifyBy", ue.getId(), metaObject);
setFieldValByName("modifyTime", DateUtil.date(), metaObject);
}
}
......@@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.govmade.common.utils.Assert;
import com.govmade.common.utils.Constant;
import com.govmade.common.utils.PageUtils;
import com.govmade.common.utils.R;
......@@ -23,6 +22,7 @@ import com.govmade.modules.basic.controller.AbstractController;
import com.govmade.modules.system.entity.UserEntity;
import com.govmade.modules.system.service.UserService;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil;
import io.swagger.annotations.ApiOperation;
......@@ -122,7 +122,6 @@ public class UserController extends AbstractController {
*/
@PutMapping("updatePassword")
public R password(String password, String newPassword) {
Assert.isBlank(newPassword, "新密码不为能空");
password = new Sha256Hash(password).toHex();
newPassword = new Sha256Hash(newPassword).toHex();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment