How to create an undo function in spring MVC based web app.?

I have an employee and a corresponding employee history table. Both the tables have same structure. History table is used to track the historical changes made to the employee over a period of time. Now, I need to add an undo function to the changes made to the employee. e.g. Employees title is changed on 1st August. Now, This will update the employees title in Employee table and insert an corresponding history record in employee_history table. Now, I need to undo this change. Employee edit page will have a list of changes made to employee datewise with an undo button beside it. Clicking on undo should revert changes in Employee table to previous value. Also I think the record in history table which says title is changed, should also be removed. Also when I revert tghe changes to employee table i.e. revert title to previous title, this will fire an insert to history table, which I dont want. I am not sure what is the best possible way to do this. Any suggestions will be helpful.

以上就是How to create an undo function in spring MVC based web app.?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏