Commit 6e7ebf51 by lixinming

no message

parent d259e89f
...@@ -71,7 +71,7 @@ export async function pendingReviewList({unitName, joinTime, memberType, sheng, ...@@ -71,7 +71,7 @@ export async function pendingReviewList({unitName, joinTime, memberType, sheng,
* @returns * @returns
*/ */
export async function adopt({id, session}) { export async function adopt({id, session}) {
let userInfo = await findOnce(TABLEENUM.用户表, {userId:id, isAdmin:STATE.}, ["userId", "registerFlow", "loginId","userRegisterState", "memberType", "unitName", "name"]); let userInfo = await findOnce(TABLEENUM.用户表, {userId:id, isAdmin:STATE.}, ["userId", "registerFlow", "loginId","userRegisterState", "memberType", "unitName", "name", "phone"]);
if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.目标数据不存在); if (!userInfo || !userInfo.userId) throw new BizError(ERRORENUM.目标数据不存在);
if (userInfo.memberType == MEMBERTYPE.个人会员 && userInfo.registerFlow != REGISTERFLOW.完成第二步) { if (userInfo.memberType == MEMBERTYPE.个人会员 && userInfo.registerFlow != REGISTERFLOW.完成第二步) {
throw new BizError(ERRORENUM.不具备审批条件, `${userInfo.userId}为个人会员,并没有完成第二步`); throw new BizError(ERRORENUM.不具备审批条件, `${userInfo.userId}为个人会员,并没有完成第二步`);
......
...@@ -88,7 +88,7 @@ export async function firstOrderList({unitName, joinTime, memberType, orderState ...@@ -88,7 +88,7 @@ export async function firstOrderList({unitName, joinTime, memberType, orderState
let dbList = await findToPage(TABLEENUM.订单表, findParam, selectFile, pageNumber); let dbList = await findToPage(TABLEENUM.订单表, findParam, selectFile, pageNumber);
let dataCount = await findCount(TABLEENUM.订单表, findParam); let dataCount = await findCount(TABLEENUM.订单表, findParam);
let dataList = []; let dataList = [];
let itemFile = ["id", "unitName", "loginId", "phone"]; let itemFile = ["id", "unitName", "loginId", "phone", "memberCategory"];
dbList.forEach(info => { dbList.forEach(info => {
let itemData:any = extractData(info, itemFile); let itemData:any = extractData(info, itemFile);
itemData.joinTime = moment(info.orderCycleStart).format("YYYY-MM-DD"); itemData.joinTime = moment(info.orderCycleStart).format("YYYY-MM-DD");
...@@ -266,12 +266,14 @@ export async function billStateList({unitName, paymentType, isPay, pageNumber}) ...@@ -266,12 +266,14 @@ export async function billStateList({unitName, paymentType, isPay, pageNumber})
let dataList = []; let dataList = [];
let itemFile = ["userId", "unitName", "money", "paymentNum"]; let itemFile = ["id", "userId", "unitName", "money", "paymentNum", "memberCategory", "state", "paymentMethod"];
dbList.forEach(info => { dbList.forEach(info => {
let itemData:any = extractData(info, itemFile); let itemData:any = extractData(info, itemFile);
itemData.joinTime = moment(info.orderCycleStart).format("YYYY-MM-DD"); itemData.joinTime = moment(info.orderCycleStart).format("YYYY-MM-DD");
itemData.memberType = changeEnumValue(MEMBERTYPE, itemData.memberCategory); itemData.memberType = changeEnumValue(MEMBERTYPE, itemData.memberCategory);
itemData.paymentMethod = changeEnumValue(MEMBERTYPE, itemData.paymentMethod); itemData.paymentMethod = changeEnumValue(PAYMENTTYPE, itemData.paymentMethod);
itemData.isPay = changeEnumValue(ORDERSTATE, itemData.state);
itemData.memberState = "正常";//todo 后面要连接用户表
itemData.cycle = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}` itemData.cycle = `${moment(info.orderCycleStart).format("YYYY-MM-DD")}${moment(info.orderCycleEnd).format("YYYY-MM-DD")}`
dataList.push(itemData); dataList.push(itemData);
}); });
......
...@@ -34,7 +34,8 @@ export async function login({loginId, pwd}) { ...@@ -34,7 +34,8 @@ export async function login({loginId, pwd}) {
name:userInfo.name, name:userInfo.name,
userId:userInfo.userId, userId:userInfo.userId,
token:token, token:token,
adminLv:userInfo.adminLv adminLv:userInfo.adminLv,
timeMs:new Date().valueOf()
}; };
return {dataInfo} return {dataInfo}
......
...@@ -601,7 +601,8 @@ export async function fenHuiInfo({id}) { ...@@ -601,7 +601,8 @@ export async function fenHuiInfo({id}) {
export async function fenHuiDongTaiInfo({id}) { export async function fenHuiDongTaiInfo({id}) {
let dongTaiInfo = await findOnce(TABLEENUM.工作动态, {id, isUse:true}, ["id", "title", "activityTime", "imgUrl", "desc"]); let dongTaiInfo = await findOnce(TABLEENUM.工作动态, {id, isUse:true}, ["id", "title", "activityTime", "imgUrl", "desc"]);
if (!dongTaiInfo || !dongTaiInfo.id) throw new BizError(ERRORENUM.目标数据不存在); if (!dongTaiInfo || !dongTaiInfo.id) throw new BizError(ERRORENUM.目标数据不存在);
let dataInfo = extractData(dongTaiInfo, ["title", "activityTime", "imgUrl", "desc"]); let dataInfo:any = extractData(dongTaiInfo, ["title", "activityTime", "imgUrl", "desc"]);
dataInfo.activityTime= moment(dataInfo.activityTime).format("YYYY-MM-DD");
return {dataInfo} return {dataInfo}
} }
......
...@@ -238,9 +238,9 @@ export async function unitMemberRegister3({application, userId}) { ...@@ -238,9 +238,9 @@ export async function unitMemberRegister3({application, userId}) {
* userRegisterState:用户注册状态 USERREGISTERSTATE 会员注册是否已审批通过 * userRegisterState:用户注册状态 USERREGISTERSTATE 会员注册是否已审批通过
* 前端通过该方法获取注册流程状态,流程1通过返回状态【完成第一步】,流程2通过返回状态【完成第二步】,流程3通过返回状态【完成第三步】 * 前端通过该方法获取注册流程状态,流程1通过返回状态【完成第一步】,流程2通过返回状态【完成第二步】,流程3通过返回状态【完成第三步】
*/ */
export async function registerFlowType({userId}) { export async function registerFlowType({id}) {
if(!userId) return {}; if(!id) return {};
let oldInfo = await findOnce(TABLEENUM.用户表, {userId, isAdmin:STATE.}, ["userId", "registerFlow", "userRegisterState", "memberType"]); let oldInfo = await findOnce(TABLEENUM.用户表, {userId:id, isAdmin:STATE.}, ["userId", "registerFlow", "userRegisterState", "memberType"]);
if (!oldInfo || !oldInfo.userId) throw new BizError(ERRORENUM.目标数据不存在); if (!oldInfo || !oldInfo.userId) throw new BizError(ERRORENUM.目标数据不存在);
if (oldInfo.userRegisterState == USERREGISTERSTATE.通过) { if (oldInfo.userRegisterState == USERREGISTERSTATE.通过) {
return {code:601, msg:"用户已注册"} return {code:601, msg:"用户已注册"}
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
}, },
*/ */
import { INVOICESTATUS, MEMBERLEVEL, MEMBERSTATE, RECEIPTCONFIRMATION, REGISTERFLOW, STATE, USERREGISTERSTATE, WEICHARTPAYSTATE } from "../../config/enum"; import { INVOICESTATUS, MEMBERLEVEL, MEMBERSTATE, REGISTERFLOW, STATE, USERREGISTERSTATE, WEICHARTPAYSTATE } from "../../config/enum";
......
...@@ -31,7 +31,7 @@ export async function test1() { ...@@ -31,7 +31,7 @@ export async function test1() {
"userId" : generateUserId(), "userId" : generateUserId(),
"memberType" : 1, "memberType" : 1,
"askForTime" : 1711095028440.0, "askForTime" : 1711095028440.0,
"loginId" : `赵今麦${i}`, "loginId" : `${i}`,
"mail" : "18120935727@163.com", "mail" : "18120935727@163.com",
"pwd" : "123456", "pwd" : "123456",
"phone" : `1812093${Math.ceil(Math.random() * 10)}${Math.ceil(Math.random() * 10)}${Math.ceil(Math.random() * 10)}${Math.ceil(Math.random() * 10)}`, "phone" : `1812093${Math.ceil(Math.random() * 10)}${Math.ceil(Math.random() * 10)}${Math.ceil(Math.random() * 10)}${Math.ceil(Math.random() * 10)}`,
...@@ -43,7 +43,7 @@ export async function test1() { ...@@ -43,7 +43,7 @@ export async function test1() {
"documentType" : 1, "documentType" : 1,
"duties" : "吃的蔬菜生产", "duties" : "吃的蔬菜生产",
"education" : 2, "education" : 2,
"name" : `赵今麦${i}`, "name" : `%${i}`,
"nation" : 1, "nation" : 1,
"otherEMP" : "村上春树", "otherEMP" : "村上春树",
"otherPROF" : "村上春树", "otherPROF" : "村上春树",
...@@ -64,3 +64,52 @@ export async function test1() { ...@@ -64,3 +64,52 @@ export async function test1() {
await addManyData(TABLEENUM.用户表, dataList); await addManyData(TABLEENUM.用户表, dataList);
console.log("初始化成功"); console.log("初始化成功");
} }
export async function initOrderData() {
let randomNum = parseInt(`${moment().hour()}${moment().minute()}${moment().second()}${Math.ceil(Math.random() * 100)}`);
let userInfo = {
"adminLv" : [],
"registerFlow" : 2,
"isAdmin" : 0,
"userRegisterState" : 1,
"memberState" : 1,
"memberLevel" : 1,
"isGracePeriod" : 0,
"cardUrl" : [
"http://192.168.0.105:40012/whb/files/12/vue2024-03-22_16-11-873169.png"
],
"auxiliaryMaterial" : [],
"userId" : generateUserId(),
"memberType" : 1,
"askForTime" : 1711095028440.0,
"loginId" : `${randomNum}`,
"mail" : "18120935727@163.com",
"pwd" : "123456",
"phone" : `1812093${Math.ceil(Math.random() * 10)}${Math.ceil(Math.random() * 10)}${Math.ceil(Math.random() * 10)}${Math.ceil(Math.random() * 10)}`,
"__v" : 0,
"academicCERTUrl" : "http://192.168.0.105:40012/whb/files/12/vue2024-03-22_16-11-356620.png",
"addres" : "才能实现但是",
"birth" : 1711036800000.0,
"documentId" : "340822199901012333",
"documentType" : 1,
"duties" : "吃的蔬菜生产",
"education" : 2,
"name" : `%${randomNum}`,
"nation" : 1,
"otherEMP" : "去年注册",
"otherPROF" : "去年注册",
"photoUrl" : "http://192.168.0.105:40012/whb/files/12/vue2024-03-22_16-11-624049.png",
"profAchievement" : "去年注册",
"profCategory" : 1,
"professionalCERTUrl" : "http://192.168.0.105:40012/whb/files/12/vue2024-03-22_16-11-603763.png",
"qu" : "130524",
"sex" : 2,
"sheng" : "130000",
"shi" : "130500",
"studyResume" : "去年注册",
"unitName" : "去年注册",
"workResume" : "去年注册",
"workTitle" : "去年注册"
};
}
\ No newline at end of file
...@@ -32,6 +32,7 @@ export const Config = { ...@@ -32,6 +32,7 @@ export const Config = {
}, },
{ {
apiName:"个人入会流程2", apiName:"个人入会流程2",
notMiddleware:true,
subUrl:'/memberdb/memberregister2', subUrl:'/memberdb/memberregister2',
param:[ param:[
{ {
...@@ -69,6 +70,7 @@ export const Config = { ...@@ -69,6 +70,7 @@ export const Config = {
}, },
{ {
apiName:"单位入会流程1", apiName:"单位入会流程1",
notMiddleware:true,
subUrl:'/memberdb/unitmemberregister1', subUrl:'/memberdb/unitmemberregister1',
param:[ param:[
{ {
...@@ -87,6 +89,7 @@ export const Config = { ...@@ -87,6 +89,7 @@ export const Config = {
}, },
{ {
apiName:"单位入会流程2", apiName:"单位入会流程2",
notMiddleware:true,
subUrl:'/memberdb/unitmemberregister2', subUrl:'/memberdb/unitmemberregister2',
param:[ param:[
{ {
...@@ -132,6 +135,7 @@ export const Config = { ...@@ -132,6 +135,7 @@ export const Config = {
}, },
{ {
apiName:"单位入会流程3", apiName:"单位入会流程3",
notMiddleware:true,
subUrl:'/memberdb/unitmemberregister3', subUrl:'/memberdb/unitmemberregister3',
param:[ param:[
{ {
...@@ -142,6 +146,7 @@ export const Config = { ...@@ -142,6 +146,7 @@ export const Config = {
}, },
{ {
apiName:"发送短信验证码", apiName:"发送短信验证码",
notMiddleware:true,
subUrl:'/memberdb/registersendcode', subUrl:'/memberdb/registersendcode',
param:[ param:[
{key:"loginId", type:"String", desc:"用户名"}, {key:"loginId", type:"String", desc:"用户名"},
...@@ -154,7 +159,9 @@ export const Config = { ...@@ -154,7 +159,9 @@ export const Config = {
apiName:"获取当前会员注册流程", apiName:"获取当前会员注册流程",
notMiddleware:true, notMiddleware:true,
subUrl:'/memberdb/registerflowtype', subUrl:'/memberdb/registerflowtype',
param:[], param:[ {
key:"id", type:"String", desc:"用户id"
}],
bindBiz:registerBiz.registerFlowType bindBiz:registerBiz.registerFlowType
}, },
{ {
......
...@@ -217,7 +217,7 @@ export const Config = { ...@@ -217,7 +217,7 @@ export const Config = {
subUrl:'/banxueleixing', subUrl:'/banxueleixing',
param:[], param:[],
defaultParam:enumConfig.BANXUELEIXING, defaultParam:enumConfig.BANXUELEIXING,
bindBiz:publicBiz.getSession bindBiz:publicBiz.setEnumInterface
} }
], ],
} }
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