Commit 22cf1b0a by chenjinjing

单位会员逻辑

parent 2b017bb0
...@@ -45,11 +45,24 @@ export async function unitMemberList({unitName, joinTime, unitMemberType, workDu ...@@ -45,11 +45,24 @@ export async function unitMemberList({unitName, joinTime, unitMemberType, workDu
* 单位会员详情 * 单位会员详情
* @param param0 * @param param0
*/ */
const BasicConfig = ["userId", "unitName", "addres", "officialWebsite", "uscc", "legalPerson", "legalPersonPhone", "gongZhongHao",
"unitPhone", "contactPerson", "contactPersonDuties", "sheng", "shi", "qu", "uusinessLicenseUrl", "personInChargeDesc"];
const UnitConfig = ["unitInfoType", "yuanXiaoBanXueLeiXing", "yuanXiaoZhuGuanBuMen", "yuanXiaoFuZeRen", "yuanXiaoFuZeRenZhiWu",
"yuanXiaoFuZeRenDianHua", "yuanXiaoBanGongFuZeRen", "yuanXiaoBanGongFuZeRenZhiWu", "yuanXiaoBanGongFuZeRenDianHua", "yuanXiaoKeYanFuZeRen",
"yuanXiaoKeYanFuZeRenZhiWu", "yuanXiaoKeYanFuZeRenDianHua", "yuanXiaoXueShengZongRenShu", "yuanXiaoJiaoZhiGongZongRenShu", "yuanXiaoJianZhuMianJi",
"yuanXiaoGaoJiZhiCheng", "yuanXiaoKaiSheZhuanYe"];
export async function unitMemberDetails({userId}) { export async function unitMemberDetails({userId}) {
let oldInfo = await findOnce(TABLEENUM.用户表, {userId}); let oldInfo = await findOnce(TABLEENUM.用户表, {userId});
if (!oldInfo || !oldInfo.userId) throw new BizError(ERRORENUM.目标数据不存在); if (!oldInfo || !oldInfo.userId) throw new BizError(ERRORENUM.目标数据不存在);
let dataInfo = extractData(oldInfo, []); let basicInfo = extractData(oldInfo, BasicConfig);
return {dataInfo}; let unitInfo = extractData(oldInfo, UnitConfig);
let oldKeYanInfo = await findOnce(TABLEENUM.单位所获得科研成果表, {userId});
let scientificResearch = extractData(oldKeYanInfo, ["startTime", "endTime", "describe"]);
return {basicInfo, unitInfo, scientificResearch};
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment