Commit 356a8b14 by chenjinjing

no message

parent 2edd20c6
......@@ -101,6 +101,10 @@ export async function paidList({name, memberType, documentId, phone, mail, joinS
isSelectUser = true;
itemParam.session = session;
}
if (phone) {
isSelectUser = true;
itemParam.phone = phone;
}
if (isSelectUser) {
let checkUserIdDataList = await find(TABLEENUM.用户表, itemParam, ["userId"]);
checkUserIdDataList.forEach(key => {
......@@ -110,8 +114,6 @@ export async function paidList({name, memberType, documentId, phone, mail, joinS
if (checkUserIdList.length) {
findParam.userId = {"$in":checkUserIdList}
}
if (phone) findParam.phone = phone;
// if (costType) findParam.isFirst = costType == COSTTYPE.首次;
......
......@@ -794,4 +794,9 @@ export async function infomationChangeInfo({userId}) {
dataInfo.unitInfo = unitInfo;
dataInfo.isUpdate = isUpdate;
return {dataInfo};
}
\ No newline at end of file
}
......@@ -490,12 +490,10 @@ export async function addActivity({userId, form}) {
});
//发送邮件
await systemSendMail(userInfo.userId, MAILTYPE.会员活动or会议通知 );
await systemSendMail(userInfo[i].userId, MAILTYPE.会员活动or会议通知 );
}
await addManyData(TABLEENUM.活动通知已读状态表, addReadInfo);
return successResult();
}
......@@ -507,7 +505,7 @@ export async function addActivity({userId, form}) {
export async function updateActivityRead({arId}) {
let activityReadInfo = await findOnce(TABLEENUM.活动通知已读状态表, {arId}, ["arId", "isRead"]);
if (!activityReadInfo || !activityReadInfo.arId) throw new BizError(ERRORENUM.目标数据不存在);
if (activityReadInfo.isRead == STATE.) return;
if (activityReadInfo.isRead == STATE.) return successResult();
await updateOneData(TABLEENUM.活动通知已读状态表, {arId}, {readTime:new Date().valueOf(), isRead: STATE.});
......@@ -805,11 +803,11 @@ export async function homeActivityList({userId, activityState, pageNumber}) {
let memberLevel = "";
if (userInfo.memberType) {
memberType = changeEnumValue(MEMBERTYPE, userInfo.memberType);
selectParam["$or"].push({ lableId:{"$in":memberType} });
selectParam["$or"].push({ lableId:{"$in":[memberType]} });
}
if (userInfo.memberLevel) {
memberLevel = changeEnumValue(MEMBERLEVEL, userInfo.memberLevel);
selectParam["$or"].push({ lableId:{"$in":memberLevel} });
selectParam["$or"].push({ lableId:{"$in":[memberLevel]} });
}
if (activityState == ACTIVITYSTATE.已结束) selectParam.activityState = activityState;
......
......@@ -569,6 +569,7 @@ export async function dangJianZiYuanMuLu({}) {
return {dataList};
}
/**
* 通知公告
* @param param0
......@@ -608,6 +609,49 @@ export async function tongZhiGongGao({type, pageNumber}) {
}
/**
* 通知公告
* @param param0
* @returns
*/
export async function getWenZhang({type, pageNumber}) {
eccEnumValue("通知公告", "类型", TONGZHIGONGGAO, type);
// let tableName;
// switch (type) {
// case TONGZHIGONGGAO.会议通知: tableName = TABLEENUM.会议通知; break;
// case TONGZHIGONGGAO.活动通知: tableName = TABLEENUM.活动通知; break;
// case TONGZHIGONGGAO.项目公告: tableName = TABLEENUM.项目公告; break;
// }
// let dbList = await findToPage(tableName, {push:STATE.是}, ["id", "name", "st", "addrest", "members", "desc"], pageNumber);
// let dataCount = await findCount(tableName, {push:STATE.是});
// let dataList = [];
// dbList.forEach(info => {
// let item:any = extractData(info, ["id", "name", "addrest"]);
// item.time = moment(info.st).format("YYYY-MM-DD");
// item.desc = info.desc || "";
// item.members = changeEnumValue(CODPARTICIPANT, info.members);
// dataList.push(item);
// });
let findParam = {articleType:{"$in":[type]}, display:STATE.};
let dataBaseList = await findToSortToPage(TABLEENUM.文章管理, findParam, ["id", "title", "desc", "imgUrl", "articleTime" ], {articleTime:-1}, pageNumber);
let dataCount = await findCount(TABLEENUM.文章管理, findParam);
let dataList = [];
dataBaseList.forEach(info => {
let { id, title, desc, imgUrl, articleTime } = info;
dataList.push({
id, title, desc, imgUrl, articleTime:moment(articleTime).format("YYYY-MM-DD")
});
});
return { dataList, dataCount};
}
export async function tongZhiGongGaoInfo({id, type}) {
eccEnumValue("通知公告", "类型", TONGZHIGONGGAO, type);
// let tableName;
......
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