mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-09-26 13:16:39 +08:00
1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
'use strict';const _0x2111a2=_0x1f01;(function(_0x199ac7,_0x1f05a4){const _0x387fb5=_0x1f01,_0x10001d=_0x199ac7();while(!![]){try{const _0x25f727=-parseInt(_0x387fb5(0x112))/0x1*(-parseInt(_0x387fb5(0x159))/0x2)+parseInt(_0x387fb5(0x11e))/0x3*(-parseInt(_0x387fb5(0x11b))/0x4)+parseInt(_0x387fb5(0xfc))/0x5+parseInt(_0x387fb5(0x12d))/0x6*(parseInt(_0x387fb5(0x113))/0x7)+-parseInt(_0x387fb5(0x14b))/0x8*(-parseInt(_0x387fb5(0x148))/0x9)+parseInt(_0x387fb5(0x135))/0xa*(parseInt(_0x387fb5(0xf4))/0xb)+-parseInt(_0x387fb5(0x158))/0xc*(parseInt(_0x387fb5(0x145))/0xd);if(_0x25f727===_0x1f05a4)break;else _0x10001d['push'](_0x10001d['shift']());}catch(_0x50625c){_0x10001d['push'](_0x10001d['shift']());}}}(_0x50e9,0x664ca));var __decorate=this&&this[_0x2111a2(0x100)]||function(_0x1c6fde,_0xf644ab,_0x56fe83,_0x14d532){const _0x9d48ed=_0x2111a2;var _0xa5d219=arguments[_0x9d48ed(0x13e)],_0x3c9459=_0xa5d219<0x3?_0xf644ab:_0x14d532===null?_0x14d532=Object['getOwnPropertyDescriptor'](_0xf644ab,_0x56fe83):_0x14d532,_0xe99ce7;if(typeof Reflect==='object'&&typeof Reflect[_0x9d48ed(0x109)]===_0x9d48ed(0x11d))_0x3c9459=Reflect['decorate'](_0x1c6fde,_0xf644ab,_0x56fe83,_0x14d532);else{for(var _0x3b693f=_0x1c6fde[_0x9d48ed(0x13e)]-0x1;_0x3b693f>=0x0;_0x3b693f--)if(_0xe99ce7=_0x1c6fde[_0x3b693f])_0x3c9459=(_0xa5d219<0x3?_0xe99ce7(_0x3c9459):_0xa5d219>0x3?_0xe99ce7(_0xf644ab,_0x56fe83,_0x3c9459):_0xe99ce7(_0xf644ab,_0x56fe83))||_0x3c9459;}return _0xa5d219>0x3&&_0x3c9459&&Object[_0x9d48ed(0x14f)](_0xf644ab,_0x56fe83,_0x3c9459),_0x3c9459;},__metadata=this&&this['__metadata']||function(_0x3f755b,_0x3b921c){const _0x26848c=_0x2111a2;if(typeof Reflect===_0x26848c(0x10b)&&typeof Reflect[_0x26848c(0x149)]===_0x26848c(0x11d))return Reflect[_0x26848c(0x149)](_0x3f755b,_0x3b921c);};Object[_0x2111a2(0x14f)](exports,_0x2111a2(0x10e),{'value':!![]}),exports[_0x2111a2(0x124)]=void 0x0;const common_1=require(_0x2111a2(0x155)),typeorm_1=require(_0x2111a2(0x129)),bcrypt=require(_0x2111a2(0x146));let DatabaseService=class DatabaseService{constructor(_0x344323){const _0xe08fab=_0x2111a2;this[_0xe08fab(0x10f)]=_0x344323;}async['onModuleInit'](){const _0x17ea93=_0x2111a2;await this[_0x17ea93(0x150)](),await this['checkSiteBaseConfig']();}async['checkSuperAdmin'](){const _0x23e9ca=_0x2111a2,_0x460701=await this[_0x23e9ca(0x10f)][_0x23e9ca(0x11f)](_0x23e9ca(0x102));if(!_0x460701||_0x460701[_0x23e9ca(0x13e)]===0x0){const _0x235ccb=bcrypt['hashSync'](_0x23e9ca(0x14d),0xa),_0x41618b=bcrypt[_0x23e9ca(0x156)](_0x23e9ca(0x14d),0xa),_0x5d2e02=_0x23e9ca(0x152),_0xcfcddc='defaultAdmin@cooper.com',_0x23346e={'username':_0x23e9ca(0x13d),'password':_0x235ccb,'status':0x1,'email':_0x5d2e02,'sex':0x1,'role':_0x23e9ca(0x13d)},_0x292342={'username':_0x23e9ca(0x111),'password':_0x41618b,'status':0x1,'email':_0xcfcddc,'sex':0x1,'role':_0x23e9ca(0x111)};await this['createDefaultUser'](_0x23346e),await this[_0x23e9ca(0x12e)](_0x292342);}}async[_0x2111a2(0x12e)](_0x19c585){const _0x54a81a=_0x2111a2;try{const {username:_0x592351,password:_0x20d1bb,status:_0x4eb012,email:_0x3eb076,role:_0x272b25}=_0x19c585,_0x3601f7=await this[_0x54a81a(0x10f)][_0x54a81a(0x11f)](_0x54a81a(0xfe)+_0x592351+_0x54a81a(0x13c)+_0x20d1bb+_0x54a81a(0x13c)+_0x4eb012+_0x54a81a(0x13c)+_0x3eb076+_0x54a81a(0x13c)+_0x272b25+'\x27)'),_0x1fe764=_0x3601f7[_0x54a81a(0x13b)],_0x7325=await this['connection'][_0x54a81a(0x11f)](_0x54a81a(0x140)+_0x1fe764+_0x54a81a(0xf7));common_1[_0x54a81a(0x12b)][_0x54a81a(0x115)](_0x54a81a(0xfd)+_0x272b25+'用户成功、用户名为['+_0x592351+_0x54a81a(0x119)+(_0x592351===_0x54a81a(0x13d)?_0x54a81a(0x121):_0x54a81a(0x14d))+_0x54a81a(0x126),'DatabaseService');}catch(_0x2a91c0){console['log'](_0x54a81a(0x10a),_0x2a91c0);throw new common_1[(_0x54a81a(0x103))](_0x54a81a(0x130),common_1[_0x54a81a(0x133)][_0x54a81a(0x11a)]);}}async['checkSiteBaseConfig'](){const _0x3e5256=_0x2111a2,_0x5648ad=[_0x3e5256(0xfa),_0x3e5256(0xf6),_0x3e5256(0x139),'robotAvatar','userDefautlAvatar'],_0x11c34d=await this[_0x3e5256(0x10f)][_0x3e5256(0x11f)](_0x3e5256(0x110)+_0x5648ad[_0x3e5256(0x12a)](_0xa9eabe=>'\x27'+_0xa9eabe+'\x27')[_0x3e5256(0x15c)](',')+')\x0a'),_0x51a26d=parseInt(_0x11c34d[0x0]['count']);_0x51a26d===0x0&&await this[_0x3e5256(0x125)]();}async[_0x2111a2(0x125)](){const _0x565e6a=_0x2111a2;try{const _0x1dbd50='',_0x13074d=_0x565e6a(0xff),_0xfbf00e=[{'configKey':_0x565e6a(0xfa),'configVal':'Yi\x20Ai','public':0x1,'encry':0x0},{'configKey':'qqNumber','configVal':'805239273','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x139),'configVal':_0x565e6a(0x134),'public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x15b),'configVal':'','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x10d),'configVal':'','public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x128),'configVal':_0x1dbd50,'public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x104),'configVal':'','public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x136),'configVal':'','public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x15a),'configVal':'','public':0x1,'encry':0x0},{'configKey':'openaiBaseUrl','configVal':_0x565e6a(0x101),'public':0x0,'encry':0x0},{'configKey':'noticeInfo','configVal':_0x13074d,'public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x13f),'configVal':_0x565e6a(0x123),'public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x147),'configVal':'欢迎使用Yi\x20Ai团队的产品服务,请在五分钟内完成你的账号激活,点击以下按钮激活您的账号,','public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x108),'configVal':'Yi\x20Ai团队','public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x117),'configVal':_0x565e6a(0x114),'public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x157),'configVal':'Yi\x20Ai账号激活成功','public':0x0,'encry':0x0},{'configKey':'registerSuccessEmailTeamName','configVal':_0x565e6a(0x12c),'public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x106),'configVal':_0x565e6a(0x14c),'public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x143),'configVal':_0x565e6a(0xf5),'public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x120),'configVal':_0x565e6a(0x151),'public':0x0,'encry':0x0},{'configKey':_0x565e6a(0x144),'configVal':'1','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x12f),'configVal':'30','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x118),'configVal':'3','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x131),'configVal':'3','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x137),'configVal':'1','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x154),'configVal':_0x565e6a(0x132),'public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x14e),'configVal':'10','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x116),'configVal':'10','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x153),'configVal':'10','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x122),'configVal':'1','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0xfb),'configVal':'0','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0xf9),'configVal':'0','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x10c),'configVal':'0','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0xf8),'configVal':'10','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x141),'configVal':'10','public':0x1,'encry':0x0},{'configKey':_0x565e6a(0x13a),'configVal':'10','public':0x1,'encry':0x0},{'configKey':'isVerifyEmail','configVal':'1','public':0x1,'encry':0x0}],_0x231a7c=await this[_0x565e6a(0x10f)][_0x565e6a(0x11f)](_0x565e6a(0x142)+_0xfbf00e[_0x565e6a(0x12a)](_0x2d4167=>'(\x27'+_0x2d4167['configKey']+_0x565e6a(0x13c)+_0x2d4167['configVal'][_0x565e6a(0x127)](/'/g,'\x5c\x27')+_0x565e6a(0x13c)+_0x2d4167[_0x565e6a(0x14a)]+_0x565e6a(0x13c)+_0x2d4167['encry']+'\x27)')[_0x565e6a(0x15c)](',\x20'));common_1[_0x565e6a(0x12b)]['log'](_0x565e6a(0x138),_0x565e6a(0x124));}catch(_0x34ed9e){console[_0x565e6a(0x115)](_0x565e6a(0x10a),_0x34ed9e);throw new common_1['HttpException'](_0x565e6a(0x11c),common_1[_0x565e6a(0x133)][_0x565e6a(0x11a)]);}}};function _0x1f01(_0x2cab94,_0x3887eb){const _0x50e98f=_0x50e9();return _0x1f01=function(_0x1f018f,_0x1e2191){_0x1f018f=_0x1f018f-0xf4;let _0x2ffdae=_0x50e98f[_0x1f018f];return _0x2ffdae;},_0x1f01(_0x2cab94,_0x3887eb);}DatabaseService=__decorate([(0x0,common_1[_0x2111a2(0x105)])(),__metadata('design:paramtypes',[typeorm_1[_0x2111a2(0x107)]])],DatabaseService),exports[_0x2111a2(0x124)]=DatabaseService;function _0x50e9(){const _0x372e32=['99FmuNqQ','metadata','public','454744MmCwJu',',请妥善保管您的账号,祝您使用愉快','123456','firstRregisterSendModel3Count','defineProperty','checkSuperAdmin','Yi\x20Ai团队','default@cooper.com','firstRregisterSendDrawMjCount','firstRegisterSendRank','@nestjs/common','hashSync','registerSuccessEmailTitle','228iPCqAD','93542xFXlkD','buyCramiAddress','robotAvatar','join','3078449HLWDBy','Yi\x20Ai账号激活失败','qqNumber','\x27,\x200,\x201000,\x20100)','invitedGuestSendModel3Count','inviteGiveSendModel4Count','siteName','inviteGiveSendModel3Count','83825EVUneB','初始化创建','INSERT\x20INTO\x20users\x20(username,\x20password,\x20status,\x20email,\x20role)\x20VALUES\x20(\x27','\x0a####\x20YiAi\x20欢迎您\x0a\x20-\x20欢迎使用YiAi\x0a\x20-\x20初始管理员账号密码\x20\x20super\x20\x20123456\x20【前台后台登录都可以修改】\x0a\x20-\x20初始预览账号密码\x20\x20admin\x20\x20123456\x20【为后台查看账号\x20仅可查看部分非敏感数据】\x0a','__decorate','https://api.openai.com','SELECT\x20*\x20FROM\x20users\x20WHERE\x20role\x20=\x20\x27super\x27','HttpException','baiduSiteId','Injectable','registerSuccessEmaileAppend','Connection','registerVerifyEmailFrom','decorate','error:\x20','object','inviteGiveSendDrawMjCount','userDefautlAvatar','__esModule','connection','\x0a\x20\x20SELECT\x20COUNT(*)\x20AS\x20count\x20FROM\x20config\x20WHERE\x20`configKey`\x20IN\x20(','admin','14oitUBq','1148917XjxODm','1800','log','firstRregisterSendModel4Count','registerVerifyExpir','registerSendModel4Count',']、初始密码为[','INTERNAL_SERVER_ERROR','136KBcAZS','创建默认网站配置失败!','function','26646zWFBfL','query','registerFailEmailTeamName','nine-super','inviteSendStatus','Yi\x20Ai团队账号验证','DatabaseService','createBaseSiteConfig',']\x20==============>\x20请注意查阅','replace','baiduCode','typeorm','map','Logger','Yi\x20Ai','12vtvLcu','createDefaultUser','registerSendModel3Count','创建默认超级管理员失败!','registerSendDrawMjCount','500','HttpStatus','HelloWordYi819','10hKPoAc','baiduToken','firstRegisterSendStatus','初始化网站配置信息成功、如您需要修改网站配置信息,请前往管理系统系统配置设置\x20==============>\x20请注意查阅','vxNumber','invitedGuestSendDrawMjCount','insertId','\x27,\x20\x27','super','length','registerVerifyEmailTitle','INSERT\x20INTO\x20balance\x20(userId,\x20balance,\x20usesLeft,\x20paintCount)\x20VALUES\x20(\x27','invitedGuestSendModel4Count','INSERT\x20INTO\x20config\x20(configKey,\x20configVal,\x20public,\x20encry)\x20VALUES\x20','registerFailEmailTitle','registerSendStatus','810069ZsVKcw','bcryptjs','registerVerifyEmailDesc'];_0x50e9=function(){return _0x372e32;};return _0x50e9();} |