字段自增

优质
小牛编辑
135浏览
2023-12-01

字段自增

const flow = await this.ctx.model.Flow.findOne({ where: { art_id } });
await flow.increment('index', { by: 900 });

字段自减

const flow = await this.ctx.model.Flow.findOne({ where: { art_id } });
await flow.decrement('index', { by: 900 });