Commit 771007bd by lixinming

no message

parent 37170273
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"mysql": "^2.18.1", "mysql": "^2.18.1",
"mysql2": "^3.7.0", "mysql2": "^3.7.0",
"node-xlsx": "^0.16.1", "node-xlsx": "^0.16.1",
"nodemailer": "^6.1.1", "nodemailer": "^6.9.16",
"officegen": "^0.6.5", "officegen": "^0.6.5",
"qs": "^6.11.0", "qs": "^6.11.0",
"request": "^2.88.0", "request": "^2.88.0",
......
import { MEMBERTYPE, MAILTYPE } from "../config/enum";
import { ERRORENUM } from "../config/errorEnum";
import { TABLEENUM } from "../data/models/model";
import { findOnce } from "../data/select";
import { successErrorResult, successResult } from "../tools/system";
import { BizError } from "../util/bizError";
const nodemailer = require('nodemailer');
// 创建发送邮件的传输对象
let transporter = nodemailer.createTransport({
host: 'smtp.163.com', // SMTP 服务器地址
port: 465, // SMTP 服务器端口(通常是 465 或 587)
secure: true, // 使用 SSL
auth: {
user: 'cefa_office@163.com', // 你的邮箱地址
pass: 'EJRazhkkXK65gnLe' // 你的邮箱密码或应用专用密码
}
});
async function send(toMail, name, type) {
let {title, mailStr} = getModel(name, type);
// 设置邮件选项
let mailOptions = {
from: '学会办公室 <cefa_office@163.com>', // 发送者地址
to: toMail,
subject: `关于CEFA会员系统的${title}通知`, // 邮件主题
// text: 'Hello world?', // 邮件正文(纯文本)
html: mailStr // 邮件正文(HTML 格式)
};
// new promises
return new Promise((resolve, reject) => {
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
throw new BizError(ERRORENUM.短信发送失败);
}
resolve(info);
});
});
}
function getModel(name, type) {
let str = "";
let title = "";
switch (type) {
case MAILTYPE.审核期间驳回通知:
str = "您提交的会员注册信息已驳回,为避免您错过会议审核时间,请尽快登陆会员网站查看详情重新确认提交。";
title = "审核驳回";
break;
case MAILTYPE.审核通过以及缴费通知:
str = "您的入会申请已审核通过,请登陆会员网站进行缴费处理。";
title = "审核通过";
break;
case MAILTYPE.会员缴费财务驳回无需退款:
str = "您提交的会费单据未通过审核,请登陆会员网站查看详情重新确认提交。";
title = "缴费驳回";
break;
case MAILTYPE.会员缴费财务驳回需退款:
str = "您提交的会费单据未通过审核,需提供退款账户,请登陆会员网站查看详情重新确认提交。";
title = "缴费驳回";
break;
case MAILTYPE.会员缴费成功后针对线下汇款财务审核通过的时候发送:
str = "您的年度会费已支付成功,恭喜您成为我会会员!请登陆会员网站查看相关服务详情。";
title = "缴费成功";
break;
case MAILTYPE.会员会费到期缴费通知:
str = "您的会员服务已过期限,为避免您的服务受到影响,请及时登录会员网站进行缴费处理。";
title = "会费到期";
break;
case MAILTYPE.会员催缴通知提前开发票:
str = "您的发票已开具,为避免您的服务受到影响,请您在14个工作日内登录会员网站完成缴费流程。";
title = "发票开具成功";
break;
case MAILTYPE.会员进入宽限期:
str = "您的会员服务已进入宽限期,为避免您的服务受到影响,请于30日内登录会员网站进行缴费处理。";
title = "会员进入宽限期";
break;
case MAILTYPE.会员宽限期最后一天:
str = "您的会员服务已到期,为避免您的服务受到影响,请及时登录会员网站进行缴费处理。";
title = "服务到期";
break;
case MAILTYPE.变更驳回:
str = "您提交的变更申请未通过审核,请登陆会员网站查看详情重新确认提交。";
title = "变更驳回";
break;
case MAILTYPE.变更已通过:
str = "您提交的变更申请已审核通过,请登陆会员网站查看相关服务详情。 ";
title = "变更通过";
break;
case MAILTYPE.会员活动or会议通知:
str = "学会邀请您关注《关于xxxxxx的通知》,请登陆会员网站查看活动须知以及参与报名。";
title = "活动";
break;
case MAILTYPE.财务退款通知:
str = "您的会费退款已处理,请登陆会员网站重新缴纳会费。";
title = "退款处理";
break;
}
let mailStr = ""
mailStr +=`<p>尊敬的${name}:</p>`;
mailStr +=`<p>您好!</p>`;
mailStr +=`<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${str}</p>`;
mailStr +=`<p>电话咨询: 010-86208681</p>`;
mailStr +=`<p>登录地址: <a href="https://www.cefaweb.com/member">https://www.cefaweb.com/member</a></p>`;
mailStr +=`<p>如有问题,欢迎您与秘书处进行联系。</p>`;
mailStr +=`<p>感谢您对学会工作的支持。祝好!</p>`;
mailStr +=`<p>--</p>`;
mailStr += `<p>中国艺术职业教育学会 办公室<p>`;
mailStr += `<p>地址:北京市南竹杆胡同2号<p>`;
mailStr += `<p>电话:010-86208681<p>`;
mailStr += `<p>电邮:cefa office@163.com<p>`;
return {mailStr, title};
}
export async function sendMail({id, type}) {
let userInfo = await findOnce(TABLEENUM.用户表, {userId:id}, ["userId", "name", "unitName", "memberType", "mail"]);
if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.用户不存在);
if (!userInfo.mail) {
throw new BizError(ERRORENUM.该用户邮箱为空);
}
let nameStr = userInfo.memberType == MEMBERTYPE.个人会员 ? userInfo.name : userInfo.unitName;
let result = await send(userInfo.mail, nameStr, type);
return successResult();
}
\ No newline at end of file
...@@ -135,7 +135,7 @@ export async function testCallback(weChartPR) { ...@@ -135,7 +135,7 @@ export async function testCallback(weChartPR) {
weChartState:WEICHARTPAYSTATE.已支付, weChartState:WEICHARTPAYSTATE.已支付,
confirmReceipt:RECEIPTCONFIRMATION.收款确认, confirmReceipt:RECEIPTCONFIRMATION.收款确认,
confirmReceiptMs:new Date().valueOf(), confirmReceiptMs:new Date().valueOf(),
invoiceStatus:INVOICESTATUS.未开发票 invoiceStatus:INVOICESTATUS.未开发票,
}; };
if (userInfo.memberType == MEMBERTYPE.单位会员) { if (userInfo.memberType == MEMBERTYPE.单位会员) {
updateInfo.invoiceStatus = INVOICESTATUS.不具备开票条件; updateInfo.invoiceStatus = INVOICESTATUS.不具备开票条件;
...@@ -200,6 +200,7 @@ export async function payCallback(body) { ...@@ -200,6 +200,7 @@ export async function payCallback(body) {
confirmReceiptMs:new Date().valueOf(), confirmReceiptMs:new Date().valueOf(),
invoiceStatus:INVOICESTATUS.未开发票 invoiceStatus:INVOICESTATUS.未开发票
}; };
if (oldInfo.memberCategory == MEMBERTYPE.个人会员 ) updateInfo.invoiceTime = new Date().valueOf();
await updateOneData(TABLEENUM.订单表, {weChartPR:wechartCallbackData.out_trade_no}, updateInfo); await updateOneData(TABLEENUM.订单表, {weChartPR:wechartCallbackData.out_trade_no}, updateInfo);
......
...@@ -111,6 +111,10 @@ export async function pendingReviewList({name, memberType, documentId, phone, ma ...@@ -111,6 +111,10 @@ export async function pendingReviewList({name, memberType, documentId, phone, ma
/**处理枚举值 */ /**处理枚举值 */
if (!item.userRegisterState) item.userRegisterState = USERREGISTERSTATE.待审核; if (!item.userRegisterState) item.userRegisterState = USERREGISTERSTATE.待审核;
else item.userRegisterState = changeEnumValue(USERREGISTERSTATE, item.userRegisterState); else item.userRegisterState = changeEnumValue(USERREGISTERSTATE, item.userRegisterState);
if (item.userRegisterState == "驳回修改") item.userRegisterState = "已驳回";
if (item.userRegisterState == "重新提交") item.userRegisterState = "驳回提交";
item.memberLevel = changeEnumValue(MEMBERLEVEL, item.memberLevel); item.memberLevel = changeEnumValue(MEMBERLEVEL, item.memberLevel);
item.sheng = getCityNameByCode(item.sheng); item.sheng = getCityNameByCode(item.sheng);
item.shi = getCityNameByCode(item.shi); item.shi = getCityNameByCode(item.shi);
...@@ -126,7 +130,7 @@ export async function pendingReviewList({name, memberType, documentId, phone, ma ...@@ -126,7 +130,7 @@ export async function pendingReviewList({name, memberType, documentId, phone, ma
if (info.memberType == MEMBERTYPE.个人会员) { if (info.memberType == MEMBERTYPE.个人会员) {
item.memberType = "个人会员"; item.memberType = "个人会员";
} }
item.day = moment().diff(item.askForTime, 'days') + "天";
dataList.push(item); dataList.push(item);
}); });
...@@ -142,14 +146,14 @@ export async function submitDocument({loginId, phone, mail, pageNumber, pageSize ...@@ -142,14 +146,14 @@ export async function submitDocument({loginId, phone, mail, pageNumber, pageSize
/**查询条件 */ /**查询条件 */
let selectParam:any = { let selectParam:any = {
isAdmin:STATE., isAdmin:STATE.,
logonState:LOGONSTATE.完成第一步未提交, // logonState:LOGONSTATE.完成第一步未提交,
registerFlow:REGISTERFLOW.完成第一步 registerFlow:REGISTERFLOW.完成第一步
}; };
if (loginId) selectParam.loginId = {"$regex":loginId}; if (loginId) selectParam.loginId = {"$regex":loginId};
if (phone) selectParam.phone = phone; if (phone) selectParam.phone = phone;
if (mail) selectParam.mail = mail; if (mail) selectParam.mail = mail;
const SelectFiles = ["userId", "loginId", "memberType", "phone", "mail", "logonState"]; const SelectFiles = ["userId", "loginId", "memberType", "phone", "mail", "logonState", "askForTime", "firstStep"];
let dbList = await findToSortToPage(TABLEENUM.用户表, selectParam, SelectFiles, {askForTime:-1}, pageNumber, pageSize); let dbList = await findToSortToPage(TABLEENUM.用户表, selectParam, SelectFiles, {askForTime:-1}, pageNumber, pageSize);
let dataCount = await findCount(TABLEENUM.用户表, selectParam); let dataCount = await findCount(TABLEENUM.用户表, selectParam);
...@@ -160,6 +164,10 @@ export async function submitDocument({loginId, phone, mail, pageNumber, pageSize ...@@ -160,6 +164,10 @@ export async function submitDocument({loginId, phone, mail, pageNumber, pageSize
if (item.logonState) changeEnumValue(LOGONSTATE, item.logonState); if (item.logonState) changeEnumValue(LOGONSTATE, item.logonState);
item.memberType = changeEnumValue(MEMBERTYPE, info.memberType); item.memberType = changeEnumValue(MEMBERTYPE, info.memberType);
item.askForTime = item.askForTime || item.firstStep;
item.day = moment().diff(item.askForTime, 'days') + "天";
dataList.push(item); dataList.push(item);
}); });
...@@ -167,26 +175,39 @@ export async function submitDocument({loginId, phone, mail, pageNumber, pageSize ...@@ -167,26 +175,39 @@ export async function submitDocument({loginId, phone, mail, pageNumber, pageSize
} }
// /**
// * 入会审批-提交资料-驳回
// */
// export async function rejectJoin({id}) {
// let userInfo = await findOnce(TABLEENUM.用户表, {userId:id, isAdmin:STATE.否}, ["userId", "registerFlow", "loginId","userRegisterState", "memberType", "unitName", "name", "phone", "sheng"]);
// if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.目标数据不存在);
// /**驳回修改 */
// let updateParam = {
// logonState:LOGONSTATE.已驳回,
// registerFlow:REGISTERFLOW.完成第一步,
// firstStep:new Date().valueOf(),
// saveUnsubmitted:STATE.否
// }
// await updateOneData(TABLEENUM.用户表, {userId:id}, updateParam);
// return successResult();
// }
/** /**
* 入会审批-提交资料-驳回 * 入会审批-提交资料-删除
* @param param0
*/ */
export async function rejectJoin({id}) { export async function delRejectJoin({id}) {
let userInfo = await findOnce(TABLEENUM.用户表, {userId:id, isAdmin:STATE.}, ["userId", "registerFlow", "loginId","userRegisterState", "memberType", "unitName", "name", "phone", "sheng"]); let userInfo = await findOnce(TABLEENUM.用户表, {userId:id, isAdmin:STATE.}, ["userId", "registerFlow", "loginId","userRegisterState", "memberType", "unitName", "name", "phone", "sheng"]);
if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.目标数据不存在); if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.目标数据不存在);
/**驳回修改 */ await deleteOneData(TABLEENUM.用户表, {userId:id});
let updateParam = {
logonState:LOGONSTATE.已驳回,
registerFlow:REGISTERFLOW.完成第一步,
firstStep:new Date().valueOf(),
saveUnsubmitted:STATE.
}
await updateOneData(TABLEENUM.用户表, {userId:id}, updateParam);
return successResult(); return successResult();
} }
/** /**
* 入会审批-驳回列表 * 入会审批-驳回列表
*/ */
...@@ -195,14 +216,13 @@ export async function rejectList({loginId, phone, mail, pageNumber, pageSize}) { ...@@ -195,14 +216,13 @@ export async function rejectList({loginId, phone, mail, pageNumber, pageSize}) {
/**查询条件 */ /**查询条件 */
let selectParam:any = { let selectParam:any = {
isAdmin:STATE., isAdmin:STATE.,
"$or":[{logonState:LOGONSTATE.已驳回}, {logonState:LOGONSTATE.驳回提交}], userRegisterState : USERREGISTERSTATE.驳回修改
registerFlow:REGISTERFLOW.完成第一步
}; };
if (loginId) selectParam.loginId = {"$regex":loginId}; if (loginId) selectParam.loginId = {"$regex":loginId};
if (phone) selectParam.phone = phone; if (phone) selectParam.phone = phone;
if (mail) selectParam.mail = mail; if (mail) selectParam.mail = mail;
const SelectFiles = ["userId", "loginId", "memberType", "phone", "mail", "logonState"]; const SelectFiles = ["userId", "loginId", "memberType", "phone", "mail", "logonState", "name", "unitName", "sheng", "shi", "askForTime"];
let dbList = await findToSortToPage(TABLEENUM.用户表, selectParam, SelectFiles, {askForTime:-1}, pageNumber, pageSize); let dbList = await findToSortToPage(TABLEENUM.用户表, selectParam, SelectFiles, {askForTime:-1}, pageNumber, pageSize);
let dataCount = await findCount(TABLEENUM.用户表, selectParam); let dataCount = await findCount(TABLEENUM.用户表, selectParam);
...@@ -212,7 +232,8 @@ export async function rejectList({loginId, phone, mail, pageNumber, pageSize}) { ...@@ -212,7 +232,8 @@ export async function rejectList({loginId, phone, mail, pageNumber, pageSize}) {
/**处理枚举值 */ /**处理枚举值 */
if (item.logonState) changeEnumValue(LOGONSTATE, item.logonState); if (item.logonState) changeEnumValue(LOGONSTATE, item.logonState);
item.memberType = changeEnumValue(MEMBERTYPE, info.memberType); item.memberType = changeEnumValue(MEMBERTYPE, info.memberType);
item.sheng = getCityNameByCode(item.sheng);
item.shi = getCityNameByCode(item.shi);
dataList.push(item); dataList.push(item);
}); });
......
...@@ -33,11 +33,15 @@ import { successResult } from "../../../tools/system"; ...@@ -33,11 +33,15 @@ import { successResult } from "../../../tools/system";
* @param weChartPR 微信订单号 * @param weChartPR 微信订单号
* @param pageNumber 当前页 * @param pageNumber 当前页
*/ */
export async function billStateList({name, memberType, documentId, phone, mail, joinStartTime, pageSize, joinEndTime, memberLevel, payState,paymentType, invoiceState, weChartPR, pageNumber}) { export async function billStateList({name, memberType, documentId, invoiceApplyMs, phone, mail, joinStartTime, pageSize, joinEndTime, memberLevel, payState,paymentType, invoiceState, weChartPR, pageNumber}) {
let testMs = new Date().valueOf(); let testMs = new Date().valueOf();
if (payState != 1 && payState != 2 && payState != 3) throw new BizError(ERRORENUM.参数错误); if (payState != 1 && payState != 2 && payState != 3) throw new BizError(ERRORENUM.参数错误);
let findParam:any = {invoiceStatus:{"$ne":INVOICESTATUS.已开发票}}; let findParam:any = {invoiceStatus:{"$ne":INVOICESTATUS.已开发票}};
if (invoiceApplyMs) {
findParam.invoiceTime = {"$gt":invoiceApplyMs, "$lt":invoiceApplyMs}
}
if (payState == 1) {//已支付 if (payState == 1) {//已支付
findParam.state = ORDERSTATE.已支付; findParam.state = ORDERSTATE.已支付;
if (invoiceState == 1) {//已申请 if (invoiceState == 1) {//已申请
...@@ -199,7 +203,7 @@ export async function confirmReceiptHistory({id}) { ...@@ -199,7 +203,7 @@ export async function confirmReceiptHistory({id}) {
/** /**
* 上传发票 success * 上传发票 success 发票审核通过
* @param param0 * @param param0
*/ */
export async function upInvoice({id, invoiceUrl}) { export async function upInvoice({id, invoiceUrl}) {
...@@ -211,6 +215,8 @@ export async function upInvoice({id, invoiceUrl}) { ...@@ -211,6 +215,8 @@ export async function upInvoice({id, invoiceUrl}) {
let updateInfo = { let updateInfo = {
invoiceStatus : INVOICESTATUS.已开发票, invoiceStatus : INVOICESTATUS.已开发票,
// invoiceAdd:invoiceUrl // invoiceAdd:invoiceUrl
invoiceExamineTime:new Date().valueOf()
}; };
await updateOneData(TABLEENUM.订单表, {id}, updateInfo); await updateOneData(TABLEENUM.订单表, {id}, updateInfo);
...@@ -413,7 +419,7 @@ export async function billStateBatchAdopt({idList}) { ...@@ -413,7 +419,7 @@ export async function billStateBatchAdopt({idList}) {
* @param isPay 是否支付 * @param isPay 是否支付
* @param pageNumber 当前页 * @param pageNumber 当前页
*/ */
export async function invoicedList({name, memberType, documentId, phone, mail, joinStartTime, joinEndTime, memberLevel, paymentType, isPay, weChartPR, pageNumber}) { export async function invoicedList({name, memberType, documentId, invoiceExamineTime, phone, mail, joinStartTime, joinEndTime, memberLevel, paymentType, isPay, weChartPR, pageNumber}) {
eccEnumValue("发票列表", "支付类型", PAYMENTTYPE, paymentType); eccEnumValue("发票列表", "支付类型", PAYMENTTYPE, paymentType);
eccEnumValue("发票列表", "是否支付", ISPAYENUM, isPay ); eccEnumValue("发票列表", "是否支付", ISPAYENUM, isPay );
...@@ -421,6 +427,10 @@ export async function invoicedList({name, memberType, documentId, phone, mail, j ...@@ -421,6 +427,10 @@ export async function invoicedList({name, memberType, documentId, phone, mail, j
invoiceStatus:INVOICESTATUS.已开发票 invoiceStatus:INVOICESTATUS.已开发票
}; };
if (invoiceExamineTime) {
findParam.invoiceExamineTime = {"$gt":invoiceExamineTime, "$lt":invoiceExamineTime};
}
/**用户表查询条件 */ /**用户表查询条件 */
let checkUserIdList = [] let checkUserIdList = []
let itemParam:any = {}; let itemParam:any = {};
......
...@@ -317,6 +317,7 @@ export async function applicationInadvanceInvoice({id, mail, desc}) { ...@@ -317,6 +317,7 @@ export async function applicationInadvanceInvoice({id, mail, desc}) {
invoiceStatus:INVOICESTATUS.未开发票, invoiceStatus:INVOICESTATUS.未开发票,
advanceInvoice : true, advanceInvoice : true,
isSueInvoicesInAdvance:true, isSueInvoicesInAdvance:true,
invoiceTime:new Date().valueOf()
}; };
await updateOneData(TABLEENUM.订单表, {id}, updateInfo); await updateOneData(TABLEENUM.订单表, {id}, updateInfo);
...@@ -356,7 +357,7 @@ export async function reapplyInvoice({id}) { ...@@ -356,7 +357,7 @@ export async function reapplyInvoice({id}) {
if (!orderInfo || !orderInfo.id) throw new BizError(ERRORENUM.目标数据不存在); if (!orderInfo || !orderInfo.id) throw new BizError(ERRORENUM.目标数据不存在);
if (orderInfo.invoiceStatus != INVOICESTATUS.退回) throw new BizError(ERRORENUM.不满足重新请求条件); if (orderInfo.invoiceStatus != INVOICESTATUS.退回) throw new BizError(ERRORENUM.不满足重新请求条件);
let updateInfo:any = {invoiceStatus:INVOICESTATUS.未开发票}; let updateInfo:any = {invoiceStatus:INVOICESTATUS.未开发票, invoiceTime:new Date().valueOf()};
if (orderInfo.state != ORDERSTATE.已支付) updateInfo.advanceInvoice = true; if (orderInfo.state != ORDERSTATE.已支付) updateInfo.advanceInvoice = true;
await updateOneData(TABLEENUM.订单表, {id}, updateInfo); await updateOneData(TABLEENUM.订单表, {id}, updateInfo);
...@@ -420,7 +421,8 @@ export async function getInvoiceStatus({id}) { ...@@ -420,7 +421,8 @@ export async function getInvoiceStatus({id}) {
invoiceMail, invoiceMail,
desc, desc,
invoiceStatus:INVOICESTATUS.未开发票, invoiceStatus:INVOICESTATUS.未开发票,
advanceInvoice:true advanceInvoice:true,
invoiceTime:new Date().valueOf()
}; };
await updateOneData(TABLEENUM.订单表, {id}, updateInfo); await updateOneData(TABLEENUM.订单表, {id}, updateInfo);
......
...@@ -85,7 +85,8 @@ export async function memberRegister1({form}) { ...@@ -85,7 +85,8 @@ export async function memberRegister1({form}) {
isBlackUser:STATE., isBlackUser:STATE.,
saveUnsubmitted:STATE., saveUnsubmitted:STATE.,
firstStep:NowMs, firstStep:NowMs,
logonState:LOGONSTATE.完成第一步未提交 logonState:LOGONSTATE.完成第一步未提交,
askForTime:NowMs, //申请时间
}; };
await addOneData(TABLEENUM.用户表, addInfo); await addOneData(TABLEENUM.用户表, addInfo);
......
...@@ -824,10 +824,24 @@ export enum INFOCHANGEAPPLYTYPE { ...@@ -824,10 +824,24 @@ export enum INFOCHANGEAPPLYTYPE {
/**
* 邮件类型
*/
export enum MAILTYPE {
审核期间驳回通知 = 1,
审核通过以及缴费通知,
会员缴费财务驳回无需退款,
会员缴费财务驳回需退款,
会员缴费成功后针对线下汇款财务审核通过的时候发送,
会员会费到期缴费通知,
会员催缴通知提前开发票,
会员进入宽限期,
会员宽限期最后一天,
变更驳回,
变更已通过,
会员活动or会议通知,
财务退款通知
}
...@@ -77,7 +77,10 @@ export enum ERRORENUM { ...@@ -77,7 +77,10 @@ export enum ERRORENUM {
非单位会员不可操作, 非单位会员不可操作,
不存在审批历史, 不存在审批历史,
发票已发送至邮请注意查看, 发票已发送至邮请注意查看,
请先付款后进行发票操作 请先付款后进行发票操作,
短信发送失败,
用户不存在,
该用户邮箱为空
} }
export enum ERRORCODEENUM { export enum ERRORCODEENUM {
......
...@@ -194,3 +194,12 @@ export enum MEMBERPAYMENTCOLUMNS { ...@@ -194,3 +194,12 @@ export enum MEMBERPAYMENTCOLUMNS {
/**
* 邮件类型
*/
export enum MAILTYPE {
会员会费到期缴费通知 = 6,
会员催缴通知提前开发票 = 7,
会员活动or会议通知 = 12
}
...@@ -502,11 +502,14 @@ const ModelArray = [ ...@@ -502,11 +502,14 @@ const ModelArray = [
confirmReceipt:{type:'Number', default:0},//收款确认【财务核对页收款确认】 RECEIPTCONFIRMATION confirmReceipt:{type:'Number', default:0},//收款确认【财务核对页收款确认】 RECEIPTCONFIRMATION
confirmReceiptMs:{type:"Number", default:0},//审核时间 【同上 财务核对页收款确认之后更新时间】 confirmReceiptMs:{type:"Number", default:0},//审核时间 【同上 财务核对页收款确认之后更新时间】
invoiceStatus:{type:'Number', default:INVOICESTATUS.不具备开票条件, index:true},//发票状态 枚举 INVOICESTATUS 【待开发票页上传发票之后更新状态】 invoiceStatus:{type:'Number', default:INVOICESTATUS.不具备开票条件, index:true},//发票状态 枚举 INVOICESTATUS 【待开发票页上传发票之后更新状态】
invoiceTime:{type:'Number'},//发票申请时间
invoiceExamineTime:{type:'Number'},//已开发票时间
advanceInvoice:{type:'Boolean', default:false},//是否提交开票 【个人列表页提交开发票按钮】 advanceInvoice:{type:'Boolean', default:false},//是否提交开票 【个人列表页提交开发票按钮】
newUnitName:'String',//单位名称,新发票抬头【变更发票抬头使用】 newUnitName:'String',//单位名称,新发票抬头【变更发票抬头使用】
newUscc:'String',//新统一信用代码【变更发票信用代码使用】 newUscc:'String',//新统一信用代码【变更发票信用代码使用】
ct:'Number',//订单创建时间 ct:'Number',//订单创建时间
payTime:'Number',//支付时间 payTime:'Number',//支付时间
//2.0新加 //2.0新加
invoiceMail:'String',//发票邮箱 invoiceMail:'String',//发票邮箱
desc:'String',//用户反馈描述 desc:'String',//用户反馈描述
...@@ -518,7 +521,6 @@ const ModelArray = [ ...@@ -518,7 +521,6 @@ const ModelArray = [
refundBankName:"String", refundBankName:"String",
refundDesc:"String", refundDesc:"String",
isReplenishReturnInfo:{type:'Boolean', default:false},//是否补充退款信息 isReplenishReturnInfo:{type:'Boolean', default:false},//是否补充退款信息
// //
refundSuccessful:{type:"Boolean", default:false},//退款确认 refundSuccessful:{type:"Boolean", default:false},//退款确认
refundReject:{type:"Boolean", default:false},//退款驳回 true = 被驳回 refundReject:{type:"Boolean", default:false},//退款驳回 true = 被驳回
......
import { sendMail } from "./biz/mail";
import { testCallback } from "./biz/member/cost"; import { testCallback } from "./biz/member/cost";
import { initActivity } from "./biz/member/msgActivity"; import { initActivity } from "./biz/member/msgActivity";
import { initSaveUnsubmitted } from "./biz/register"; import { initSaveUnsubmitted } from "./biz/register";
...@@ -27,7 +28,7 @@ async function lanuch() { ...@@ -27,7 +28,7 @@ async function lanuch() {
// await test(); // await test();
// console.log(moment(1498262400000).format("YYYY-MM-DD HH:mm:SS")) // console.log(moment(1498262400000).format("YYYY-MM-DD HH:mm:SS"))
console.log("服务初始化成功"); console.log("服务初始化成功");
// await sendMail("18711017326@163.com");
// await testCallback("40a4e33658fa681429b9990434675c24") // await testCallback("40a4e33658fa681429b9990434675c24")
} }
......
...@@ -6,6 +6,7 @@ import * as authorityBiz from "../../biz/member/authority"; ...@@ -6,6 +6,7 @@ import * as authorityBiz from "../../biz/member/authority";
import * as registerBiz from "../../biz/register"; import * as registerBiz from "../../biz/register";
import * as homePageBiz from "../../biz/member/homePage"; import * as homePageBiz from "../../biz/member/homePage";
import * as rightsMgmtBiz from "../../biz/member/rightsMgmt"; import * as rightsMgmtBiz from "../../biz/member/rightsMgmt";
import * as mailBiz from "../../biz/mail";
import * as ossBiz from "../../biz/oss"; import * as ossBiz from "../../biz/oss";
import { ADMINLV } from "../../config/enum"; import { ADMINLV } from "../../config/enum";
...@@ -554,13 +555,21 @@ export const Config = { ...@@ -554,13 +555,21 @@ export const Config = {
], ],
bindBiz:examineBiz.submitDocument bindBiz:examineBiz.submitDocument
}, },
// {
// apiName:"提交资料-驳回",
// subUrl:'/examine/rejectjoin',
// param:[
// {key:"id", type:"String", desc:"提交资料列表返回的用户id"}
// ],
// bindBiz:examineBiz.rejectJoin
// },
{ {
apiName:"提交资料-驳回", apiName:"提交资料-删除",
subUrl:'/examine/rejectjoin', subUrl:'/examine/delrejectjoin',
param:[ param:[
{key:"id", type:"String", desc:"提交资料列表返回的用户id"} {key:"id", type:"String", desc:"提交资料列表返回的用户id"}
], ],
bindBiz:examineBiz.rejectJoin bindBiz:examineBiz.delRejectJoin
}, },
{ {
apiName:"待审核列表", apiName:"待审核列表",
...@@ -1199,6 +1208,17 @@ export const Config = { ...@@ -1199,6 +1208,17 @@ export const Config = {
bindBiz:ossBiz.getOss bindBiz:ossBiz.getOss
}, },
],
"发送邮件":[
{
apiName:"发送邮件",
subUrl:'/mail/send',
param:[
{key:"type", type:"Number", desc:"发送邮件类型"},
{key:"id", type:"String", desc:"用户标识"}
],
bindBiz:mailBiz.sendMail
},
] ]
} }
...@@ -76,6 +76,7 @@ export const Config = { ...@@ -76,6 +76,7 @@ export const Config = {
{key:"payState", type:"Number", desc:"支付状态 1是已支付 2是未支付 3是全部"}, {key:"payState", type:"Number", desc:"支付状态 1是已支付 2是未支付 3是全部"},
{key:"invoiceState", type:"Number", desc:"发票状态 0是全部 1是已申请 2是未申请", isNull:true}, {key:"invoiceState", type:"Number", desc:"发票状态 0是全部 1是已申请 2是未申请", isNull:true},
{key:"weChartPR", type:"String", desc:"微信支付单号", isNull:true}, {key:"weChartPR", type:"String", desc:"微信支付单号", isNull:true},
{key:"invoiceApplyMs", type:"String", desc:"发票申请时间", isNull:true},
{key:"pageNumber", type:"Number", desc:"分页-当前页面"}, {key:"pageNumber", type:"Number", desc:"分页-当前页面"},
{key:"pageSize", type:"Number", desc:"分页-一页大小"} {key:"pageSize", type:"Number", desc:"分页-一页大小"}
], ],
...@@ -183,6 +184,7 @@ export const Config = { ...@@ -183,6 +184,7 @@ export const Config = {
{key:"paymentType", type:"Number", desc:"支付方式", isNull:true}, {key:"paymentType", type:"Number", desc:"支付方式", isNull:true},
{key:"isPay", type:"Number", desc:"是否支付", isNull:true}, {key:"isPay", type:"Number", desc:"是否支付", isNull:true},
{key:"weChartPR", type:"String", desc:"微信支付单号", isNull:true}, {key:"weChartPR", type:"String", desc:"微信支付单号", isNull:true},
{key:"invoiceExamineTime", type:"Number", desc:"已开发票时间", isNull:true},
{key:"pageNumber", type:"Number", desc:"当前页"}, {key:"pageNumber", type:"Number", desc:"当前页"},
], ],
bindBiz:invoiceBiz.invoicedList bindBiz:invoiceBiz.invoicedList
......
...@@ -357,6 +357,13 @@ export const Config = { ...@@ -357,6 +357,13 @@ export const Config = {
param:[], param:[],
defaultParam:outPutConfig.MEMBERPAYMENTCOLUMNS, defaultParam:outPutConfig.MEMBERPAYMENTCOLUMNS,
bindBiz:publicBiz.setEnumInterface bindBiz:publicBiz.setEnumInterface
},
{
apiName:"邮件类型",
subUrl:'/mailtype',
param:[],
defaultParam:outPutConfig.MAILTYPE,
bindBiz:publicBiz.setEnumInterface
} }
], ],
......
...@@ -30,10 +30,10 @@ export async function setRouter(httpServer){ ...@@ -30,10 +30,10 @@ export async function setRouter(httpServer){
if (Look) { if (Look) {
await getDoc(); await getDoc();
// await initDoc(portalRouter.FirstName, portalRouter.Config, portalRouter.FirstRouter);//网站编辑 // await initDoc(portalRouter.FirstName, portalRouter.Config, portalRouter.FirstRouter);//网站编辑
// await initDoc(publicRouter.FirstName, publicRouter.Config, publicRouter.FirstRouter);//公用组件 await initDoc(publicRouter.FirstName, publicRouter.Config, publicRouter.FirstRouter);//公用组件
// await initDoc(memberRouter.FirstName, memberRouter.Config, memberRouter.FirstRouter);//用户路由 await initDoc(memberRouter.FirstName, memberRouter.Config, memberRouter.FirstRouter);//用户路由
// await initDoc(officalWebsiteRouter.FirstName, officalWebsiteRouter.Config, officalWebsiteRouter.FirstRouter);//官网路由 // await initDoc(officalWebsiteRouter.FirstName, officalWebsiteRouter.Config, officalWebsiteRouter.FirstRouter);//官网路由
await initDoc(orderRouter.FirstName, orderRouter.Config, orderRouter.FirstRouter);//会费相关 // await initDoc(orderRouter.FirstName, orderRouter.Config, orderRouter.FirstRouter);//会费相关
// await initDoc(costRouter.FirstName, costRouter.Config, costRouter.FirstRouter);//支付 // await initDoc(costRouter.FirstName, costRouter.Config, costRouter.FirstRouter);//支付
// await initDoc(outPutRouter.FirstName, outPutRouter.Config, outPutRouter.FirstRouter);//导出路由 // await initDoc(outPutRouter.FirstName, outPutRouter.Config, outPutRouter.FirstRouter);//导出路由
// await initDoc(labelRouter.FirstName, labelRouter.Config, labelRouter.FirstRouter);//标签路由 // await initDoc(labelRouter.FirstName, labelRouter.Config, labelRouter.FirstRouter);//标签路由
......
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