Files
2025-10-22 07:50:31 +08:00

28 lines
593 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 请勿修改此处代码,因为插件更新后此处代码会被覆盖。
* 作者VK
* 发布于2021-07-06
*/
const dbName = {
uniIdUsers: "uni-id-users", // 数据库表名 - uni-id用户表
};
const db = uniCloud.database();
const _ = db.command;
var dao = {};
/**
* 获取 - 商户支付配置
* let userInfo = await dao.uniIdUsers.findById(user_id);
*/
dao.findById = async (id) => {
let res = await db.collection(dbName.uniIdUsers).doc(id).get();
if (res.data && res.data.length > 0) {
return res.data[0];
} else {
return null;
}
};
module.exports = dao;