Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
327 views
in Technique[技术] by (71.8m points)

这个需求不用redis,用表锁可以解决并发问题吗

需求:

一个公司由于业务繁多,办理需要进行提前预约,每天分9:00、10:00、11:00、15:00、16:00、17:00六个时间段,可以进行预约。
每个时间段只能预约10人,即每天可预约60人。
每人只能预约一次。
预约成功需排序,如9:00时段第一人,为001,10:00时段第一人为011,17:00最后一个人为060。
预约只能预约明天和后天。

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

还是用redis解决吧,等一定时间,再把redis里面的数据批量写入数据库


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...