fix: AI客服+合同审查回复格式化;review.js修复;积分充值流程完善
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
//查询积分流水
|
||||
module.exports = {
|
||||
main: async (event) => {
|
||||
let { data = {}, userInfo, util } = event;
|
||||
let { db, _ } = util;
|
||||
const { pageIndex = 1, pageSize = 20, type } = data;
|
||||
|
||||
const where = { user_id: userInfo.uid };
|
||||
if (type) where.type = type; // 可选筛选 earn/spend
|
||||
|
||||
const countRes = await db.collection('jjx-points-log').where(where).count();
|
||||
|
||||
const listRes = await db.collection('jjx-points-log')
|
||||
.where(where)
|
||||
.orderBy('_add_time', 'desc')
|
||||
.skip((pageIndex - 1) * pageSize)
|
||||
.limit(pageSize)
|
||||
.get();
|
||||
|
||||
return {
|
||||
code: 0,
|
||||
msg: 'ok',
|
||||
data: {
|
||||
total: countRes.total,
|
||||
rows: listRes.data
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user