This commit is contained in:
qq
2026-04-21 22:34:39 +08:00
commit c28429b589
718 changed files with 48804 additions and 0 deletions
@@ -0,0 +1,9 @@
import { UserFinancialProductModel } from 'src/model/user_financial_product.model';
import { DataSource, Repository } from 'typeorm';
export declare class TaskFinancialProductService {
private userFinancialProductModel;
private dataSource;
private readonly logger;
constructor(userFinancialProductModel: Repository<UserFinancialProductModel>, dataSource: DataSource);
handle(): Promise<void>;
}
+106
View File
@@ -0,0 +1,106 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var TaskFinancialProductService_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TaskFinancialProductService = void 0;
const common_1 = require("@nestjs/common");
const schedule_1 = require("@nestjs/schedule");
const typeorm_1 = require("@nestjs/typeorm");
const handlebars_1 = require("handlebars");
const data_source_context_1 = require("../../common/context/data_source.context");
const balance_log_help_1 = require("../../common/util/balance_log_help");
const decimal_help_1 = require("../../common/util/decimal_help");
const help_1 = require("../../common/util/help");
const repository_help_1 = require("../../common/util/repository_help");
const user_financial_product_model_1 = require("../../../model/user_financial_product.model");
const wallet_model_1 = require("../../../model/wallet.model");
const wallet_bill_model_1 = require("../../../model/wallet_bill.model");
const typeorm_2 = require("typeorm");
let TaskFinancialProductService = TaskFinancialProductService_1 = class TaskFinancialProductService {
userFinancialProductModel;
dataSource;
logger = new common_1.Logger(TaskFinancialProductService_1.name);
constructor(userFinancialProductModel, dataSource) {
this.userFinancialProductModel = userFinancialProductModel;
this.dataSource = dataSource;
}
async handle() {
this.logger.verbose('开始结算理财订单收益');
const now = help_1.Help.getSecondTimestamp();
const list = await this.userFinancialProductModel.findBy({
status: user_financial_product_model_1.HoldingStatus.Earning,
expireTime: (0, typeorm_2.LessThanOrEqual)(now),
});
for (let i = 0; i < list.length; i++) {
const item = list[i];
try {
const queryRunner = this.dataSource.createQueryRunner();
await data_source_context_1.DataSourceContext.startTransactionToQueryRunner(queryRunner, async (ctx) => {
const walletModel = ctx.getRepository(wallet_model_1.WalletModel);
const walletBillModel = ctx.getRepository(wallet_bill_model_1.WalletBillModel);
const userFinancialProductModel = ctx.getRepository(user_financial_product_model_1.UserFinancialProductModel);
const principal = item.principal;
const yieldRate = item.yieldRate;
const profit = decimal_help_1.DecimalHelp.times(principal, yieldRate).toString();
let count = await repository_help_1.RepositoryHelp.update(walletModel, {
userId: item.userId,
}, {
balance: () => `balance + ${profit}`,
financialProductEarnings: () => `financialProductEarnings + ${profit}`,
});
if (!count) {
throw new handlebars_1.Exception(`更新余额失败 id:${item.id}, userId:${item.userId}`);
}
const wallet = await walletModel.findOneByOrFail({
userId: item.userId,
});
await balance_log_help_1.BalanceLogHelp.record(walletBillModel, {
userId: item.userId,
type: wallet_bill_model_1.WalletBillType.FinancialProfit,
before: decimal_help_1.DecimalHelp.minus(wallet.balance, profit),
after: wallet.balance,
amount: profit,
remark: `理财订单收益发放,订单ID: ${item.id}`,
});
count = await repository_help_1.RepositoryHelp.update(userFinancialProductModel, {
id: item.id,
}, {
status: user_financial_product_model_1.HoldingStatus.Matured,
});
if (!count) {
throw new handlebars_1.Exception(`更新理财订单状态 失败 id:${item.id}, userId:${item.userId}`);
}
});
}
catch (e) {
this.logger.verbose(e.message);
}
}
this.logger.verbose(`理财订单收益发放完成,总数: ${list.length}`);
}
};
exports.TaskFinancialProductService = TaskFinancialProductService;
__decorate([
(0, schedule_1.Cron)(schedule_1.CronExpression.EVERY_MINUTE),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", Promise)
], TaskFinancialProductService.prototype, "handle", null);
exports.TaskFinancialProductService = TaskFinancialProductService = TaskFinancialProductService_1 = __decorate([
(0, common_1.Injectable)(),
__param(0, (0, typeorm_1.InjectRepository)(user_financial_product_model_1.UserFinancialProductModel)),
__metadata("design:paramtypes", [typeorm_2.Repository,
typeorm_2.DataSource])
], TaskFinancialProductService);
//# sourceMappingURL=task_financial_product.service.js.map
@@ -0,0 +1 @@
{"version":3,"file":"task_financial_product.service.js","sourceRoot":"","sources":["../../../../src/app/task/service/task_financial_product.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,2CAAoD;AACpD,+CAAwD;AACxD,6CAAmD;AACnD,2CAAuC;AACvC,kFAA+E;AAC/E,yEAAsE;AACtE,iEAA+D;AAC/D,iDAAgD;AAChD,uEAAqE;AACrE,8FAGgD;AAChD,8DAAqD;AACrD,wEAA8E;AAC9E,qCAAkE;AAG3D,IAAM,2BAA2B,mCAAjC,MAAM,2BAA2B;IAK5B;IACA;IALO,MAAM,GAAG,IAAI,eAAM,CAAC,6BAA2B,CAAC,IAAI,CAAC,CAAC;IAEvE,YAEU,yBAAgE,EAChE,UAAsB;QADtB,8BAAyB,GAAzB,yBAAyB,CAAuC;QAChE,eAAU,GAAV,UAAU,CAAY;IAC7B,CAAC;IAIE,AAAN,KAAK,CAAC,MAAM;QACV,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAClC,MAAM,GAAG,GAAG,WAAI,CAAC,kBAAkB,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC;YACvD,MAAM,EAAE,4CAAa,CAAC,OAAO;YAC7B,UAAU,EAAE,IAAA,yBAAe,EAAC,GAAG,CAAC;SACjC,CAAC,CAAC;Q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emConfigModel } from 'src/model/system_config.model';
import { UserModel } from 'src/model/user.model';
import { WalletModel } from 'src/model/wallet.model';
import { TeamRelationModel } from 'src/model/team_relation.model';
import { InviteCodePoolModel } from 'src/model/invite_code_pool.model';
import { UserSignInModel } from 'src/model/user_sign_in.model';
import { Repository, DataSource } from 'typeorm';
export declare class TaskInstallService implements OnModuleInit {
private systemConfigModel;
private userModel;
private walletModel;
private teamRelationModel;
private inviteCodePoolModel;
private userSignInModel;
private dataSource;
private readonly logger;
constructor(systemConfigModel: Repository<SystemConfigModel>, userModel: Repository<UserModel>, walletModel: Repository<WalletModel>, teamRelationModel: Repository<TeamRelationModel>, inviteCodePoolModel: Repository<InviteCodePoolModel>, userSignInModel: Repository<UserSignInModel>, dataSource: DataSource);
onModuleInit(): void;
install(): Promise<void>;
createTopUser(): Promise<UserModel>;
initImGroup(topUserId: number): Promise<void>;
}
+157
View File
@@ -0,0 +1,157 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var TaskInstallService_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TaskInstallService = void 0;
const common_1 = require("@nestjs/common");
const typeorm_1 = require("@nestjs/typeorm");
const system_config_model_1 = require("../../../model/system_config.model");
const user_model_1 = require("../../../model/user.model");
const wallet_model_1 = require("../../../model/wallet.model");
const team_relation_model_1 = require("../../../model/team_relation.model");
const invite_code_pool_model_1 = require("../../../model/invite_code_pool.model");
const user_sign_in_model_1 = require("../../../model/user_sign_in.model");
const typeorm_2 = require("typeorm");
const data_source_context_1 = require("../../common/context/data_source.context");
const im_help_1 = require("../../common/util/im_help");
const app_env_1 = require("../../../app.env");
let TaskInstallService = TaskInstallService_1 = class TaskInstallService {
systemConfigModel;
userModel;
walletModel;
teamRelationModel;
inviteCodePoolModel;
userSignInModel;
dataSource;
logger = new common_1.Logger(TaskInstallService_1.name);
constructor(systemConfigModel, userModel, walletModel, teamRelationModel, inviteCodePoolModel, userSignInModel, dataSource) {
this.systemConfigModel = systemConfigModel;
this.userModel = userModel;
this.walletModel = walletModel;
this.teamRelationModel = teamRelationModel;
this.inviteCodePoolModel = inviteCodePoolModel;
this.userSignInModel = userSignInModel;
this.dataSource = dataSource;
}
onModuleInit() {
void this.install();
}
async install() {
this.logger.verbose('正在执行安装任务');
const systemConfigCount = await this.systemConfigModel.count();
if (!systemConfigCount) {
this.logger.verbose('系统配置表为空,正在初始化...');
await this.systemConfigModel.insert({});
this.logger.verbose('系统配置初始化完成');
}
else {
this.logger.verbose('系统配置已存在,跳过初始化');
}
this.logger.verbose('开始创建顶级用户...');
const topUser = await this.createTopUser();
await this.initImGroup(topUser.id);
this.logger.verbose('安装任务执行完成,即将退出进程');
process.exit(0);
}
async createTopUser() {
const queryRunner = this.dataSource.createQueryRunner();
return await data_source_context_1.DataSourceContext.startTransactionToQueryRunner(queryRunner, async (transaction) => {
const userRepo = transaction.getRepository(user_model_1.UserModel);
const walletRepo = transaction.getRepository(wallet_model_1.WalletModel);
const teamRelationRepo = transaction.getRepository(team_relation_model_1.TeamRelationModel);
const inviteCodeRepo = transaction.getRepository(invite_code_pool_model_1.InviteCodePoolModel);
const userSignInRepo = transaction.getRepository(user_sign_in_model_1.UserSignInModel);
const existingUser = await userRepo.findOne({
where: { id: 1 },
});
if (existingUser) {
this.logger.verbose(`顶级用户已存在,账号:${existingUser.phone} ,邀请码: ${existingUser.inviteCode}`);
return existingUser;
}
const topUser = userRepo.create({
id: 1,
phone: '13800138000',
password: 'Aa123123.',
inviteCode: '888888',
});
await userRepo.save(topUser);
await walletRepo.insert({
userId: topUser.id,
});
const teamRelation = teamRelationRepo.create({
userId: topUser.id,
parentId: 0,
grandparentId: 0,
greatGrandparentId: 0,
path: `${topUser.id}`,
level: 1,
});
await teamRelationRepo.save(teamRelation);
await inviteCodeRepo.insert({
id: topUser.id,
code: '888888',
});
await userRepo.update({ id: topUser.id }, { inviteCode: '888888' });
const userSignIn = userSignInRepo.create({
userId: topUser.id,
consecutiveDays: 0,
makeUpCount: 2,
});
await userSignInRepo.save(userSignIn);
this.logger.verbose(`顶级用户创建成功,账号:${topUser.phone} ,邀请码: ${topUser.inviteCode}`);
return topUser;
});
}
async initImGroup(topUserId) {
const IM_USER_ID_PREFIX = 'IM_ENERGY_TEST_';
this.logger.verbose('正在初始化群组');
const groupInfo = await im_help_1.IMHelp.getGroupInfo([app_env_1.AppEnv.IM_DEFAULT_GROUP_ID]);
if (groupInfo.GroupInfo?.length && groupInfo.GroupInfo[0].ErrorCode == 0) {
this.logger.verbose(`群租已存在:${groupInfo.GroupInfo[0].Name}`);
}
else {
const res = await im_help_1.IMHelp.createGroup({
Owner_Account: `${IM_USER_ID_PREFIX}${topUserId}`,
Type: app_env_1.AppEnv.IM_DEFAULT_GROUP_TYPE,
GroupId: app_env_1.AppEnv.IM_DEFAULT_GROUP_ID,
FaceUrl: '',
Name: app_env_1.AppEnv.IM_DEFAULT_GROUP_NAME,
});
if (res.ErrorCode != 0) {
this.logger.verbose(`正初始化群组失败,${res.ErrorInfo},code: ${res.ErrorCode}`);
}
else {
this.logger.verbose(`正初始化群组完成`);
}
}
}
};
exports.TaskInstallService = TaskInstallService;
exports.TaskInstallService = TaskInstallService = TaskInstallService_1 = __decorate([
(0, common_1.Injectable)(),
__param(0, (0, typeorm_1.InjectRepository)(system_config_model_1.SystemConfigModel)),
__param(1, (0, typeorm_1.InjectRepository)(user_model_1.UserModel)),
__param(2, (0, typeorm_1.InjectRepository)(wallet_model_1.WalletModel)),
__param(3, (0, typeorm_1.InjectRepository)(team_relation_model_1.TeamRelationModel)),
__param(4, (0, typeorm_1.InjectRepository)(invite_code_pool_model_1.InviteCodePoolModel)),
__param(5, (0, typeorm_1.InjectRepository)(user_sign_in_model_1.UserSignInModel)),
__metadata("design:paramtypes", [typeorm_2.Repository,
typeorm_2.Repository,
typeorm_2.Repository,
typeorm_2.Repository,
typeorm_2.Repository,
typeorm_2.Repository,
typeorm_2.DataSource])
], TaskInstallService);
//# sourceMappingURL=task_install.service.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"task_install.service.js","sourceRoot":"","sources":["../../../../src/app/task/service/task_install.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAkE;AAClE,6CAAmD;AACnD,4EAAkE;AAClE,0DAAiD;AACjD,8DAAqD;AACrD,4EAAkE;AAClE,kFAAuE;AACvE,0EAA+D;AAC/D,qCAAiD;AACjD,kFAA+E;AAC/E,uDAAqD;AACrD,8CAAqC;AAO9B,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAKnB;IAEA;IAEA;IAEA;IAEA;IAEA;IACA;IAfO,MAAM,GAAG,IAAI,eAAM,CAAC,oBAAkB,CAAC,IAAI,CAAC,CAAC;IAE9D,YAEU,iBAAgD,EAEhD,SAAgC,EAEhC,WAAoC,EAEpC,iBAAgD,EAEhD,mBAAoD,EAEpD,eAA4C,EAC5C,UAAsB;QAXtB,sBAAiB,GAAjB,iBAAiB,CAA+B;QAEhD,cAAS,GAAT,SAAS,CAAuB;QAEhC,gBAAW,GAAX,WAAW,CAAyB;QAEpC,sBAAiB,GAAjB,iBAAiB,CAA+B;QAEhD,wBAAmB,GAAnB,mBAAmB,CAAiC;QAEpD,oBAAe,GAAf,eAAe,CAA6B;QAC5C,eAAU,GAAV,UAAU,CAAY;IAC7B,CAAC;IAKJ,Y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,CAAC,CAAC;YACH,IAAI,GAAG,CAAC,SAAS,IAAI,CAAC,EAAE,CAAC;gBACvB,IAAI,CAAC,MAAM,CAAC,OAAO,CACjB,YAAY,GAAG,CAAC,SAAS,UAAU,GAAG,CAAC,SAAS,EAAE,CACnD,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AArKY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,0BAAgB,EAAC,uCAAiB,CAAC,CAAA;IAEnC,WAAA,IAAA,0BAAgB,EAAC,sBAAS,CAAC,CAAA;IAE3B,WAAA,IAAA,0BAAgB,EAAC,0BAAW,CAAC,CAAA;IAE7B,WAAA,IAAA,0BAAgB,EAAC,uCAAiB,CAAC,CAAA;IAEnC,WAAA,IAAA,0BAAgB,EAAC,4CAAmB,CAAC,CAAA;IAErC,WAAA,IAAA,0BAAgB,EAAC,oCAAe,CAAC,CAAA;qCATP,oBAAU;QAElB,oBAAU;QAER,oBAAU;QAEJ,oBAAU;QAER,oBAAU;QAEd,oBAAU;QACf,oBAAU;GAhBrB,kBAAkB,CAqK9B"}
+8
View File
@@ -0,0 +1,8 @@
import { RedPacketModel } from 'src/model/red_packet.model';
import { Repository } from 'typeorm';
export declare class TaskRedPacketService {
private redPacketRepos;
private readonly logger;
constructor(redPacketRepos: Repository<RedPacketModel>);
handle(): Promise<void>;
}
+88
View File
@@ -0,0 +1,88 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var TaskRedPacketService_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TaskRedPacketService = void 0;
const common_1 = require("@nestjs/common");
const schedule_1 = require("@nestjs/schedule");
const typeorm_1 = require("@nestjs/typeorm");
const decimal_help_1 = require("../../common/util/decimal_help");
const help_1 = require("../../common/util/help");
const repository_help_1 = require("../../common/util/repository_help");
const red_packet_model_1 = require("../../../model/red_packet.model");
const user_model_1 = require("../../../model/user.model");
const typeorm_2 = require("typeorm");
const DAY_SECONDS = 24 * 60 * 60;
let TaskRedPacketService = TaskRedPacketService_1 = class TaskRedPacketService {
redPacketRepos;
logger = new common_1.Logger(TaskRedPacketService_1.name);
constructor(redPacketRepos) {
this.redPacketRepos = redPacketRepos;
}
async handle() {
try {
const now = help_1.Help.getSecondTimestamp();
const dayAgoSeconds = now - DAY_SECONDS;
const redPackets = await this.redPacketRepos.findBy({
expireTime: (0, typeorm_2.LessThanOrEqual)(dayAgoSeconds),
remainingCount: (0, typeorm_2.MoreThanOrEqual)(1),
status: (0, typeorm_2.In)([red_packet_model_1.RedPacketStatus.Unclaimed, red_packet_model_1.RedPacketStatus.Claiming]),
});
if (!redPackets.length) {
this.logger.log('红包退回任务结束,没有到期的红包');
return;
}
for (let i = 0, len = redPackets.length; i < len; i++) {
try {
await this.redPacketRepos.manager.transaction(async (manager) => {
const userRepos = manager.getRepository(user_model_1.UserModel);
const redPacketRepos = manager.getRepository(red_packet_model_1.RedPacketModel);
const redPacket = redPackets[i];
const remainingAmount = decimal_help_1.DecimalHelp.div(redPacket.remainingAmount, 100);
await repository_help_1.RepositoryHelp.update(redPacketRepos, {
id: redPacket.id,
}, {
status: red_packet_model_1.RedPacketStatus.Expire,
});
await repository_help_1.RepositoryHelp.update(userRepos, {
id: redPacket.userId,
}, {
redEnvelope: () => `redEnvelope + ${remainingAmount}`,
});
this.logger.log(`红包${redPacket.id}退回完成,退回金额:${remainingAmount}`);
});
}
catch (e) {
this.logger.error('红包退回任务出现错误001', e.stack);
}
}
}
catch (e) {
this.logger.error('红包退回任务出现错误002', e.stack);
}
}
};
exports.TaskRedPacketService = TaskRedPacketService;
__decorate([
(0, schedule_1.Cron)(schedule_1.CronExpression.EVERY_DAY_AT_MIDNIGHT),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", Promise)
], TaskRedPacketService.prototype, "handle", null);
exports.TaskRedPacketService = TaskRedPacketService = TaskRedPacketService_1 = __decorate([
(0, common_1.Injectable)(),
__param(0, (0, typeorm_1.InjectRepository)(red_packet_model_1.RedPacketModel)),
__metadata("design:paramtypes", [typeorm_2.Repository])
], TaskRedPacketService);
//# sourceMappingURL=task_red_packet.service.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"task_red_packet.service.js","sourceRoot":"","sources":["../../../../src/app/task/service/task_red_packet.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,+CAAwD;AACxD,6CAAmD;AACnD,iEAA+D;AAC/D,iDAAgD;AAChD,uEAAqE;AACrE,sEAA6E;AAC7E,0DAAiD;AACjD,qCAA2E;AAE3E,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAG1B,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAIrB;IAHO,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAChE,YAEU,cAA0C;QAA1C,mBAAc,GAAd,cAAc,CAA4B;IACjD,CAAC;IAKE,AAAN,KAAK,CAAC,MAAM;QACV,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,WAAI,CAAC,kBAAkB,EAAE,CAAC;Y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ACrB,EACD;4BACE,WAAW,EAAE,GAAG,EAAE,CAAC,iBAAiB,eAAe,EAAE;yBACtD,CACF,CAAC;wBAoBF,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,KAAK,SAAS,CAAC,EAAE,aAAa,eAAe,EAAE,CAChD,CAAC;oBACJ,CAAC,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,CAAM,EAAE,CAAC;oBAEhB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;gBAC9C,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAEhB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF,CAAA;AAvFY,oDAAoB;AAUzB;IAFL,IAAA,eAAI,EAAC,yBAAc,CAAC,qBAAqB,CAAC;;;;kDA8E1C;+BAtFU,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,0BAAgB,EAAC,iCAAc,CAAC,CAAA;qCACT,oBAAU;GAJzB,oBAAoB,CAuFhC"}
+14
View File
@@ -0,0 +1,14 @@
import { OnModuleInit } from '@nestjs/common';
import { Repository } from 'typeorm';
import { UserVerifyModel } from 'src/model/user_verify.model';
export declare class TaskUserVerifyService implements OnModuleInit {
private userVerifyModel;
private readonly logger;
constructor(userVerifyModel: Repository<UserVerifyModel>);
onModuleInit(): void;
private scheduleNextAudit;
private executeAuditAndScheduleNext;
private validateIdCard;
private validateName;
autoAuditVerify(): Promise<void>;
}
+174
View File
@@ -0,0 +1,174 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var TaskUserVerifyService_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TaskUserVerifyService = void 0;
const common_1 = require("@nestjs/common");
const typeorm_1 = require("@nestjs/typeorm");
const typeorm_2 = require("typeorm");
const user_verify_model_1 = require("../../../model/user_verify.model");
const getDelay = () => {
const randomMinutes = Math.floor(Math.random() * 51) + 10;
const delay = randomMinutes * 60 * 1000;
return delay;
};
let TaskUserVerifyService = TaskUserVerifyService_1 = class TaskUserVerifyService {
userVerifyModel;
logger = new common_1.Logger(TaskUserVerifyService_1.name);
constructor(userVerifyModel) {
this.userVerifyModel = userVerifyModel;
}
onModuleInit() {
this.logger.verbose('实名认证定时任务已加载');
this.scheduleNextAudit();
}
scheduleNextAudit() {
const delay = getDelay();
this.logger.verbose(`下一次实名认证审核将在 ${delay / 60 / 1000} 分钟后执行`);
setTimeout(() => {
void this.executeAuditAndScheduleNext();
}, delay);
}
async executeAuditAndScheduleNext() {
await this.autoAuditVerify();
this.scheduleNextAudit();
}
validateIdCard(idCardNo) {
const idCard = idCardNo.trim();
if (idCard.length === 18) {
const first17 = idCard.substring(0, 17);
if (!/^\d{17}$/.test(first17)) {
return { valid: false, message: '前 17 位必须是数字' };
}
const lastChar = idCard.charAt(17).toUpperCase();
if (!/^\d|X$/.test(lastChar)) {
return { valid: false, message: '第 18 位必须是数字或 X' };
}
const provinceCode = parseInt(idCard.substring(0, 2));
if (provinceCode < 11 || provinceCode > 82) {
return { valid: false, message: '无效的地区码' };
}
const birthYear = parseInt(idCard.substring(6, 10));
const birthMonth = parseInt(idCard.substring(10, 12));
const birthDay = parseInt(idCard.substring(12, 14));
const currentYear = new Date().getFullYear();
if (birthYear < 1900 ||
birthYear > currentYear ||
birthMonth < 1 ||
birthMonth > 12 ||
birthDay < 1 ||
birthDay > 31) {
return { valid: false, message: '无效的出生日期' };
}
const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
const checkCodes = [
'1',
'0',
'X',
'9',
'8',
'7',
'6',
'5',
'4',
'3',
'2',
];
let sum = 0;
for (let i = 0; i < 17; i++) {
sum += parseInt(first17.charAt(i)) * weights[i];
}
const mod = sum % 11;
const expectedCheckCode = checkCodes[mod];
if (lastChar !== expectedCheckCode) {
return { valid: false, message: '身份证校验码错误' };
}
return { valid: true };
}
if (idCard.length === 15) {
if (!/^\d{15}$/.test(idCard)) {
return { valid: false, message: '15 位身份证必须全部是数字' };
}
const provinceCode = parseInt(idCard.substring(0, 2));
if (provinceCode < 11 || provinceCode > 82) {
return { valid: false, message: '无效的地区码' };
}
return { valid: true };
}
return { valid: false, message: '身份证号长度必须是 15 或 18 位' };
}
validateName(realName) {
const name = realName.trim();
if (!name) {
return { valid: false, message: '姓名不能为空' };
}
if (name.length < 2 || name.length > 5) {
return { valid: false, message: '姓名长度应为 2-5 个汉字' };
}
if (!/^[\u4e00-\u9fa5]+$/.test(name)) {
return { valid: false, message: '姓名只能包含汉字' };
}
if (/(.)\1{2,}/.test(name)) {
return { valid: false, message: '姓名包含过多重复字符' };
}
return { valid: true };
}
async autoAuditVerify() {
this.logger.verbose('开始执行实名认证自动审核任务');
try {
const pendingRecords = await this.userVerifyModel.find({
where: { status: user_verify_model_1.VerifyAuditStatus.Pending },
});
this.logger.verbose(`待审核记录数:${pendingRecords.length}`);
let approvedCount = 0;
let rejectedCount = 0;
for (const record of pendingRecords) {
const idCardValidation = this.validateIdCard(record.idCardNo);
if (!idCardValidation.valid) {
await this.userVerifyModel.update({ id: record.id }, {
status: user_verify_model_1.VerifyAuditStatus.Rejected,
rejectReason: `身份证验证失败:${idCardValidation.message}`,
});
rejectedCount++;
this.logger.verbose(`实名认证审核拒绝 ID: ${record.id}, 原因:${idCardValidation.message}`);
continue;
}
const nameValidation = this.validateName(record.realName);
if (!nameValidation.valid) {
await this.userVerifyModel.update({ id: record.id }, {
status: user_verify_model_1.VerifyAuditStatus.Rejected,
rejectReason: `姓名验证失败:${nameValidation.message}`,
});
rejectedCount++;
this.logger.verbose(`实名认证审核拒绝 ID: ${record.id}, 原因:${nameValidation.message}`);
continue;
}
await this.userVerifyModel.update({ id: record.id }, { status: user_verify_model_1.VerifyAuditStatus.Approved });
approvedCount++;
this.logger.verbose(`实名认证审核通过 ID: ${record.id}, 姓名:${record.realName}`);
}
this.logger.verbose(`实名认证自动审核任务执行完成,通过:${approvedCount} 人,拒绝:${rejectedCount}`);
}
catch (error) {
this.logger.error(`实名认证自动审核任务执行失败`, error instanceof Error ? error.stack : error);
}
}
};
exports.TaskUserVerifyService = TaskUserVerifyService;
exports.TaskUserVerifyService = TaskUserVerifyService = TaskUserVerifyService_1 = __decorate([
(0, common_1.Injectable)(),
__param(0, (0, typeorm_1.InjectRepository)(user_verify_model_1.UserVerifyModel)),
__metadata("design:paramtypes", [typeorm_2.Repository])
], TaskUserVerifyService);
//# sourceMappingURL=task_user_verify.service.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
export declare class TaskFinancialProductModule {
}
+23
View File
@@ -0,0 +1,23 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TaskFinancialProductModule = void 0;
const schedule_1 = require("@nestjs/schedule");
const common_module_1 = require("../common/common.module");
const common_1 = require("@nestjs/common");
const task_financial_product_service_1 = require("./service/task_financial_product.service");
let TaskFinancialProductModule = class TaskFinancialProductModule {
};
exports.TaskFinancialProductModule = TaskFinancialProductModule;
exports.TaskFinancialProductModule = TaskFinancialProductModule = __decorate([
(0, common_1.Module)({
imports: [schedule_1.ScheduleModule.forRoot(), common_module_1.CommonModule],
providers: [task_financial_product_service_1.TaskFinancialProductService],
})
], TaskFinancialProductModule);
//# sourceMappingURL=task_financial_product.module.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"task_financial_product.module.js","sourceRoot":"","sources":["../../../src/app/task/task_financial_product.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAAkD;AAClD,2DAAuD;AACvD,2CAAwC;AACxC,6FAAuF;AAMhF,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CAAG,CAAA;AAA7B,gEAA0B;qCAA1B,0BAA0B;IAJtC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC,OAAO,EAAE,EAAE,4BAAY,CAAC;QACjD,SAAS,EAAE,CAAC,4DAA2B,CAAC;KACzC,CAAC;GACW,0BAA0B,CAAG"}
+2
View File
@@ -0,0 +1,2 @@
export declare class TaskInstallModule {
}
+23
View File
@@ -0,0 +1,23 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TaskInstallModule = void 0;
const schedule_1 = require("@nestjs/schedule");
const common_module_1 = require("../common/common.module");
const task_install_service_1 = require("./service/task_install.service");
const common_1 = require("@nestjs/common");
let TaskInstallModule = class TaskInstallModule {
};
exports.TaskInstallModule = TaskInstallModule;
exports.TaskInstallModule = TaskInstallModule = __decorate([
(0, common_1.Module)({
imports: [schedule_1.ScheduleModule.forRoot(), common_module_1.CommonModule],
providers: [task_install_service_1.TaskInstallService],
})
], TaskInstallModule);
//# sourceMappingURL=task_install.module.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"task_install.module.js","sourceRoot":"","sources":["../../../src/app/task/task_install.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAAkD;AAClD,2DAAuD;AACvD,yEAAoE;AACpE,2CAAwC;AAMjC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAJ7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC,OAAO,EAAE,EAAE,4BAAY,CAAC;QACjD,SAAS,EAAE,CAAC,yCAAkB,CAAC;KAChC,CAAC;GACW,iBAAiB,CAAG"}
+2
View File
@@ -0,0 +1,2 @@
export declare class TaskRedPacketModule {
}
+24
View File
@@ -0,0 +1,24 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TaskRedPacketModule = void 0;
const common_1 = require("@nestjs/common");
const schedule_1 = require("@nestjs/schedule");
const common_module_1 = require("../common/common.module");
const task_red_packet_service_1 = require("./service/task_red_packet.service");
let TaskRedPacketModule = class TaskRedPacketModule {
};
exports.TaskRedPacketModule = TaskRedPacketModule;
exports.TaskRedPacketModule = TaskRedPacketModule = __decorate([
(0, common_1.Module)({
imports: [schedule_1.ScheduleModule.forRoot(), common_module_1.CommonModule],
providers: [task_red_packet_service_1.TaskRedPacketService],
exports: [],
})
], TaskRedPacketModule);
//# sourceMappingURL=task_red_packet.module.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"task_red_packet.module.js","sourceRoot":"","sources":["../../../src/app/task/task_red_packet.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,2DAAuD;AACvD,+EAAyE;AAOlE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAL/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC,OAAO,EAAE,EAAE,4BAAY,CAAC;QACjD,SAAS,EAAE,CAAC,8CAAoB,CAAC;QACjC,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,mBAAmB,CAAG"}
+2
View File
@@ -0,0 +1,2 @@
export declare class TaskUserVerifyModule {
}
+23
View File
@@ -0,0 +1,23 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TaskUserVerifyModule = void 0;
const schedule_1 = require("@nestjs/schedule");
const common_module_1 = require("../common/common.module");
const common_1 = require("@nestjs/common");
const task_user_verify_service_1 = require("./service/task_user_verify.service");
let TaskUserVerifyModule = class TaskUserVerifyModule {
};
exports.TaskUserVerifyModule = TaskUserVerifyModule;
exports.TaskUserVerifyModule = TaskUserVerifyModule = __decorate([
(0, common_1.Module)({
imports: [schedule_1.ScheduleModule.forRoot(), common_module_1.CommonModule],
providers: [task_user_verify_service_1.TaskUserVerifyService],
})
], TaskUserVerifyModule);
//# sourceMappingURL=task_user_verify.module.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"task_user_verify.module.js","sourceRoot":"","sources":["../../../src/app/task/task_user_verify.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAAkD;AAClD,2DAAuD;AACvD,2CAAwC;AACxC,iFAA2E;AAMpE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oDAAoB;+BAApB,oBAAoB;IAJhC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC,OAAO,EAAE,EAAE,4BAAY,CAAC;QACjD,SAAS,EAAE,CAAC,gDAAqB,CAAC;KACnC,CAAC;GACW,oBAAoB,CAAG"}