// 钱包管理模块种子数据:账户列表 / 企业开户申请 / 绑卡记录 // 账户号采用 "622" + 13位数字全局序号 的仿真格式,customerNo 采用 "CN" + 8位客户序号。 import { initCounter } from '../utils/id.js' function accountNo(seq) { return `622${String(seq).padStart(13, '0')}` } function customerNo(customerId) { return `CN${String(customerId).padStart(8, '0')}` } const OPEN_DATE = '2025-01-10 00:00:00' // customerId 与 customer-info/personal、enterprise-customer 中的 id 保持一致(customerType 区分) export const walletAccounts = [ // ---- 企业客户1:上海凡荣贸易有限公司(EC0001,customerId=1,customerType=ENTERPRISE) ---- { id: 1, customerId: 1, customerType: 'ENTERPRISE', accountNo: accountNo(1), accountType: 'A1', accountName: '上海凡荣贸易有限公司', accountRelation: '0', customerNo: customerNo(101), accountStatus: 'NORMAL', mainAccountNo: accountNo(1), openDate: OPEN_DATE }, { id: 2, customerId: 1, customerType: 'ENTERPRISE', accountNo: accountNo(2), accountType: 'A2', accountName: '上海凡荣贸易有限公司', accountRelation: '1', customerNo: customerNo(101), accountStatus: 'NORMAL', mainAccountNo: accountNo(1), openDate: OPEN_DATE }, { id: 3, customerId: 1, customerType: 'ENTERPRISE', accountNo: accountNo(3), accountType: 'A3', accountName: '上海凡荣贸易有限公司', accountRelation: '1', customerNo: customerNo(101), accountStatus: 'NORMAL', mainAccountNo: accountNo(1), openDate: OPEN_DATE }, { id: 4, customerId: 1, customerType: 'ENTERPRISE', accountNo: accountNo(4), accountType: 'A6', accountName: '上海凡荣贸易有限公司', accountRelation: '1', customerNo: customerNo(101), accountStatus: 'NORMAL', mainAccountNo: accountNo(1), openDate: OPEN_DATE }, { id: 5, customerId: 1, customerType: 'ENTERPRISE', accountNo: accountNo(5), accountType: 'A7', accountName: '上海凡荣贸易有限公司', accountRelation: '1', customerNo: customerNo(101), accountStatus: 'NORMAL', mainAccountNo: accountNo(1), openDate: OPEN_DATE }, // ---- 企业客户2:广州荣泰电子商务有限公司(EC0002,customerId=2,customerType=ENTERPRISE) ---- { id: 6, customerId: 2, customerType: 'ENTERPRISE', accountNo: accountNo(6), accountType: 'A1', accountName: '广州荣泰电子商务有限公司', accountRelation: '0', customerNo: customerNo(102), accountStatus: 'NORMAL', mainAccountNo: accountNo(6), openDate: OPEN_DATE }, { id: 7, customerId: 2, customerType: 'ENTERPRISE', accountNo: accountNo(7), accountType: 'A2', accountName: '广州荣泰电子商务有限公司', accountRelation: '1', customerNo: customerNo(102), accountStatus: 'NORMAL', mainAccountNo: accountNo(6), openDate: OPEN_DATE }, { id: 8, customerId: 2, customerType: 'ENTERPRISE', accountNo: accountNo(8), accountType: 'A6', accountName: '广州荣泰电子商务有限公司', accountRelation: '1', customerNo: customerNo(102), accountStatus: 'NORMAL', mainAccountNo: accountNo(6), openDate: OPEN_DATE }, // ---- 个人客户1:陈建国(PC0001,customerId=1,customerType=PERSONAL) ---- { id: 9, customerId: 1, customerType: 'PERSONAL', accountNo: accountNo(9), accountType: 'A1', accountName: '陈建国', accountRelation: '0', customerNo: customerNo(1), accountStatus: 'NORMAL', mainAccountNo: accountNo(9), openDate: OPEN_DATE }, { id: 10, customerId: 1, customerType: 'PERSONAL', accountNo: accountNo(10), accountType: 'A6', accountName: '陈建国', accountRelation: '1', customerNo: customerNo(1), accountStatus: 'NORMAL', mainAccountNo: accountNo(9), openDate: OPEN_DATE }, // ---- 个人客户2:林晓丽(PC0002,customerId=2,customerType=PERSONAL) ---- { id: 11, customerId: 2, customerType: 'PERSONAL', accountNo: accountNo(11), accountType: 'A1', accountName: '林晓丽', accountRelation: '0', customerNo: customerNo(2), accountStatus: 'NORMAL', mainAccountNo: accountNo(11), openDate: OPEN_DATE }, // ---- 个人客户3:黄志明(PC0003,customerId=3,customerType=PERSONAL) ---- { id: 12, customerId: 3, customerType: 'PERSONAL', accountNo: accountNo(12), accountType: 'A1', accountName: '黄志明', accountRelation: '0', customerNo: customerNo(3), accountStatus: 'NORMAL', mainAccountNo: accountNo(12), openDate: OPEN_DATE } ] initCounter('walletAccount', 13) initCounter('walletAccountSeq', 13) // 账户余额(字符串金额,与swagger保持一致),key为accountNo export const balances = { [accountNo(1)]: '1580000.00', [accountNo(2)]: '320000.00', [accountNo(3)]: '0.00', [accountNo(4)]: '500000.00', [accountNo(5)]: '0.00', [accountNo(6)]: '860000.00', [accountNo(7)]: '150000.00', [accountNo(8)]: '200000.00', [accountNo(9)]: '35000.00', [accountNo(10)]: '5000.00', [accountNo(11)]: '12000.00', [accountNo(12)]: '8000.00' } // 绑卡记录(个人/企业绑卡共用同一份数据,以accountNo为自然键) export const boundCards = [ { accountNo: accountNo(1), mobile: '13900000001', primaryAccount: '6222021234560001', bankNo: '102100000019', bankName: '中国工商银行上海分行', setDefault: true }, { accountNo: accountNo(6), mobile: '13900000002', primaryAccount: '6222021234560002', bankNo: '105100000017', bankName: '中国建设银行广州分行', setDefault: true }, { accountNo: accountNo(9), mobile: '13700000001', primaryAccount: '6222021234560003', bankNo: '102100000019', bankName: '中国工商银行上海分行', setDefault: true }, { accountNo: accountNo(11), mobile: '13700000002', primaryAccount: '6222021234560004', bankNo: '103100000009', bankName: '中国农业银行上海分行', setDefault: true }, { accountNo: accountNo(12), mobile: '13700000003', primaryAccount: '6222021234560005', bankNo: '105100000017', bankName: '中国建设银行广州分行', setDefault: true } ] // 企业开户申请(4条,覆盖 DRAFT/CONFIRMED/SUBMITTED/APPLY_FAILED 四种状态) export const enterpriseOpenApplications = [ { id: 1, applicationNo: 'APPEO00000001', organizationId: 1, enterpriseId: 1, enterpriseName: '上海凡荣贸易有限公司', businessLicense: '91310000MA1EC0001A', certificateType: 'BUSINESS_LICENSE', certificateNumber: '91310000MA1EC0001A', certificateEffectiveDate: '2015-01-01 00:00:00', certificateExpiryDate: '长期', certificateAddress: '上海市黄浦区人民路100号', businessScope: '国内贸易、电子商务、供应链管理', industry: '批发零售业', mobilePhone: '021-88880001', bankCardNumber: '6222021234560001', bankNo: '102100000019', bankName: '中国工商银行上海分行', legalPersonName: '陈建国', legalPersonIdType: 'ID_CARD', legalPersonIdNo: '310101198001011234', legalPersonOpto: '2035-01-01 00:00:00', controllerName: '陈建国', controllerIdType: 'ID_CARD', controllerIdNo: '310101198001011234', controllerOpto: '2035-01-01 00:00:00', channelNo: 'FRYL_CHANNEL_001', businessLicenseFileNo: 'FILE00000007', applicationStatus: 'SUBMITTED', confirmTime: '2025-01-09 09:00:00', mainAccountNo: accountNo(1), customerNo: customerNo(101), failReason: '', createdAt: '2025-01-08 09:00:00', updatedAt: '2025-01-10 00:00:00', fileList: [{ fileNo: 'FILE00000007', fileType: '12', filePage: 1 }], beneficiaryList: [ { beneName: '陈建国', beneIdType: 'ID_CARD', beneIdNo: '310101198001011234', beneAddress: '上海市黄浦区人民路100号', beneOpto: '2035-01-01 00:00:00', beneSex: '0', beneNationality: '中国', actCtrl: '是', actHdRat: '60' } ] }, { id: 2, applicationNo: 'APPEO00000002', organizationId: 2, enterpriseId: 2, enterpriseName: '广州荣泰电子商务有限公司', businessLicense: '91440101MA1EC0002B', certificateType: 'BUSINESS_LICENSE', certificateNumber: '91440101MA1EC0002B', certificateEffectiveDate: '2018-06-01 00:00:00', certificateExpiryDate: '长期', certificateAddress: '广州市天河区体育西路50号', businessScope: '电子商务、日用百货销售', industry: '零售业', mobilePhone: '020-88880002', bankCardNumber: '6222021234560002', bankNo: '105100000017', bankName: '中国建设银行广州分行', legalPersonName: '黄志明', legalPersonIdType: 'ID_CARD', legalPersonIdNo: '440101199203038901', legalPersonOpto: '2036-06-01 00:00:00', controllerName: '黄志明', controllerIdType: 'ID_CARD', controllerIdNo: '440101199203038901', controllerOpto: '2036-06-01 00:00:00', channelNo: 'FRYL_CHANNEL_001', businessLicenseFileNo: 'FILE00000008', applicationStatus: 'SUBMITTED', confirmTime: '2025-02-14 09:00:00', mainAccountNo: accountNo(6), customerNo: customerNo(102), failReason: '', createdAt: '2025-02-13 09:00:00', updatedAt: '2025-02-15 00:00:00', fileList: [{ fileNo: 'FILE00000008', fileType: '12', filePage: 1 }], beneficiaryList: [ { beneName: '黄志明', beneIdType: 'ID_CARD', beneIdNo: '440101199203038901', beneAddress: '广州市天河区体育西路50号', beneOpto: '2036-06-01 00:00:00', beneSex: '0', beneNationality: '中国', actCtrl: '是', actHdRat: '80' } ] }, { id: 3, applicationNo: 'APPEO00000003', organizationId: 1, enterpriseId: 1, enterpriseName: '上海凡荣贸易有限公司(分支)', businessLicense: '91310000MA1EC0003C', certificateType: 'BUSINESS_LICENSE', certificateNumber: '91310000MA1EC0003C', certificateEffectiveDate: '2024-01-01 00:00:00', certificateExpiryDate: '长期', certificateAddress: '上海市黄浦区人民路101号', businessScope: '国内贸易', industry: '批发零售业', mobilePhone: '021-88880003', bankCardNumber: '', bankNo: '', bankName: '', legalPersonName: '陈建国', legalPersonIdType: 'ID_CARD', legalPersonIdNo: '310101198001011234', legalPersonOpto: '2035-01-01 00:00:00', controllerName: '陈建国', controllerIdType: 'ID_CARD', controllerIdNo: '310101198001011234', controllerOpto: '2035-01-01 00:00:00', channelNo: 'FRYL_CHANNEL_001', businessLicenseFileNo: '', applicationStatus: 'DRAFT', confirmTime: '', mainAccountNo: '', customerNo: '', failReason: '', createdAt: '2026-06-20 09:00:00', updatedAt: '2026-06-20 09:00:00', fileList: [], beneficiaryList: [] }, { id: 4, applicationNo: 'APPEO00000004', organizationId: 2, enterpriseId: 2, enterpriseName: '广州荣泰电子商务有限公司(分支)', businessLicense: '91440101MA1EC0004D', certificateType: 'BUSINESS_LICENSE', certificateNumber: '91440101MA1EC0004D', certificateEffectiveDate: '2024-03-01 00:00:00', certificateExpiryDate: '长期', certificateAddress: '广州市天河区体育西路51号', businessScope: '电子商务', industry: '零售业', mobilePhone: '020-88880004', bankCardNumber: '6222021234569999', bankNo: '105100000017', bankName: '中国建设银行广州分行', legalPersonName: '黄志明', legalPersonIdType: 'ID_CARD', legalPersonIdNo: '440101199203038901', legalPersonOpto: '2036-06-01 00:00:00', controllerName: '黄志明', controllerIdType: 'ID_CARD', controllerIdNo: '440101199203038901', controllerOpto: '2036-06-01 00:00:00', channelNo: 'FRYL_CHANNEL_001', businessLicenseFileNo: 'FILE00000009', applicationStatus: 'APPLY_FAILED', confirmTime: '2026-05-01 09:00:00', mainAccountNo: '', customerNo: '', failReason: '企业名称与营业执照号不匹配,请核实后重新提交', createdAt: '2026-04-28 09:00:00', updatedAt: '2026-05-01 09:05:00', fileList: [{ fileNo: 'FILE00000009', fileType: '12', filePage: 1 }], beneficiaryList: [ { beneName: '黄志明', beneIdType: 'ID_CARD', beneIdNo: '440101199203038901', beneAddress: '广州市天河区体育西路51号', beneOpto: '2036-06-01 00:00:00', beneSex: '0', beneNationality: '中国', actCtrl: '是', actHdRat: '80' } ] } ] initCounter('enterpriseOpenApplication', 5) // 个人开户草稿(运行时通过 create-draft 写入,另预置3条不同状态的示例数据供列表页演示, // 覆盖 DRAFT/OPENED/APPLY_FAILED 三种状态;list/detail/update 为前端假设契约,详见 // 《缺失的后端接口.md》Part 1 §1.10 与 Part 2 新增条目) export const personalOpenApplications = [ { applicationNo: 'APPPO00000001', channelNo: 'FRYL_CHANNEL_001', accountProperty: '1', customerId: 1, customerName: '陈建国', certificateType: 'ID_CARD', certificateNumber: '310101198001011234', certificateEffectiveDate: '2015-01-01 00:00:00', certificateExpiryDate: '9999-12-31 00:00:00', issuingAuthority: '上海市公安局黄浦分局', certificateAddress: '上海市黄浦区人民路100号', gender: 'MALE', ethnic: '汉族', occupation: 'ENTERPRISE_MANAGER', jobNote: '', mobilePhone: '13700000001', bankCardNumber: '6222021234560003', fileList: [ { fileNo: 'FILE00000001', fileType: '01' }, { fileNo: 'FILE00000002', fileType: '02' }, { fileNo: 'FILE00000003', fileType: '04' } ], applicationStatus: 'OPENED', failReason: '', mainAccountNo: accountNo(9), customerNo: customerNo(1), createdAt: '2025-01-05 09:00:00', updatedAt: '2025-01-05 09:05:00' }, { applicationNo: 'APPPO00000002', channelNo: 'FRYL_CHANNEL_001', accountProperty: '1', customerId: 2, customerName: '林晓丽', certificateType: 'ID_CARD', certificateNumber: '310101199203038902', certificateEffectiveDate: '2018-06-01 00:00:00', certificateExpiryDate: '2038-06-01 00:00:00', issuingAuthority: '上海市公安局徐汇分局', certificateAddress: '上海市徐汇区漕溪路20号', gender: 'FEMALE', ethnic: '汉族', occupation: 'FREELANCER', jobNote: '', mobilePhone: '13700000002', bankCardNumber: '6222021234560004', fileList: [ { fileNo: 'FILE00000004', fileType: '01' }, { fileNo: 'FILE00000005', fileType: '02' }, { fileNo: 'FILE00000006', fileType: '04' } ], applicationStatus: 'APPLY_FAILED', failReason: '身份证已过期,请重新上传有效证件', mainAccountNo: '', customerNo: '', createdAt: '2026-06-01 09:00:00', updatedAt: '2026-06-01 09:05:00' }, { applicationNo: 'APPPO00000003', channelNo: 'FRYL_CHANNEL_001', accountProperty: '1', customerId: 3, customerName: '黄志明', certificateType: 'ID_CARD', certificateNumber: '440101198812121234', certificateEffectiveDate: '2020-03-01 00:00:00', certificateExpiryDate: '9999-12-31 00:00:00', issuingAuthority: '广州市公安局天河分局', certificateAddress: '广州市天河区体育西路50号', gender: 'MALE', ethnic: '汉族', occupation: 'OTHER', jobNote: '自由职业者', mobilePhone: '13700000003', bankCardNumber: '', fileList: [], applicationStatus: 'DRAFT', failReason: '', mainAccountNo: '', customerNo: '', createdAt: '2026-07-20 09:00:00', updatedAt: '2026-07-20 09:00:00' } ] initCounter('personalOpenApplication', 4)