Built motion from commit 14588770.|2.5.38
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index a81c8eb..6c6a6dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa536=['GetDynamics365Account','Dynamics365Account','findAll','options','attributes','limit','map','include','model','find','where','ShowDynamics365Account','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','request','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','error','message','result','catch'];(function(_0x23d2a0,_0x516174){var _0x409e80=function(_0x432940){while(--_0x432940){_0x23d2a0['push'](_0x23d2a0['shift']());}};_0x409e80(++_0x516174);}(_0xa536,0x73));var _0x6a53=function(_0x2dc18e,_0x54ca5c){_0x2dc18e=_0x2dc18e-0x0;var _0x5b5ce4=_0xa536[_0x2dc18e];return _0x5b5ce4;};'use strict';var _=require(_0x6a53('0x0'));var util=require(_0x6a53('0x1'));var moment=require(_0x6a53('0x2'));var BPromise=require(_0x6a53('0x3'));var rs=require(_0x6a53('0x4'));var fs=require('fs');var Redis=require(_0x6a53('0x5'));var db=require(_0x6a53('0x6'))['db'];var utils=require(_0x6a53('0x7'));var logger=require(_0x6a53('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x6a53('0x9'));var client=jayson['client'][_0x6a53('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3a57d7,_0x31386e,_0x3cbfb5){return new BPromise(function(_0x281de4,_0xa6f524){return client[_0x6a53('0xb')](_0x3a57d7,_0x3cbfb5)['then'](function(_0x47ce0e){logger[_0x6a53('0xc')](_0x6a53('0xd'),_0x31386e,_0x6a53('0xe'));logger[_0x6a53('0xf')](_0x6a53('0x10'),_0x31386e,'request\x20sent',JSON['stringify'](_0x47ce0e));if(_0x47ce0e['error']){if(_0x47ce0e[_0x6a53('0x11')]['code']===0x1f4){logger['error'](_0x6a53('0xd'),_0x31386e,_0x47ce0e[_0x6a53('0x11')][_0x6a53('0x12')]);return _0xa6f524(_0x47ce0e['error'][_0x6a53('0x12')]);}logger[_0x6a53('0x11')](_0x6a53('0xd'),_0x31386e,_0x47ce0e[_0x6a53('0x11')][_0x6a53('0x12')]);return _0x281de4(_0x47ce0e['error'][_0x6a53('0x12')]);}else{logger[_0x6a53('0xc')]('Dynamics365Account,\x20%s,\x20%s',_0x31386e,_0x6a53('0xe'));_0x281de4(_0x47ce0e[_0x6a53('0x13')][_0x6a53('0x12')]);}})[_0x6a53('0x14')](function(_0x33ba53){logger[_0x6a53('0x11')](_0x6a53('0xd'),_0x31386e,_0x33ba53);_0xa6f524(_0x33ba53);});});}exports[_0x6a53('0x15')]=function(_0x2ac66d){var _0x777d0b=this;return new Promise(function(_0x5255c9,_0x1c4320){return db[_0x6a53('0x16')][_0x6a53('0x17')]({'raw':_0x2ac66d[_0x6a53('0x18')]?_0x2ac66d['options']['raw']===undefined?!![]:![]:!![],'where':_0x2ac66d[_0x6a53('0x18')]?_0x2ac66d['options']['where']||null:null,'attributes':_0x2ac66d[_0x6a53('0x18')]?_0x2ac66d[_0x6a53('0x18')][_0x6a53('0x19')]||null:null,'limit':_0x2ac66d[_0x6a53('0x18')]?_0x2ac66d[_0x6a53('0x18')][_0x6a53('0x1a')]||null:null,'include':_0x2ac66d[_0x6a53('0x18')]?_0x2ac66d[_0x6a53('0x18')]['include']?_[_0x6a53('0x1b')](_0x2ac66d[_0x6a53('0x18')][_0x6a53('0x1c')],function(_0x55ca76){return{'model':db[_0x55ca76['model']],'as':_0x55ca76['as'],'attributes':_0x55ca76[_0x6a53('0x19')],'include':_0x55ca76['include']?_[_0x6a53('0x1b')](_0x55ca76[_0x6a53('0x1c')],function(_0x193c09){return{'model':db[_0x193c09[_0x6a53('0x1d')]],'as':_0x193c09['as'],'attributes':_0x193c09['attributes'],'include':_0x193c09[_0x6a53('0x1c')]?_[_0x6a53('0x1b')](_0x193c09[_0x6a53('0x1c')],function(_0x560293){return{'model':db[_0x560293['model']],'as':_0x560293['as'],'attributes':_0x560293[_0x6a53('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x39c6f1){logger[_0x6a53('0xc')]('GetDynamics365Account',_0x2ac66d);logger['debug'](_0x6a53('0x15'),_0x2ac66d,JSON['stringify'](_0x39c6f1));_0x5255c9(_0x39c6f1);})[_0x6a53('0x14')](function(_0x4caecd){logger['error'](_0x6a53('0x15'),_0x4caecd[_0x6a53('0x12')],_0x2ac66d);_0x1c4320(_0x777d0b['error'](0x1f4,_0x4caecd['message']));});});};exports['ShowDynamics365Account']=function(_0x13e539){var _0x21d8fb=this;return new Promise(function(_0x1a6ebf,_0x109a2c){return db['Dynamics365Account'][_0x6a53('0x1e')]({'raw':_0x13e539['options']?_0x13e539[_0x6a53('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x13e539[_0x6a53('0x18')]?_0x13e539[_0x6a53('0x18')][_0x6a53('0x1f')]||null:null,'attributes':_0x13e539['options']?_0x13e539[_0x6a53('0x18')]['attributes']||null:null,'include':_0x13e539[_0x6a53('0x18')]?_0x13e539[_0x6a53('0x18')][_0x6a53('0x1c')]?_[_0x6a53('0x1b')](_0x13e539['options'][_0x6a53('0x1c')],function(_0x28d198){return{'model':db[_0x28d198[_0x6a53('0x1d')]],'as':_0x28d198['as'],'attributes':_0x28d198[_0x6a53('0x19')],'include':_0x28d198[_0x6a53('0x1c')]?_[_0x6a53('0x1b')](_0x28d198['include'],function(_0x553e9d){return{'model':db[_0x553e9d['model']],'as':_0x553e9d['as'],'attributes':_0x553e9d[_0x6a53('0x19')],'include':_0x553e9d[_0x6a53('0x1c')]?_[_0x6a53('0x1b')](_0x553e9d[_0x6a53('0x1c')],function(_0x4476ed){return{'model':db[_0x4476ed[_0x6a53('0x1d')]],'as':_0x4476ed['as'],'attributes':_0x4476ed[_0x6a53('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3a1dfe){logger[_0x6a53('0xc')](_0x6a53('0x20'),_0x13e539);logger[_0x6a53('0xf')]('ShowDynamics365Account',_0x13e539,JSON[_0x6a53('0x21')](_0x3a1dfe));_0x1a6ebf(_0x3a1dfe);})[_0x6a53('0x14')](function(_0x48754a){logger[_0x6a53('0x11')]('ShowDynamics365Account',_0x48754a[_0x6a53('0x12')],_0x13e539);_0x109a2c(_0x21d8fb[_0x6a53('0x11')](0x1f4,_0x48754a[_0x6a53('0x12')]));});});};
\ No newline at end of file
+var _0x9eb5=['model','attributes','ShowDynamics365Account','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','GetDynamics365Account','Dynamics365Account','findAll','options','raw','where','limit','include','map'];(function(_0x52bc58,_0x502bd0){var _0x2311d3=function(_0x5ea674){while(--_0x5ea674){_0x52bc58['push'](_0x52bc58['shift']());}};_0x2311d3(++_0x502bd0);}(_0x9eb5,0x1e5));var _0x59eb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9eb5[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x59eb('0x0'));var util=require(_0x59eb('0x1'));var moment=require(_0x59eb('0x2'));var BPromise=require(_0x59eb('0x3'));var rs=require(_0x59eb('0x4'));var fs=require('fs');var Redis=require(_0x59eb('0x5'));var db=require(_0x59eb('0x6'))['db'];var utils=require(_0x59eb('0x7'));var logger=require(_0x59eb('0x8'))(_0x59eb('0x9'));var config=require(_0x59eb('0xa'));var jayson=require(_0x59eb('0xb'));var client=jayson['client'][_0x59eb('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2220f2,_0x34d0f7,_0x588dca){return new BPromise(function(_0x309b49,_0x3d5d1c){return client['request'](_0x2220f2,_0x588dca)[_0x59eb('0xd')](function(_0x34f2fc){logger['info'](_0x59eb('0xe'),_0x34d0f7,_0x59eb('0xf'));logger[_0x59eb('0x10')](_0x59eb('0x11'),_0x34d0f7,_0x59eb('0xf'),JSON[_0x59eb('0x12')](_0x34f2fc));if(_0x34f2fc[_0x59eb('0x13')]){if(_0x34f2fc[_0x59eb('0x13')]['code']===0x1f4){logger[_0x59eb('0x13')]('Dynamics365Account,\x20%s,\x20%s',_0x34d0f7,_0x34f2fc['error'][_0x59eb('0x14')]);return _0x3d5d1c(_0x34f2fc[_0x59eb('0x13')][_0x59eb('0x14')]);}logger[_0x59eb('0x13')]('Dynamics365Account,\x20%s,\x20%s',_0x34d0f7,_0x34f2fc['error'][_0x59eb('0x14')]);return _0x309b49(_0x34f2fc['error']['message']);}else{logger[_0x59eb('0x15')](_0x59eb('0xe'),_0x34d0f7,_0x59eb('0xf'));_0x309b49(_0x34f2fc[_0x59eb('0x16')][_0x59eb('0x14')]);}})[_0x59eb('0x17')](function(_0x333009){logger['error'](_0x59eb('0xe'),_0x34d0f7,_0x333009);_0x3d5d1c(_0x333009);});});}exports[_0x59eb('0x18')]=function(_0x580cb0){var _0x539dea=this;return new Promise(function(_0x43eb95,_0x9d5d52){return db[_0x59eb('0x19')][_0x59eb('0x1a')]({'raw':_0x580cb0[_0x59eb('0x1b')]?_0x580cb0['options'][_0x59eb('0x1c')]===undefined?!![]:![]:!![],'where':_0x580cb0[_0x59eb('0x1b')]?_0x580cb0['options'][_0x59eb('0x1d')]||null:null,'attributes':_0x580cb0[_0x59eb('0x1b')]?_0x580cb0[_0x59eb('0x1b')]['attributes']||null:null,'limit':_0x580cb0[_0x59eb('0x1b')]?_0x580cb0[_0x59eb('0x1b')][_0x59eb('0x1e')]||null:null,'include':_0x580cb0[_0x59eb('0x1b')]?_0x580cb0[_0x59eb('0x1b')][_0x59eb('0x1f')]?_[_0x59eb('0x20')](_0x580cb0[_0x59eb('0x1b')][_0x59eb('0x1f')],function(_0x51b534){return{'model':db[_0x51b534[_0x59eb('0x21')]],'as':_0x51b534['as'],'attributes':_0x51b534['attributes'],'include':_0x51b534['include']?_['map'](_0x51b534['include'],function(_0x57f824){return{'model':db[_0x57f824[_0x59eb('0x21')]],'as':_0x57f824['as'],'attributes':_0x57f824['attributes'],'include':_0x57f824[_0x59eb('0x1f')]?_[_0x59eb('0x20')](_0x57f824['include'],function(_0x401b7c){return{'model':db[_0x401b7c[_0x59eb('0x21')]],'as':_0x401b7c['as'],'attributes':_0x401b7c[_0x59eb('0x22')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1500df){logger[_0x59eb('0x15')](_0x59eb('0x18'),_0x580cb0);logger['debug'](_0x59eb('0x18'),_0x580cb0,JSON[_0x59eb('0x12')](_0x1500df));_0x43eb95(_0x1500df);})[_0x59eb('0x17')](function(_0x40afde){logger[_0x59eb('0x13')](_0x59eb('0x18'),_0x40afde[_0x59eb('0x14')],_0x580cb0);_0x9d5d52(_0x539dea[_0x59eb('0x13')](0x1f4,_0x40afde['message']));});});};exports[_0x59eb('0x23')]=function(_0x13ecd5){var _0x2f888d=this;return new Promise(function(_0x4f94c5,_0xd609ad){return db[_0x59eb('0x19')][_0x59eb('0x24')]({'raw':_0x13ecd5[_0x59eb('0x1b')]?_0x13ecd5[_0x59eb('0x1b')][_0x59eb('0x1c')]===undefined?!![]:![]:!![],'where':_0x13ecd5[_0x59eb('0x1b')]?_0x13ecd5[_0x59eb('0x1b')][_0x59eb('0x1d')]||null:null,'attributes':_0x13ecd5['options']?_0x13ecd5[_0x59eb('0x1b')][_0x59eb('0x22')]||null:null,'include':_0x13ecd5['options']?_0x13ecd5['options'][_0x59eb('0x1f')]?_['map'](_0x13ecd5['options'][_0x59eb('0x1f')],function(_0x3b8204){return{'model':db[_0x3b8204[_0x59eb('0x21')]],'as':_0x3b8204['as'],'attributes':_0x3b8204['attributes'],'include':_0x3b8204['include']?_[_0x59eb('0x20')](_0x3b8204[_0x59eb('0x1f')],function(_0x1298a7){return{'model':db[_0x1298a7[_0x59eb('0x21')]],'as':_0x1298a7['as'],'attributes':_0x1298a7[_0x59eb('0x22')],'include':_0x1298a7[_0x59eb('0x1f')]?_['map'](_0x1298a7[_0x59eb('0x1f')],function(_0x596c31){return{'model':db[_0x596c31[_0x59eb('0x21')]],'as':_0x596c31['as'],'attributes':_0x596c31[_0x59eb('0x22')]};}):[]};}):[]};}):[]:[]})[_0x59eb('0xd')](function(_0x372e12){logger[_0x59eb('0x15')](_0x59eb('0x23'),_0x13ecd5);logger[_0x59eb('0x10')](_0x59eb('0x23'),_0x13ecd5,JSON['stringify'](_0x372e12));_0x4f94c5(_0x372e12);})[_0x59eb('0x17')](function(_0x2074c1){logger[_0x59eb('0x13')]('ShowDynamics365Account',_0x2074c1[_0x59eb('0x14')],_0x13ecd5);_0xd609ad(_0x2f888d[_0x59eb('0x13')](0x1f4,_0x2074c1[_0x59eb('0x14')]));});});};
\ No newline at end of file