云开发云数据库定时操作(删除)

小程序 文章 2021-02-09 09:41 585 0 全屏看文

AI助手支持GPT4.0

云开发云数据库定时操作(删除)Cloud development cloud database timing operation (deleted)

云开发云数据库定时操作(删除)

https://developers.weixin.qq.com/miniprogram/dev/api/base/timer/setTimeout.html


各位前辈大家好,现在我做出一个拼车功能,出发时间是用picker选的,该如何使得时间到了选定时间时自动删除数据库该条信息。敢问各位前辈是否可以实现该功能。望各位前辈不吝赐教,晚辈在此感谢万分!

https://developers.weixin.qq.com/miniprogram/dev/api/base/timer/setTimeout.html Hello, everyone. Now I make a carpooling function. The departure time is selected by picker. How to automatically delete the information in the database when the time is up. Can you realize this function. I hope you can give me your advice. Thank you very much!

回答:

跨商通:

不删除。业务中基本不应该有单条删除功能,保留每一条历史是个好习惯。

刘栋:

查询的时候,查询语句里设个时间范围

-EOF-

AI助手支持GPT4.0