20261008
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
'use strict';
|
||||
const dbName = 'jjx-spot-goods'
|
||||
module.exports = {
|
||||
/**
|
||||
* XXXnameXXX
|
||||
* @url client/spot/goods/kh/getSelfOne 前端调用的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, pageIndex, pageSize} = data;
|
||||
let res = {code: 0, msg: ""};
|
||||
// 业务逻辑开始-----------------------------------------------------------
|
||||
res = await vk.baseDao.selects({
|
||||
dbName,
|
||||
whereJson: {
|
||||
userId: uid,
|
||||
},
|
||||
pageIndex,
|
||||
pageSize,
|
||||
sortArr: [{name: "_add_time", type: "desc"}],
|
||||
foreignDB: [
|
||||
{
|
||||
dbName: "jjx-goods-cooperate",
|
||||
localKey: "_id",
|
||||
foreignKey: "goodsId",
|
||||
as: "cooperateList",
|
||||
limit: 500, // limit=1则以对象形式返回
|
||||
foreignDB: [{
|
||||
dbName: "uni-id-users",
|
||||
localKey: "userId",
|
||||
foreignKey: "_id",
|
||||
as: "user",
|
||||
limit: 1, // limit=1则以对象形式返回
|
||||
fieldJson: {
|
||||
_id: true,
|
||||
company: {
|
||||
companyName: true
|
||||
},
|
||||
person: {
|
||||
personName: true
|
||||
},
|
||||
businessCard: true,
|
||||
accountType: true,
|
||||
},
|
||||
},
|
||||
]
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
// 业务逻辑结束-----------------------------------------------------------
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user