mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-09-26 21:26:38 +08:00
1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
'use strict';const _0x41de9c=_0x2ee7;(function(_0x596638,_0x33fbd6){const _0x15ca03=_0x2ee7,_0x55f66d=_0x596638();while(!![]){try{const _0x3ea2f4=-parseInt(_0x15ca03(0x135))/0x1*(parseInt(_0x15ca03(0x159))/0x2)+-parseInt(_0x15ca03(0x106))/0x3+parseInt(_0x15ca03(0x100))/0x4+parseInt(_0x15ca03(0xf8))/0x5+parseInt(_0x15ca03(0x116))/0x6*(-parseInt(_0x15ca03(0xf6))/0x7)+-parseInt(_0x15ca03(0x13b))/0x8+parseInt(_0x15ca03(0x139))/0x9*(parseInt(_0x15ca03(0xf2))/0xa);if(_0x3ea2f4===_0x33fbd6)break;else _0x55f66d['push'](_0x55f66d['shift']());}catch(_0x3b123d){_0x55f66d['push'](_0x55f66d['shift']());}}}(_0x2c72,0x73a2b));var __decorate=this&&this['__decorate']||function(_0x57be58,_0x434fa6,_0x423d0b,_0x3df592){const _0x11ed7f=_0x2ee7;var _0x526b41=arguments[_0x11ed7f(0x12e)],_0x34084f=_0x526b41<0x3?_0x434fa6:_0x3df592===null?_0x3df592=Object[_0x11ed7f(0x147)](_0x434fa6,_0x423d0b):_0x3df592,_0x3b1383;if(typeof Reflect==='object'&&typeof Reflect[_0x11ed7f(0x133)]===_0x11ed7f(0x10c))_0x34084f=Reflect[_0x11ed7f(0x133)](_0x57be58,_0x434fa6,_0x423d0b,_0x3df592);else{for(var _0x2b7b94=_0x57be58['length']-0x1;_0x2b7b94>=0x0;_0x2b7b94--)if(_0x3b1383=_0x57be58[_0x2b7b94])_0x34084f=(_0x526b41<0x3?_0x3b1383(_0x34084f):_0x526b41>0x3?_0x3b1383(_0x434fa6,_0x423d0b,_0x34084f):_0x3b1383(_0x434fa6,_0x423d0b))||_0x34084f;}return _0x526b41>0x3&&_0x34084f&&Object[_0x11ed7f(0xf7)](_0x434fa6,_0x423d0b,_0x34084f),_0x34084f;},__metadata=this&&this[_0x41de9c(0x126)]||function(_0x24253a,_0x1c8ac5){const _0x4bd71a=_0x41de9c;if(typeof Reflect===_0x4bd71a(0x118)&&typeof Reflect[_0x4bd71a(0x151)]==='function')return Reflect[_0x4bd71a(0x151)](_0x24253a,_0x1c8ac5);},__param=this&&this[_0x41de9c(0x130)]||function(_0x4cb22f,_0x48f718){return function(_0x23a750,_0x353b0f){_0x48f718(_0x23a750,_0x353b0f,_0x4cb22f);};};function _0x2ee7(_0x5e71af,_0x5727dc){const _0x2c72e0=_0x2c72();return _0x2ee7=function(_0x2ee763,_0x53436f){_0x2ee763=_0x2ee763-0xf1;let _0x5b1de5=_0x2c72e0[_0x2ee763];return _0x5b1de5;},_0x2ee7(_0x5e71af,_0x5727dc);}Object[_0x41de9c(0xf7)](exports,_0x41de9c(0x13e),{'value':!![]}),exports['SalesService']=void 0x0;function _0x2c72(){const _0x575948=['HttpStatus','formatCreateOrUpdateDate','@nestjs/typeorm','userId','userInfo','138934oFdZdI','HttpException','update','salesAllowDrawMoney','salesOutletName','BAD_REQUEST','20eGSlrj','assign','Like','SalesRecordsEntity','5242342UTxlUn','defineProperty','835365tctGHr','find','salesBaseTitle','salesOrder','error:\x20','log','creaetUserBaseSalesInfo','totalAmount,\x20distributionBalance:\x20','1873008WYirNc','inviterUserId','salesBaseRatio','修改成功','findAndCount','./salesOrder.entity','1851084HPpBbM','auditUserId','InjectRepository','创建提现工单失败','globalConfigService','DESC','function','default','findOne','getConfigs','typeorm','createOrder','userEntity','withdrawalChannels','role','inviteeUsername','6xLbRgQ','@nestjs/common','object','updateUserSales','hideString','salesUserList','super','该工单已审核过','审核失败','count','提现金额必须为数字且大于0','salesRecordsEntity','inviterAvatar','avatar','inviteeEmail','./salesUsers.entity','__metadata','提现金额最低必须为','saveCommissionAmount','forEach','auditUserName','drawMoneyOrder','../user/user.entity','../globalConfig/globalConfig.service','length','save','__param','UserEntity','email','decorate','orderStatus','11NvMHlx','getMineRecords','user','includes','12196791PsZuMK','performanceRatio','5936072NhFcRB','salesUsersEntity','GlobalConfigService','__esModule','xxxxxxx','plus','inviteRecords','withdrawalAmount','map','toNumber','changeUserBaseSalesInfo','审核状态错误','getOwnPropertyDescriptor','./salesRecords.entity','../../common/utils','createSalesRecords','username','getMineAccount','decimal.js','inviteeUserId','salesOrderEntity','Repository','metadata','inviterUsername','inviterEmail'];_0x2c72=function(){return _0x575948;};return _0x2c72();}const globalConfig_service_1=require(_0x41de9c(0x12d)),common_1=require(_0x41de9c(0x117)),salesUsers_entity_1=require(_0x41de9c(0x125)),typeorm_1=require(_0x41de9c(0x156)),typeorm_2=require(_0x41de9c(0x110)),salesRecords_entity_1=require(_0x41de9c(0x148)),utils_1=require(_0x41de9c(0x149)),user_entity_1=require(_0x41de9c(0x12c)),decimal_js_1=require(_0x41de9c(0x14d)),salesOrder_entity_1=require(_0x41de9c(0x105));let SalesService=class SalesService{constructor(_0x2e4c14,_0x4ba45b,_0x1ada7b,_0x34c093,_0x7a2256){const _0xdd1aa2=_0x41de9c;this['salesUsersEntity']=_0x2e4c14,this['salesRecordsEntity']=_0x4ba45b,this[_0xdd1aa2(0x112)]=_0x1ada7b,this[_0xdd1aa2(0x14f)]=_0x34c093,this[_0xdd1aa2(0x10a)]=_0x7a2256;}async[_0x41de9c(0x14c)](_0x477ba2){const _0x5c0585=_0x41de9c;try{const {id:_0x313582}=_0x477ba2[_0x5c0585(0x137)];let _0x2a0f60=await this[_0x5c0585(0x13c)][_0x5c0585(0x10e)]({'where':{'userId':_0x313582}});if(!_0x2a0f60){const {salesBaseRatio:salesBaseRatio=0xa,salesBaseTitle:salesBaseTitle='新秀分销商'}=await this['globalConfigService'][_0x5c0585(0x10f)]([_0x5c0585(0x102),_0x5c0585(0xfa)]);_0x2a0f60=await this[_0x5c0585(0xfe)]({'userId':_0x313582,'performanceRatio':Number(salesBaseRatio),'salesOutletName':salesBaseTitle});}const _0x501a6a=(0x0,utils_1[_0x5c0585(0x155)])(_0x2a0f60),_0x2df994=await this[_0x5c0585(0x121)]['count']({'where':{'inviterUserId':_0x313582}}),_0xf0f9b0=await this[_0x5c0585(0x112)][_0x5c0585(0x10e)]({'where':{'id':_0x313582}})||{'inviteLinkCount':0x0,'inviteCode':_0x5c0585(0x13f)},{inviteLinkCount:_0x2587cd,inviteCode:_0x4f320d}=_0xf0f9b0,_0x2d96cf=await this['userEntity'][_0x5c0585(0x11f)]({'where':{'invitedBy':_0x4f320d}});return Object['assign'](Object[_0x5c0585(0xf3)]({},_0x501a6a),{'orderCount':_0x2df994,'inviteCount':_0x2d96cf,'inviteLinkCount':_0x2587cd});}catch(_0x41ca6b){console[_0x5c0585(0xfd)](_0x5c0585(0xfc),_0x41ca6b);}}async[_0x41de9c(0x136)](_0x57d845,_0x5480e4){const _0x35831=_0x41de9c;try{const {id:_0x248073}=_0x57d845[_0x35831(0x137)],{page:_0x5cac24,size:_0x58cfe3}=_0x5480e4,[_0x3b6e3c,_0xb8fb48]=await this[_0x35831(0x121)]['findAndCount']({'where':{'inviterUserId':_0x248073},'order':{'createdAt':_0x35831(0x10b)},'skip':(_0x5cac24-0x1)*_0x58cfe3,'take':_0x58cfe3});return{'rows':(0x0,utils_1[_0x35831(0x155)])(_0x3b6e3c),'count':_0xb8fb48};}catch(_0x5be7e5){console['log'](_0x35831(0xfc),_0x5be7e5);}}async[_0x41de9c(0x141)](_0x2e771f,_0x55ac92){const _0xf96ab2=_0x41de9c;try{const {page:_0x1c0cc4,size:_0x56ff6a,orderId:_0x5651a5,orderPrice:_0x21faa3}=_0x55ac92;let _0x3fb727={};_0x5651a5&&(_0x3fb727={'orderId':_0x5651a5}),_0x21faa3&&(_0x3fb727={'orderPrice':_0x21faa3});const [_0x14e2ca,_0x4a750d]=await this[_0xf96ab2(0x121)][_0xf96ab2(0x104)]({'where':_0x3fb727,'order':{'createdAt':_0xf96ab2(0x10b)},'skip':(_0x1c0cc4-0x1)*_0x56ff6a,'take':_0x56ff6a}),_0x1f8215=[];_0x14e2ca['map'](_0x177b60=>{const _0x28b2b1=_0xf96ab2;_0x1f8215['push'](_0x177b60['inviterUserId']),_0x1f8215['push'](_0x177b60[_0x28b2b1(0x14e)]);});const _0x3f35f9=await this[_0xf96ab2(0x112)]['find']({'where':{'id':(0x0,typeorm_2['In'])(_0x1f8215)}});return _0x14e2ca['forEach'](_0x62ebed=>{const _0x39f4fe=_0xf96ab2,_0x312471=_0x3f35f9[_0x39f4fe(0xf9)](_0x1e9038=>_0x1e9038['id']===_0x62ebed[_0x39f4fe(0x101)]),_0x348a38=_0x3f35f9[_0x39f4fe(0xf9)](_0x3eeadc=>_0x3eeadc['id']===_0x62ebed['inviteeUserId']),{username:_0x1bce1a,email:_0x35b2dc,avatar:_0x27bae6}=_0x3f35f9[_0x39f4fe(0xf9)](_0x177527=>_0x177527['id']===_0x62ebed[_0x39f4fe(0x101)]);_0x62ebed[_0x39f4fe(0x152)]=_0x312471===null||_0x312471===void 0x0?void 0x0:_0x312471['username'],_0x62ebed[_0x39f4fe(0x153)]=_0x312471===null||_0x312471===void 0x0?void 0x0:_0x312471[_0x39f4fe(0x132)],_0x62ebed[_0x39f4fe(0x122)]=_0x312471===null||_0x312471===void 0x0?void 0x0:_0x312471[_0x39f4fe(0x123)],_0x62ebed[_0x39f4fe(0x115)]=_0x348a38===null||_0x348a38===void 0x0?void 0x0:_0x348a38[_0x39f4fe(0x14b)],_0x62ebed['inviteeEmail']=_0x348a38===null||_0x348a38===void 0x0?void 0x0:_0x348a38[_0x39f4fe(0x132)],_0x62ebed['inviteeAvatar']=_0x348a38===null||_0x348a38===void 0x0?void 0x0:_0x348a38['avatar'];}),_0x2e771f[_0xf96ab2(0x137)][_0xf96ab2(0x114)]!=='super'&&_0x14e2ca[_0xf96ab2(0x129)](_0x2b77ff=>{const _0x4ead23=_0xf96ab2;_0x2b77ff[_0x4ead23(0x153)]=_0x2b77ff[_0x4ead23(0x153)]?(0x0,utils_1[_0x4ead23(0x11a)])(_0x2b77ff[_0x4ead23(0x153)]):'',_0x2b77ff[_0x4ead23(0x124)]=_0x2b77ff[_0x4ead23(0x124)]?(0x0,utils_1[_0x4ead23(0x11a)])(_0x2b77ff['inviteeEmail']):'';}),{'rows':(0x0,utils_1[_0xf96ab2(0x155)])(_0x14e2ca),'count':_0x4a750d};}catch(_0x463778){console['log'](_0xf96ab2(0xfc),_0x463778);}}async[_0x41de9c(0xfe)](_0x1d4c8f){const _0x1c6933=_0x41de9c,{userId:_0x211f66,performanceRatio:_0x16aac7,salesOutletName:_0x1d2ac9}=_0x1d4c8f;return await this[_0x1c6933(0x13c)][_0x1c6933(0x12f)]({'userId':_0x211f66,'performanceRatio':_0x16aac7,'salesOutletName':_0x1d2ac9});}async[_0x41de9c(0x145)](_0x41ff06){const _0x4b1ec2=_0x41de9c;return await this['salesUsersEntity'][_0x4b1ec2(0x12f)](_0x41ff06);}async[_0x41de9c(0x14a)](_0xd2634e){const _0x406cb9=_0x41de9c;return await this['salesRecordsEntity'][_0x406cb9(0x12f)](_0xd2634e);}async[_0x41de9c(0x128)](_0x2e49a1,_0x3481b8){const _0x2d0ae0=_0x41de9c,_0x121bb8=await this[_0x2d0ae0(0x13c)][_0x2d0ae0(0x10e)]({'where':{'userId':_0x2e49a1}});if(!_0x121bb8)return;const {totalAmount:_0x249965,distributionBalance:_0x5a9d91}=_0x121bb8;return console[_0x2d0ae0(0xfd)](_0x2d0ae0(0xff),_0x249965,_0x5a9d91),await this['salesUsersEntity'][_0x2d0ae0(0x15b)]({'userId':_0x2e49a1},{'totalAmount':new decimal_js_1['default'](_0x249965)[_0x2d0ae0(0x140)](_0x3481b8)[_0x2d0ae0(0x144)](),'distributionBalance':new decimal_js_1[(_0x2d0ae0(0x10d))](_0x5a9d91)[_0x2d0ae0(0x140)](_0x3481b8)[_0x2d0ae0(0x144)]()});}async['appForMoney'](_0x2ed9eb,_0x3c0a58){const _0x96db20=_0x41de9c,{id:_0x537729}=_0x2ed9eb['user'],{withdrawalAmount:_0x554140,withdrawalChannels:_0x36a164,contactInformation:_0x372217,remark:_0x3f5b30}=_0x3c0a58,_0xc6041=await this[_0x96db20(0x10a)][_0x96db20(0x10f)]([_0x96db20(0x15c)])||0xa;if(typeof _0x554140!=='number'||_0x554140<=0x0)throw new common_1[(_0x96db20(0x15a))](_0x96db20(0x120),common_1[_0x96db20(0x154)][_0x96db20(0xf1)]);if(Number(_0x554140)<Number(_0xc6041))throw new common_1[(_0x96db20(0x15a))](_0x96db20(0x127)+_0xc6041+'元',common_1['HttpStatus'][_0x96db20(0xf1)]);const _0x702271=await this[_0x96db20(0x13c)]['findOne']({'where':{'userId':_0x537729}}),{distributionBalance:_0xb6ee0b,drawMoneyIn:_0x16630d}=_0x702271;if(Number(_0xb6ee0b)<Number(_0x554140))throw new common_1[(_0x96db20(0x15a))]('提现金额不足',common_1[_0x96db20(0x154)][_0x96db20(0xf1)]);const _0x222030=new decimal_js_1['default'](_0xb6ee0b)['minus'](_0x554140)[_0x96db20(0x144)](),_0x2b82fa={'userId':_0x537729,'withdrawalAmount':_0x554140,'orderStatus':0x0,'auditStatus':0x0,'withdrawalChannels':_0x36a164,'contactInformation':_0x372217,'remark':_0x3f5b30};await this[_0x96db20(0x111)](_0x2b82fa);const _0x1fe11e=await this[_0x96db20(0x13c)][_0x96db20(0x15b)]({'userId':_0x537729},{'distributionBalance':_0x222030,'drawMoneyIn':new decimal_js_1[(_0x96db20(0x10d))](_0x16630d)[_0x96db20(0x140)](_0x554140)[_0x96db20(0x144)]()});}async[_0x41de9c(0x12b)](_0x48128f,_0x5cffd3){const _0x44ba6a=_0x41de9c,{id:_0x59b6b3}=_0x48128f[_0x44ba6a(0x137)],{page:_0x130952,size:_0x216b9b}=_0x5cffd3,[_0x2ed1b6,_0x1bfd69]=await this['salesOrderEntity']['findAndCount']({'where':{'userId':_0x59b6b3},'order':{'createdAt':_0x44ba6a(0x10b)},'skip':(_0x130952-0x1)*_0x216b9b,'take':_0x216b9b}),_0x568ef2=_0x2ed1b6['map'](_0x43217b=>_0x43217b[_0x44ba6a(0x107)]),_0x2470ee=await this['userEntity'][_0x44ba6a(0xf9)]({'where':{'id':(0x0,typeorm_2['In'])(_0x568ef2)}});return _0x2ed1b6[_0x44ba6a(0x129)](_0x22b74a=>{const _0x6d40ae=_0x44ba6a,_0x5e36a3=_0x2470ee[_0x6d40ae(0xf9)](_0x17f199=>_0x17f199['id']===_0x22b74a['auditUserId']);_0x22b74a[_0x6d40ae(0x12a)]=_0x5e36a3?_0x5e36a3[_0x6d40ae(0x14b)]:'';}),{'rows':(0x0,utils_1[_0x44ba6a(0x155)])(_0x2ed1b6),'count':_0x1bfd69};}async[_0x41de9c(0xfb)](_0x47964b,_0x1e9dcc){const _0x2f104b=_0x41de9c,{page:_0x33419d,size:_0x4f2b9c}=_0x1e9dcc,_0x4d0ec1={};_0x1e9dcc[_0x2f104b(0x134)]!==undefined&&_0x1e9dcc['orderStatus']!==''&&(_0x4d0ec1[_0x2f104b(0x134)]=_0x1e9dcc[_0x2f104b(0x134)]),_0x1e9dcc[_0x2f104b(0x113)]&&(_0x4d0ec1[_0x2f104b(0x113)]=_0x1e9dcc[_0x2f104b(0x113)]);const [_0x4178ac,_0x59607f]=await this[_0x2f104b(0x14f)]['findAndCount']({'where':_0x4d0ec1,'order':{'createdAt':'DESC'},'skip':(_0x33419d-0x1)*_0x4f2b9c,'take':_0x4f2b9c}),_0x249ae2=_0x4178ac['map'](_0x55eeec=>_0x55eeec[_0x2f104b(0x157)]),_0x45528b=await this[_0x2f104b(0x112)][_0x2f104b(0xf9)]({'where':{'id':(0x0,typeorm_2['In'])(_0x249ae2)}});return _0x4178ac[_0x2f104b(0x129)](_0x423385=>{const _0x1a7e68=_0x2f104b,_0x2e2eb8=_0x45528b[_0x1a7e68(0xf9)](_0x2da964=>_0x2da964['id']===_0x423385[_0x1a7e68(0x157)]);if(_0x2e2eb8){const {username:_0x3c826b,email:_0x321f24,avatar:_0x393c53}=_0x2e2eb8;_0x423385[_0x1a7e68(0x158)]={'username':_0x3c826b,'avatar':_0x393c53,'email':(0x0,utils_1[_0x1a7e68(0x11a)])(_0x321f24)};}}),{'rows':(0x0,utils_1[_0x2f104b(0x155)])(_0x4178ac),'count':_0x59607f};}async[_0x41de9c(0x111)](_0x2cfb53){const _0x5989e9=_0x41de9c;try{return await this['salesOrderEntity']['save'](_0x2cfb53);}catch(_0x5a3b7a){console[_0x5989e9(0xfd)]('error:\x20',_0x5a3b7a);throw new common_1[(_0x5989e9(0x15a))](_0x5989e9(0x109),common_1[_0x5989e9(0x154)][_0x5989e9(0xf1)]);}}async['auditOrder'](_0x3414e9,_0x3316c2){const _0x3de0f8=_0x41de9c;try{const {id:_0x226e24}=_0x3414e9[_0x3de0f8(0x137)],{id:_0x24dd58,status:_0x5d9bbf}=_0x3316c2;if(![0x1,-0x1][_0x3de0f8(0x138)](_0x5d9bbf))throw new common_1[(_0x3de0f8(0x15a))](_0x3de0f8(0x146),common_1[_0x3de0f8(0x154)]['BAD_REQUEST']);const _0x367a14=await this[_0x3de0f8(0x14f)]['findOne']({'where':{'id':_0x24dd58}});if(_0x367a14[_0x3de0f8(0x134)]!==0x0)throw new common_1[(_0x3de0f8(0x15a))](_0x3de0f8(0x11d),common_1['HttpStatus']['BAD_REQUEST']);const _0x59c93c=await this[_0x3de0f8(0x13c)][_0x3de0f8(0x10e)]({'where':{'userId':_0x367a14[_0x3de0f8(0x157)]}}),{withdrawalAmount:_0xcc6155,drawMoneyIn:_0x46607b}=_0x59c93c,_0x143ab6=new decimal_js_1[(_0x3de0f8(0x10d))](_0xcc6155)['plus'](_0x367a14['withdrawalAmount'])['toNumber'](),_0x4f48d6=new decimal_js_1[(_0x3de0f8(0x10d))](_0x46607b)['minus'](_0x367a14[_0x3de0f8(0x142)])['toNumber']();return await this[_0x3de0f8(0x13c)][_0x3de0f8(0x15b)]({'userId':_0x367a14[_0x3de0f8(0x157)]},{'withdrawalAmount':_0x143ab6,'drawMoneyIn':_0x4f48d6}),await this[_0x3de0f8(0x14f)]['update']({'id':_0x24dd58},{'orderStatus':_0x5d9bbf,'auditStatus':_0x5d9bbf,'auditUserId':_0x226e24,'paymentStatus':_0x5d9bbf}),'审核完成';}catch(_0x11e226){console[_0x3de0f8(0xfd)]('error:\x20',_0x11e226);throw new common_1[(_0x3de0f8(0x15a))](_0x3de0f8(0x11e),common_1['HttpStatus'][_0x3de0f8(0xf1)]);}}async[_0x41de9c(0x11b)](_0x52e29a,_0x53fb8b){const _0x2e193a=_0x41de9c,{page:_0x4c159e,size:_0x337792,salesOutletName:_0x37a50e,performanceRatio:_0x21e2b2}=_0x53fb8b,_0x38a620={};_0x37a50e&&(_0x38a620[_0x2e193a(0x15d)]=(0x0,typeorm_2[_0x2e193a(0xf4)])('%'+_0x37a50e+'%')),_0x21e2b2&&(_0x38a620[_0x2e193a(0x13a)]=_0x21e2b2);const [_0x58067e,_0x11dd48]=await this[_0x2e193a(0x13c)][_0x2e193a(0x104)]({'where':_0x38a620,'order':{'id':_0x2e193a(0x10b)},'skip':(_0x4c159e-0x1)*_0x337792,'take':_0x337792}),_0x100b05=_0x58067e[_0x2e193a(0x143)](_0x73aa68=>_0x73aa68[_0x2e193a(0x157)]),_0x2d833e=await this['userEntity'][_0x2e193a(0xf9)]({'where':{'id':(0x0,typeorm_2['In'])(_0x100b05)}});return _0x58067e[_0x2e193a(0x129)](_0x564bd6=>{const _0x7c9a45=_0x2e193a,_0x359cd4=_0x2d833e[_0x7c9a45(0xf9)](_0x3c87af=>_0x3c87af['id']===_0x564bd6[_0x7c9a45(0x157)]);_0x564bd6[_0x7c9a45(0x158)]=_0x359cd4?_0x359cd4:{};}),_0x52e29a[_0x2e193a(0x137)]['role']!==_0x2e193a(0x11c)&&_0x58067e[_0x2e193a(0x129)](_0x498d45=>{const _0x19e848=_0x2e193a;var _0x270b88,_0x53fdc6;_0x498d45[_0x19e848(0x158)]['email']=((_0x270b88=_0x498d45['userInfo'])===null||_0x270b88===void 0x0?void 0x0:_0x270b88[_0x19e848(0x132)])?(0x0,utils_1['hideString'])((_0x53fdc6=_0x498d45[_0x19e848(0x158)])===null||_0x53fdc6===void 0x0?void 0x0:_0x53fdc6[_0x19e848(0x132)]):'';}),{'rows':_0x58067e,'count':_0x11dd48};}async[_0x41de9c(0x119)](_0x7dec7d,_0x3027d8){const _0x496d4b=_0x41de9c,{performanceRatio:_0x38f826,salesOutletName:_0x4d580c,userId:_0x520a04}=_0x3027d8,_0x2a5e54=await this[_0x496d4b(0x13c)][_0x496d4b(0x10e)]({'where':{'userId':_0x520a04}});if(!_0x2a5e54)throw new common_1[(_0x496d4b(0x15a))]('用户不存在',common_1[_0x496d4b(0x154)][_0x496d4b(0xf1)]);const _0x2b7332=await this['salesUsersEntity']['update']({'userId':_0x520a04},{'performanceRatio':_0x38f826,'salesOutletName':_0x4d580c});if(_0x2b7332['affected']>0x0)return _0x496d4b(0x103);else throw new common_1['HttpException']('修改失败',common_1[_0x496d4b(0x154)]['BAD_REQUEST']);}};SalesService=__decorate([(0x0,common_1['Injectable'])(),__param(0x0,(0x0,typeorm_1[_0x41de9c(0x108)])(salesUsers_entity_1['SalesUsersEntity'])),__param(0x1,(0x0,typeorm_1[_0x41de9c(0x108)])(salesRecords_entity_1[_0x41de9c(0xf5)])),__param(0x2,(0x0,typeorm_1['InjectRepository'])(user_entity_1[_0x41de9c(0x131)])),__param(0x3,(0x0,typeorm_1[_0x41de9c(0x108)])(salesOrder_entity_1['SalesOrderEntity'])),__metadata('design:paramtypes',[typeorm_2['Repository'],typeorm_2['Repository'],typeorm_2['Repository'],typeorm_2[_0x41de9c(0x150)],globalConfig_service_1[_0x41de9c(0x13d)]])],SalesService),exports['SalesService']=SalesService; |