mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-09-24 20:26:39 +08:00
1 line
21 KiB
JavaScript
1 line
21 KiB
JavaScript
'use strict';const _0x5977dd=_0x4329;(function(_0x239c47,_0x219519){const _0x202a58=_0x4329,_0x19b5e0=_0x239c47();while(!![]){try{const _0x875305=parseInt(_0x202a58(0x134))/0x1*(parseInt(_0x202a58(0xfb))/0x2)+parseInt(_0x202a58(0x15e))/0x3+-parseInt(_0x202a58(0x173))/0x4+-parseInt(_0x202a58(0x11c))/0x5+-parseInt(_0x202a58(0x151))/0x6+parseInt(_0x202a58(0x178))/0x7+parseInt(_0x202a58(0x108))/0x8*(parseInt(_0x202a58(0x111))/0x9);if(_0x875305===_0x219519)break;else _0x19b5e0['push'](_0x19b5e0['shift']());}catch(_0x1ffb5c){_0x19b5e0['push'](_0x19b5e0['shift']());}}}(_0x3805,0x5e9f7));var __decorate=this&&this[_0x5977dd(0x17c)]||function(_0x90dca2,_0x2c6d0a,_0x51bfb2,_0xf7b4a5){const _0x1150e0=_0x5977dd;var _0x1b64f2=arguments[_0x1150e0(0x120)],_0x183716=_0x1b64f2<0x3?_0x2c6d0a:_0xf7b4a5===null?_0xf7b4a5=Object[_0x1150e0(0x153)](_0x2c6d0a,_0x51bfb2):_0xf7b4a5,_0x458da5;if(typeof Reflect===_0x1150e0(0x13f)&&typeof Reflect[_0x1150e0(0x155)]===_0x1150e0(0xe9))_0x183716=Reflect[_0x1150e0(0x155)](_0x90dca2,_0x2c6d0a,_0x51bfb2,_0xf7b4a5);else{for(var _0x4d43de=_0x90dca2[_0x1150e0(0x120)]-0x1;_0x4d43de>=0x0;_0x4d43de--)if(_0x458da5=_0x90dca2[_0x4d43de])_0x183716=(_0x1b64f2<0x3?_0x458da5(_0x183716):_0x1b64f2>0x3?_0x458da5(_0x2c6d0a,_0x51bfb2,_0x183716):_0x458da5(_0x2c6d0a,_0x51bfb2))||_0x183716;}return _0x1b64f2>0x3&&_0x183716&&Object['defineProperty'](_0x2c6d0a,_0x51bfb2,_0x183716),_0x183716;},__metadata=this&&this[_0x5977dd(0x139)]||function(_0x31ae9d,_0x2c689f){const _0x3071f0=_0x5977dd;if(typeof Reflect==='object'&&typeof Reflect[_0x3071f0(0x158)]===_0x3071f0(0xe9))return Reflect['metadata'](_0x31ae9d,_0x2c689f);},__param=this&&this[_0x5977dd(0x166)]||function(_0x3dcae1,_0x29d95a){return function(_0x22c355,_0x284cda){_0x29d95a(_0x22c355,_0x284cda,_0x3dcae1);};};Object[_0x5977dd(0x15d)](exports,_0x5977dd(0x128),{'value':!![]}),exports[_0x5977dd(0x165)]=void 0x0;const models_service_1=require(_0x5977dd(0x115)),chatLog_entity_1=require(_0x5977dd(0x1ac)),common_1=require('@nestjs/common'),config_entity_1=require('./config.entity'),typeorm_1=require('@nestjs/typeorm'),typeorm_2=require(_0x5977dd(0x10c)),utils_1=require('../../common/utils'),axios_1=require(_0x5977dd(0x10f)),fs=require('fs'),packageJsonContent=fs[_0x5977dd(0x14d)](_0x5977dd(0x13c),_0x5977dd(0x107)),packageJson=JSON[_0x5977dd(0x1a8)](packageJsonContent),version=packageJson[_0x5977dd(0x197)];function _0x4329(_0x2d6cdd,_0x48b3b4){const _0x380592=_0x3805();return _0x4329=function(_0x432931,_0x20884e){_0x432931=_0x432931-0xe3;let _0x5c3d67=_0x380592[_0x432931];return _0x5c3d67;},_0x4329(_0x2d6cdd,_0x48b3b4);}function _0x3805(){const _0x11c807=['signInModel3Count','phoneRegisterStatus','typeorm','update','OfficialService','axios','baiduTextAccessToken','99IJKNSI','registerSendModel3Count','inviteGiveSendDrawMjCount','firstRregisterSendDrawMjCount','../models/models.service','payEpayApiPayUrl','vxNumber','Logger','&secret=','queryGptKeys','openaiBaseUrl','1728835BJSNrG','mpay','firstRegisterSendStatus','getWechatAccessToken','length','HttpStatus','qqNumber','registerBaseUrl','baiduTextStatus','mjHideNotBlock','支付功能暂未开放!','NAMESPACE','__esModule','siteName','siteRobotName','aliPhoneAccessKeySecret','data','env','payWeChatPrivateKey','获取微信access_token失败、错误信息:','emailRegisterStatus','entries','手机验证码功能暂未开放!','filingNumber','2hxYbfb','mjUseBaiduFy','请填写您的授权码','getAuthInfo','every','__metadata','aliPhoneTemplateCode','auth','package.json','configs','TRUE','object','mjProxy','queryPayType','onModuleInit','configEntity','\x20current\x20use\x20version\x20in\x20------>:\x20','操作完成!','https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=','signInModel4Count','invitedGuestSendModel3Count','phoneLoginStatus','ConfigEntity','inviteSendStatus','getNamespace','readFileSync','isVerifyEmail','&client_secret=','getDiffArray','2292840cvLRRd','forEach','getOwnPropertyDescriptor','response','decorate','hupi','setConfig','metadata','reduce','queryAllConfig','nineAiToken','post','defineProperty','1555692jdLGhj','payHupiStatus','clientHomePath','HttpException','Like','tencent','mjProxyImgUrl','GlobalConfigService','__param','includes','隐私内容、非超级管理员无权查看','isAutoOpenNotice','find','firstRregisterSendModel4Count','filter','BAD_REQUEST','map','请按要求填写正确的授权信息','chatLogEntity','ISDEV','configKey','2934736BztloG','configVal','hideString','感谢您使用NineAi、祝您使用愉快~','appMenuHeaderTips','5098639FlubqP','super','https://aip.baidubce.com/oauth/2.0/token?client_id=','nineaiBuiltInSensitiveStatus','__decorate','https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=','inviteGiveSendModel4Count','ali','gpt','nineai','aliPhoneSignName','chatGptKey','log','emailLoginStatus','wechat\x20refresh\x20access_token\x20\x20==>\x20','Injectable','baiduTextSecretKey','InjectRepository','save','设置完成!','firstRegisterSendRank','wechatJsapiTicket','isUseWxLogin','fetchBaseAccessToken','ModelsService','modelsService','payMpayChannel','globalConfigs','access_token','chatGptKey:','isShowAppCatIcon','version','get','clientLogoPath','Key','缺失ip信息','https://api.jiangly.com/api/permission/auth','error','baidu','buyCramiAddress','appMenuHeaderBgUrl','payMpayStatus','wechat','signInStatus','&type=jsapi','queryFrontConfig','payWeChatPublicKey','百度敏感词配置检测失败,您的参数可能配置的不正确!','parse','百度敏感词初始化失败,如果需要敏感检测、请前往后台系统配置!','wechatOfficialAppSecret','epay','../chatLog/chatLog.entity','wechatRegisterStatus','payEpayChannel','aliPhoneAccessKeyId','error:\x20','noticeInfo','domain','noticeTitle','salesSeniorRatio','setGptKeys','签到功能暂未开放!','createOrUpdate','copyrightTitle','function','baiduTextApiKey','getConfigs','getPhoneVerifyConfig','assign','mjHideWorkIn','registerSendDrawMjCount','getNineAiToken','baiduCode','fetchJsapiTicket','wechatAccessToken','application/json','nineaiBuiltInSensitiveApiBase','请配置正确的秘钥、当前秘钥检测不通过!','inviteGiveSendModel3Count','payWechatStatus','getSensitiveConfig','Status','252238gQcnSZ','initBaiduSensitive','wechatOfficialAppId','design:paramtypes','firstRregisterSendModel3Count','queryNotice','default','user','copyrightUrl','initGetAllConfig','Repository','wechatSilentLoginStatus','utf-8','254536fGpphv','payEpayStatus'];_0x3805=function(){return _0x11c807;};return _0x3805();}console[_0x5977dd(0x184)](_0x5977dd(0x144),version);let GlobalConfigService=class GlobalConfigService{constructor(_0x5d8eb7,_0x50905d,_0x235c0a){const _0xf3c1ad=_0x5977dd;this[_0xf3c1ad(0x143)]=_0x5d8eb7,this[_0xf3c1ad(0x170)]=_0x50905d,this[_0xf3c1ad(0x191)]=_0x235c0a,this['globalConfigs']={},this[_0xf3c1ad(0x15b)]=!![];}async[_0x5977dd(0x142)](){const _0x5b0114=_0x5977dd;await this[_0x5b0114(0x104)]();}async[_0x5977dd(0xeb)](_0x1cce7c){const _0x131496=_0x5977dd;if(_0x1cce7c[_0x131496(0x120)]===0x0)return;if(_0x1cce7c['includes'](_0x131496(0xf3))&&_0x1cce7c[_0x131496(0x120)]===0x1)return this[_0x131496(0xf3)];if(_0x1cce7c[_0x131496(0x167)](_0x131496(0x18d))&&_0x1cce7c[_0x131496(0x120)]===0x1)return this[_0x131496(0x18d)];if(_0x1cce7c[_0x131496(0x120)]===0x1)return this[_0x131496(0x193)][_0x1cce7c[0x0]];else{const _0x410aef={};return _0x1cce7c[_0x131496(0x152)](_0x2fbfc7=>_0x410aef[_0x2fbfc7]=this[_0x131496(0x193)][_0x2fbfc7]),_0x410aef;}}async[_0x5977dd(0x104)](){const _0x119224=_0x5977dd,_0xc1dd45=await this[_0x119224(0x143)][_0x119224(0x16a)]();this['globalConfigs']=_0xc1dd45[_0x119224(0x159)]((_0x67a878,_0x8eee6)=>{const _0x29ab36=_0x119224;return _0x67a878[_0x8eee6[_0x29ab36(0x172)]]=_0x8eee6[_0x29ab36(0x174)],_0x67a878;},{}),this[_0x119224(0xfc)]();}async['initBaiduSensitive'](_0x1ea62a=!![]){const _0x28d17c=_0x5977dd,{baiduTextApiKey:_0x1e0764,baiduTextSecretKey:_0x170679}=await this[_0x28d17c(0xeb)]([_0x28d17c(0xea),_0x28d17c(0x188)]);if(!_0x1e0764||!_0x170679){common_1[_0x28d17c(0x118)][_0x28d17c(0x19d)](_0x28d17c(0x1a9),'GlobalConfigService');return;}const _0x6eb113={'Content-Type':_0x28d17c(0xf4),'Accept':_0x28d17c(0xf4)},_0x5712aa=_0x28d17c(0x17a)+_0x1e0764+_0x28d17c(0x14f)+_0x170679+'&grant_type=client_credentials';try{const _0xcf16a7=await axios_1[_0x28d17c(0x101)][_0x28d17c(0x15c)](_0x5712aa,{'headers':_0x6eb113});this[_0x28d17c(0x193)][_0x28d17c(0x110)]=_0xcf16a7['data'][_0x28d17c(0x194)];}catch(_0x475926){if(_0x1ea62a)common_1[_0x28d17c(0x118)][_0x28d17c(0x19d)](_0x28d17c(0x1a7),_0x28d17c(0x165));else throw new common_1['HttpException'](_0x475926[_0x28d17c(0x154)]['data']['error_description'],common_1[_0x28d17c(0x121)][_0x28d17c(0x16d)]);}}async[_0x5977dd(0x11f)](_0xd92e19=![]){const _0x5bbfe8=_0x5977dd,{wechatOfficialAppId:_0x37c64c,wechatOfficialAppSecret:_0x5ee0af}=await this[_0x5bbfe8(0xeb)]([_0x5bbfe8(0xfd),'wechatOfficialAppSecret']);if(!_0x37c64c||!_0x5ee0af)return common_1[_0x5bbfe8(0x118)][_0x5bbfe8(0x19d)]('还未配置微信的appId和secret、配置后才可进行微信扫码登录!!!',_0x5bbfe8(0x10e));this[_0x5bbfe8(0xf3)]=await this[_0x5bbfe8(0x18f)](_0x37c64c,_0x5ee0af,_0xd92e19),this[_0x5bbfe8(0x18d)]=await this[_0x5bbfe8(0xf2)](this[_0x5bbfe8(0xf3)]),common_1[_0x5bbfe8(0x118)][_0x5bbfe8(0x184)](_0x5bbfe8(0x186)+this[_0x5bbfe8(0xf3)],_0x5bbfe8(0x10e));}async['fetchBaseAccessToken'](_0x320c95,_0x2c6a8c,_0x1c4378=![]){const _0x4c320b=_0x5977dd;if(process[_0x4c320b(0x12d)][_0x4c320b(0x171)]===_0x4c320b(0x13e)){this[_0x4c320b(0xf3)]='';return;}const {data:{errmsg:_0x72cb93,access_token:_0x5d1473}}=await axios_1[_0x4c320b(0x101)][_0x4c320b(0x198)](_0x4c320b(0x146)+_0x320c95+_0x4c320b(0x119)+_0x2c6a8c);if(_0x72cb93){if(_0x1c4378)common_1[_0x4c320b(0x118)][_0x4c320b(0x19d)](_0x4c320b(0x12f)+_0x72cb93,_0x4c320b(0x10e));else throw new common_1[(_0x4c320b(0x161))](_0x4c320b(0xf6),common_1[_0x4c320b(0x121)][_0x4c320b(0x16d)]);return'';}return _0x5d1473;}async[_0x5977dd(0xf2)](_0x3db305){const _0x228f8b=_0x5977dd;var _0x1aabc7;if(process[_0x228f8b(0x12d)][_0x228f8b(0x171)]==='TRUE'){this[_0x228f8b(0x18d)]='';return;}const _0x2cd8f4=await axios_1[_0x228f8b(0x101)][_0x228f8b(0x198)](_0x228f8b(0x17d)+_0x3db305+_0x228f8b(0x1a4));return(_0x1aabc7=_0x2cd8f4===null||_0x2cd8f4===void 0x0?void 0x0:_0x2cd8f4[_0x228f8b(0x12c)])===null||_0x1aabc7===void 0x0?void 0x0:_0x1aabc7['ticket'];}async[_0x5977dd(0x15a)](_0x204ce9){const _0x2d71b6=_0x5977dd,{role:_0xd92a92}=_0x204ce9[_0x2d71b6(0x102)];return this[_0x2d71b6(0x193)];}async[_0x5977dd(0x1a5)](_0x3731f7,_0x2ec24c){const _0x4bc717=_0x5977dd,_0xc225b3=['vxNumber','registerSendStatus',_0x4bc717(0x112),'registerSendModel4Count',_0x4bc717(0xef),_0x4bc717(0x11e),_0x4bc717(0x18c),_0x4bc717(0xff),_0x4bc717(0x16b),_0x4bc717(0x114),_0x4bc717(0x14b),_0x4bc717(0xf7),_0x4bc717(0x17e),_0x4bc717(0x113),_0x4bc717(0x148),'invitedGuestSendModel4Count','invitedGuestSendDrawMjCount',_0x4bc717(0x160),_0x4bc717(0x199),'clientFavoIconPath',_0x4bc717(0x18e),_0x4bc717(0x129),'robotAvatar',_0x4bc717(0x12a),_0x4bc717(0x19f),'mindDefaultData',_0x4bc717(0xf1),_0x4bc717(0x1ae),_0x4bc717(0x192),_0x4bc717(0x116),_0x4bc717(0x109),_0x4bc717(0x15f),_0x4bc717(0xf8),_0x4bc717(0x1a1),_0x4bc717(0x169),_0x4bc717(0x196),'salesBaseRatio',_0x4bc717(0xe4),'salesAllowDrawMoney','companyName',_0x4bc717(0x133),_0x4bc717(0x10b),_0x4bc717(0x130),_0x4bc717(0x185),_0x4bc717(0x149),_0x4bc717(0x1ad),_0x4bc717(0x106),_0x4bc717(0x1a3),'signInModel3Count',_0x4bc717(0x147),'signInMjDrawToken',_0x4bc717(0x177),_0x4bc717(0x1a0),_0x4bc717(0x135),_0x4bc717(0x125),_0x4bc717(0xee),_0x4bc717(0x14e)],_0x204c1c=await this['configEntity'][_0x4bc717(0x16a)]({'where':{'configKey':(0x0,typeorm_2['In'])(_0xc225b3)}}),{domain:_0x2cfd1b}=_0x3731f7,_0x5f4495=this[_0x4bc717(0x193)][_0x4bc717(0x1b2)];_0x5f4495!==_0x2cfd1b&&(this['createOrUpdate']({'configKey':_0x4bc717(0x1b2),'configVal':_0x2cfd1b,'status':0x1}),await this[_0x4bc717(0x104)]());const _0x4d7e3e=_0x204c1c[_0x4bc717(0x159)]((_0x54b87c,_0x35af68)=>{const _0x1b6c0c=_0x4bc717;return _0x54b87c[_0x35af68[_0x1b6c0c(0x172)]]=_0x35af68[_0x1b6c0c(0x174)],_0x54b87c;},{}),{wechatOfficialAppId:_0x146652,wechatOfficialAppSecret:_0x571b8e}=await this['getConfigs']([_0x4bc717(0xfd),_0x4bc717(0x1aa)]),_0x1bf622=!!(_0x146652&&_0x571b8e);return Object[_0x4bc717(0xed)](Object[_0x4bc717(0xed)]({},_0x4d7e3e),{'isUseWxLogin':_0x1bf622});}async[_0x5977dd(0x11a)](_0x5165f5){const _0x3940ae=_0x5977dd,{role:_0xedb530}=_0x5165f5[_0x3940ae(0x102)],_0x537c9f=await this[_0x3940ae(0x143)][_0x3940ae(0x16a)]({'where':{'configKey':(0x0,typeorm_2[_0x3940ae(0x162)])('%'+'chatGptKey'+'%')}});if(_0xedb530===_0x3940ae(0x179))return _0x537c9f;return _0x537c9f[_0x3940ae(0x16e)](_0x11f652=>{const _0x4d8d38=_0x3940ae;return _0x11f652[_0x4d8d38(0x174)]=(0x0,utils_1['hideString'])(_0x11f652['configVal']),_0x11f652;});}async[_0x5977dd(0xe5)](_0x36e767){const _0x72e80=_0x5977dd,_0x56cf69=_0x36e767[_0x72e80(0x13d)][_0x72e80(0x16c)](_0x1b8041=>_0x1b8041['configVal']),_0x52e60e=_0x56cf69['map'](_0x4764ab=>_0x4764ab[_0x72e80(0x172)]);for(const [_0x59f3d3,_0x19145f]of _0x56cf69[_0x72e80(0x131)]()){const {configKey:_0x3b23f8,configVal:_0x287856,status:_0x412b1b}=_0x19145f;await this[_0x72e80(0xe7)]({'configKey':'chatGptKey:'+(_0x59f3d3+0x1),'configVal':_0x287856,'status':_0x412b1b});}const _0x3cc66e=await this[_0x72e80(0x143)][_0x72e80(0x16a)]({'where':{'configKey':(0x0,typeorm_2[_0x72e80(0x162)])('%'+_0x72e80(0x183)+'%')}}),_0x3212ef=_0x3cc66e[_0x72e80(0x16e)](_0x5f43ea=>_0x5f43ea[_0x72e80(0x172)]);if(_0x3212ef[_0x72e80(0x120)]>_0x52e60e[_0x72e80(0x120)]){const _0x42a70c=(0x0,utils_1[_0x72e80(0x150)])(_0x3212ef[_0x72e80(0x120)],_0x52e60e['length'],_0x72e80(0x195));for(const _0x5ad55e of _0x42a70c){await this[_0x72e80(0x143)]['delete']({'configKey':_0x5ad55e});}}return await this['initGetAllConfig'](),_0x72e80(0x145);}async['queryConfig'](_0x135010,_0x2132c7){const _0x957ff3=_0x5977dd,{role:_0x3d23d8}=_0x2132c7['user'],{keys:_0x46b8cf}=_0x135010,_0x426442=await this[_0x957ff3(0x143)]['find']({'where':{'configKey':(0x0,typeorm_2['In'])(_0x46b8cf)}});return _0x3d23d8!==_0x957ff3(0x179)&&_0x426442[_0x957ff3(0x152)](_0x3e2253=>{const _0x4bab7d=_0x957ff3;if(_0x3e2253['configKey'][_0x4bab7d(0x167)]('mj')||_0x3e2253['configKey'][_0x4bab7d(0x167)](_0x4bab7d(0x19a))||_0x3e2253[_0x4bab7d(0x172)]['includes'](_0x4bab7d(0x180))||_0x3e2253[_0x4bab7d(0x172)][_0x4bab7d(0x167)]('cos')||_0x3e2253[_0x4bab7d(0x172)][_0x4bab7d(0x167)]('baidu')||_0x3e2253[_0x4bab7d(0x172)][_0x4bab7d(0x167)](_0x4bab7d(0x17f))||_0x3e2253[_0x4bab7d(0x172)]['includes'](_0x4bab7d(0x163))||_0x3e2253['configKey'][_0x4bab7d(0x167)]('pay')||_0x3e2253[_0x4bab7d(0x172)]['includes'](_0x4bab7d(0x1a2))||_0x3e2253[_0x4bab7d(0x172)][_0x4bab7d(0x167)](_0x4bab7d(0x164))||_0x3e2253[_0x4bab7d(0x172)]===_0x4bab7d(0x11b)){const _0x33cae9=[_0x4bab7d(0x1a6),_0x4bab7d(0x12e)];if(_0x33cae9[_0x4bab7d(0x167)](_0x3e2253[_0x4bab7d(0x172)]))return _0x3e2253[_0x4bab7d(0x174)]=(0x0,utils_1['hideString'])(_0x3e2253[_0x4bab7d(0x174)],_0x4bab7d(0x168));const _0x32838b=[_0x4bab7d(0x109),_0x4bab7d(0x15f),_0x4bab7d(0x140)];!_0x32838b[_0x4bab7d(0x167)](_0x3e2253[_0x4bab7d(0x172)])&&!_0x3e2253[_0x4bab7d(0x172)][_0x4bab7d(0x167)](_0x4bab7d(0xfa))&&(_0x3e2253[_0x4bab7d(0x174)]=(0x0,utils_1[_0x4bab7d(0x175)])(_0x3e2253[_0x4bab7d(0x174)]));}}),_0x426442[_0x957ff3(0x159)]((_0x28d6f4,_0x13ec21)=>{const _0x2f124f=_0x957ff3;return _0x28d6f4[_0x13ec21['configKey']]=_0x13ec21[_0x2f124f(0x174)],_0x28d6f4;},{});}[_0x5977dd(0xf0)](){const _0xaba591=_0x5977dd,_0x5ca51a=this[_0xaba591(0x193)]['MjdrawCount'],_0x3f4b66=this[_0xaba591(0x15b)];return!_0x3f4b66||Number(_0x5ca51a)===0x1;}async[_0x5977dd(0x157)](_0x34ea5e){const _0x18eb57=_0x5977dd;try{const {settings:_0x4a7d26}=_0x34ea5e;for(const _0x5c0841 of _0x4a7d26){await this['createOrUpdate'](_0x5c0841);}await this[_0x18eb57(0x104)]();const _0x27704a=_0x4a7d26[_0x18eb57(0x16e)](_0x4c8813=>_0x4c8813[_0x18eb57(0x172)]);return(_0x27704a[_0x18eb57(0x167)](_0x18eb57(0xea))||_0x27704a['includes']('baiduTextSecretKey'))&&await this[_0x18eb57(0xfc)](![]),(_0x27704a['includes']('wechatOfficialAppId')||_0x27704a[_0x18eb57(0x167)](_0x18eb57(0x1aa)))&&await this[_0x18eb57(0x11f)](),_0x18eb57(0x18b);}catch(_0x1b8c62){console[_0x18eb57(0x184)]('error:\x20',_0x1b8c62);}}async[_0x5977dd(0xe7)](_0x3e1859){const _0x40ac86=_0x5977dd;try{const {configKey:_0x376cc8,configVal:_0x2d0fd6,status:status=0x1}=_0x3e1859,_0x3783f8=await this[_0x40ac86(0x143)]['findOne']({'where':{'configKey':_0x376cc8}});if(_0x3783f8){const _0x2f4536=await this[_0x40ac86(0x143)][_0x40ac86(0x10d)]({'configKey':_0x376cc8},{'configVal':_0x2d0fd6,'status':status});}else{const _0x5f51b7=await this[_0x40ac86(0x143)][_0x40ac86(0x18a)]({'configKey':_0x376cc8,'configVal':_0x2d0fd6,'status':status});}}catch(_0x2c6522){console[_0x40ac86(0x184)](_0x40ac86(0x1b0),_0x2c6522);throw new common_1['HttpException']('设置配置信息错误!',common_1['HttpStatus']['BAD_REQUEST']);}}async[_0x5977dd(0x100)](){const _0x14b05c=_0x5977dd;return await this[_0x14b05c(0xeb)]([_0x14b05c(0x1b1),_0x14b05c(0xe3)]);}async['getCopyright'](){const _0x3d734b=_0x5977dd;return await this['getConfigs']([_0x3d734b(0x103),_0x3d734b(0xe8)]);}async[_0x5977dd(0x141)](){const _0x59a023=_0x5977dd,{payHupiStatus:payHupiStatus=0x0,payEpayStatus:payEpayStatus=0x0,payWechatStatus:payWechatStatus=0x0,payMpayStatus:payMpayStatus=0x0}=await this[_0x59a023(0xeb)](['payHupiStatus',_0x59a023(0x109),'payMpayStatus',_0x59a023(0xf8)]);if([payHupiStatus,payEpayStatus,payWechatStatus,payMpayStatus][_0x59a023(0x138)](_0xf861ec=>_0xf861ec===0x0))throw new common_1['HttpException'](_0x59a023(0x126),common_1[_0x59a023(0x121)][_0x59a023(0x16d)]);if(Number(payWechatStatus)===0x1)return _0x59a023(0x1a2);if(Number(payEpayStatus)===0x1)return _0x59a023(0x1ab);if(Number(payMpayStatus)===0x1)return _0x59a023(0x11d);if(Number(payHupiStatus)===0x1)return _0x59a023(0x156);}async[_0x5977dd(0x137)](){const _0x576f73=_0x5977dd,{siteName:_0x11fee0,qqNumber:_0x5b3fbb,vxNumber:_0x456e58,registerBaseUrl:_0x128981,domain:_0x51a016}=await this[_0x576f73(0xeb)]([_0x576f73(0x129),_0x576f73(0x122),_0x576f73(0x117),_0x576f73(0x123),_0x576f73(0x1b2)]);return{'siteName':_0x11fee0,'qqNumber':_0x5b3fbb,'vxNumber':_0x456e58,'registerBaseUrl':_0x128981,'domain':_0x51a016};}async[_0x5977dd(0xec)](){const _0x1aa66f=_0x5977dd,{phoneRegisterStatus:_0x3c1e90,aliPhoneAccessKeyId:_0x3107bc,aliPhoneAccessKeySecret:_0x48119f,aliPhoneSignName:_0xa0c5d9,aliPhoneTemplateCode:_0x145eff}=await this[_0x1aa66f(0xeb)]([_0x1aa66f(0x10b),_0x1aa66f(0x1af),_0x1aa66f(0x12b),_0x1aa66f(0x182),_0x1aa66f(0x13a)]);if(Number(_0x3c1e90)!==0x1)throw new common_1[(_0x1aa66f(0x161))](_0x1aa66f(0x132),common_1[_0x1aa66f(0x121)]['BAD_REQUEST']);return{'accessKeyId':_0x3107bc,'accessKeySecret':_0x48119f,'SignName':_0xa0c5d9,'TemplateCode':_0x145eff};}[_0x5977dd(0x14c)](){const _0x30765e=_0x5977dd;return process[_0x30765e(0x12d)][_0x30765e(0x127)]||'NINEAI';}async['getSignatureGiftConfig'](){const _0x1bd405=_0x5977dd,{signInStatus:signInStatus=0x0,signInModel3Count:signInModel3Count=0x0,signInModel4Count:signInModel4Count=0x0,signInMjDrawToken:signInMjDrawToken=0x0}=await this[_0x1bd405(0xeb)]([_0x1bd405(0x1a3),_0x1bd405(0x10a),_0x1bd405(0x147),'signInMjDrawToken']);if(Number(signInStatus)!==0x1)throw new common_1[(_0x1bd405(0x161))](_0x1bd405(0xe6),common_1[_0x1bd405(0x121)][_0x1bd405(0x16d)]);return{'model3Count':Number(signInModel3Count),'model4Count':Number(signInModel4Count),'drawMjCount':Number(signInMjDrawToken)};}async[_0x5977dd(0x13b)](){const _0x592f07=_0x5977dd,_0x12bbd5=_0x592f07(0x19c),_0x21e784=await fetch(_0x12bbd5,{}),_0x13e214=await _0x21e784['json'](),{success:success=!![],message:_0x4c0e31}=_0x13e214;common_1[_0x592f07(0x118)]['error'](_0x592f07(0x16f)),common_1[_0x592f07(0x118)]['error'](_0x592f07(0x136)),common_1[_0x592f07(0x118)][_0x592f07(0x19d)](_0x592f07(0x19b)),common_1['Logger']['error']('缺失ip信息'),common_1[_0x592f07(0x118)]['debug'](_0x592f07(0x176));}async[_0x5977dd(0xf9)](){const _0x22da4b=_0x5977dd,{baiduTextStatus:baiduTextStatus=0x0,baiduTextAccessToken:_0x3a4fc9,nineaiBuiltInSensitiveStatus:nineaiBuiltInSensitiveStatus=0x0,nineaiBuiltInSensitiveApiBase:_0xecf89c,nineaiBuiltInSensitiveAuthKey:_0x1b3d74}=await this['getConfigs']([_0x22da4b(0x124),_0x22da4b(0x110),_0x22da4b(0x17b),_0x22da4b(0xf5),'nineaiBuiltInSensitiveAuthKey']);if(Number(baiduTextStatus)===0x1)return{'useType':_0x22da4b(0x19e),'baiduTextAccessToken':_0x3a4fc9};if(Number(nineaiBuiltInSensitiveStatus)===0x1)return{'useType':_0x22da4b(0x181),'nineaiBuiltInSensitiveApiBase':_0xecf89c,'nineaiBuiltInSensitiveAuthKey':_0x1b3d74};return null;}};GlobalConfigService=__decorate([(0x0,common_1[_0x5977dd(0x187)])(),__param(0x0,(0x0,typeorm_1[_0x5977dd(0x189)])(config_entity_1[_0x5977dd(0x14a)])),__param(0x1,(0x0,typeorm_1['InjectRepository'])(chatLog_entity_1['ChatLogEntity'])),__metadata(_0x5977dd(0xfe),[typeorm_2['Repository'],typeorm_2[_0x5977dd(0x105)],models_service_1[_0x5977dd(0x190)]])],GlobalConfigService),exports[_0x5977dd(0x165)]=GlobalConfigService; |