public void insert(User user) { String userId = SessionUtils.getCurrentUserId(); if (StringUtils.isEmpty(userId)) { userId = user.getUserId(); } user.setPassword(MD5Utils.getMD5String(user.getPassword())); user.setDelflag("1"); Timestamp sysdate = new Timestamp(System.currentTimeMillis()); user.setCreateUser(userId); user.setCreateTime(sysdate); user.setUpdateUser(userId); user.setUpdateTime(sysdate); this.userDao.insert(user); }
public void update(User user) { Timestamp sysdate = new Timestamp(System.currentTimeMillis()); user.setUpdateUser(SessionUtils.getCurrentUserId()); user.setUpdateTime(sysdate); this.userDao.updateByPrimaryKey(user); }