签章流程

This commit is contained in:
2023-11-17 13:50:18 +08:00
parent 1358e52fdb
commit 715859c63f
72 changed files with 8660 additions and 339 deletions
@@ -0,0 +1,53 @@
'use strict';
module.exports = {
/**
* 获取企业详情
* @url client/user/pub/getDetail 前端调用的url参数地址
* data 请求参数
* @param {String} params1 参数1
*/
main: async (event) => {
let { data = {}, userInfo, util, filterResponse, originalParam } = event;
let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
let { uid, _id } = data;
let res = { code: 0, msg: "" };
// 业务逻辑开始-----------------------------------------------------------
const dbName = "uni-id-users"
res.data = await vk.baseDao.selects({
dbName,
getOne: true,
getMain: true,
whereJson: {
_id
},
foreignDB: [
{
dbName: 'jjx-spot-goods',
localKey:"_id",
foreignKey:"userId",
as:"goodsList",
},
{
dbName: 'jjx-enquiry-sheet',
localKey:"_id",
foreignKey:"userId",
as:"goodsList",
},
// {
// dbName: 'jjx-enquiry-sheet',
// localKey:"_id",
// foreignKey:"userId",
// as:"goodsList",
// }
]
})
// 业务逻辑结束-----------------------------------------------------------
return res;
}
}
@@ -0,0 +1,50 @@
'use strict';
module.exports = {
/**
* 获取商家列表
* @url client/user/pub/getList 前端调用的url参数地址
* data 请求参数
* @param {String} params1 参数1
*/
main: async (event) => {
let { data = {}, userInfo, util, filterResponse, originalParam } = event;
let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
let { uid } = data;
let res = { code: 0, msg: '' };
// 业务逻辑开始-----------------------------------------------------------
let { dcloud_appid, appids } = data.formData || {};
let whereJson = {
accountType: _.in([1, 2]),
fadadaConfirm: true
};
if (dcloud_appid) {
if (dcloud_appid === "___empty-array___") {
whereJson["dcloud_appid"] = [];
} else if (dcloud_appid === "___error___") {
whereJson["dcloud_appid"] = _.and(_.exists(true), _.nin(appids));
} else if (dcloud_appid === "___non-existent___") {
whereJson["dcloud_appid"] = _.exists(false);
} else {
whereJson["dcloud_appid"] = _.or(_.eq(dcloud_appid), _.exists(false));
}
}
let dbName = "uni-id-users";
res = await vk.baseDao.getTableData({
dbName,
data,
whereJson,
sortArr: [{ "name": "register_date", "type": "desc" }],
// 副表列表
foreignDB: [{
dbName: "opendb-app-list",
localKey: "dcloud_appid",
foreignKey: "appid",
localKeyType: "array",
as: "appList",
limit: 500
}],
});
// 业务逻辑结束-----------------------------------------------------------
return res;
}
}