Built motion from commit 14588770.|2.5.38
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index 64f3d65..6c6a6dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2975=['Dynamics365Account','findAll','options','where','attributes','limit','include','map','model','find','ShowDynamics365Account','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','Dynamics365Account,\x20%s,\x20%s','message','result','catch','GetDynamics365Account'];(function(_0x6f80b1,_0xb7ee76){var _0x1f88c2=function(_0x233377){while(--_0x233377){_0x6f80b1['push'](_0x6f80b1['shift']());}};_0x1f88c2(++_0xb7ee76);}(_0x2975,0x1c5));var _0x5297=function(_0x43d1da,_0x36a098){_0x43d1da=_0x43d1da-0x0;var _0x28d702=_0x2975[_0x43d1da];return _0x28d702;};'use strict';var _=require('lodash');var util=require(_0x5297('0x0'));var moment=require(_0x5297('0x1'));var BPromise=require(_0x5297('0x2'));var rs=require(_0x5297('0x3'));var fs=require('fs');var Redis=require(_0x5297('0x4'));var db=require(_0x5297('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x5297('0x6'));var jayson=require(_0x5297('0x7'));var client=jayson[_0x5297('0x8')][_0x5297('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4d1d2c,_0x1f6762,_0x1b72a7){return new BPromise(function(_0x4f12b0,_0x2c015c){return client[_0x5297('0xa')](_0x4d1d2c,_0x1b72a7)[_0x5297('0xb')](function(_0x2f3b24){logger[_0x5297('0xc')]('Dynamics365Account,\x20%s,\x20%s',_0x1f6762,_0x5297('0xd'));logger[_0x5297('0xe')](_0x5297('0xf'),_0x1f6762,'request\x20sent',JSON[_0x5297('0x10')](_0x2f3b24));if(_0x2f3b24[_0x5297('0x11')]){if(_0x2f3b24[_0x5297('0x11')]['code']===0x1f4){logger[_0x5297('0x11')](_0x5297('0x12'),_0x1f6762,_0x2f3b24['error']['message']);return _0x2c015c(_0x2f3b24[_0x5297('0x11')][_0x5297('0x13')]);}logger['error'](_0x5297('0x12'),_0x1f6762,_0x2f3b24['error'][_0x5297('0x13')]);return _0x4f12b0(_0x2f3b24[_0x5297('0x11')]['message']);}else{logger[_0x5297('0xc')](_0x5297('0x12'),_0x1f6762,_0x5297('0xd'));_0x4f12b0(_0x2f3b24[_0x5297('0x14')][_0x5297('0x13')]);}})[_0x5297('0x15')](function(_0x1fb138){logger[_0x5297('0x11')]('Dynamics365Account,\x20%s,\x20%s',_0x1f6762,_0x1fb138);_0x2c015c(_0x1fb138);});});}exports[_0x5297('0x16')]=function(_0x136461){var _0x36f890=this;return new Promise(function(_0x38f106,_0x5c3e06){return db[_0x5297('0x17')][_0x5297('0x18')]({'raw':_0x136461['options']?_0x136461[_0x5297('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x136461[_0x5297('0x19')]?_0x136461[_0x5297('0x19')][_0x5297('0x1a')]||null:null,'attributes':_0x136461[_0x5297('0x19')]?_0x136461['options'][_0x5297('0x1b')]||null:null,'limit':_0x136461[_0x5297('0x19')]?_0x136461['options'][_0x5297('0x1c')]||null:null,'include':_0x136461[_0x5297('0x19')]?_0x136461['options'][_0x5297('0x1d')]?_[_0x5297('0x1e')](_0x136461['options'][_0x5297('0x1d')],function(_0x31ffc4){return{'model':db[_0x31ffc4[_0x5297('0x1f')]],'as':_0x31ffc4['as'],'attributes':_0x31ffc4['attributes'],'include':_0x31ffc4['include']?_[_0x5297('0x1e')](_0x31ffc4[_0x5297('0x1d')],function(_0x18fe2a){return{'model':db[_0x18fe2a['model']],'as':_0x18fe2a['as'],'attributes':_0x18fe2a[_0x5297('0x1b')],'include':_0x18fe2a['include']?_['map'](_0x18fe2a[_0x5297('0x1d')],function(_0x373414){return{'model':db[_0x373414[_0x5297('0x1f')]],'as':_0x373414['as'],'attributes':_0x373414[_0x5297('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x77b1dc){logger[_0x5297('0xc')](_0x5297('0x16'),_0x136461);logger[_0x5297('0xe')](_0x5297('0x16'),_0x136461,JSON[_0x5297('0x10')](_0x77b1dc));_0x38f106(_0x77b1dc);})[_0x5297('0x15')](function(_0x1dee33){logger[_0x5297('0x11')]('GetDynamics365Account',_0x1dee33[_0x5297('0x13')],_0x136461);_0x5c3e06(_0x36f890[_0x5297('0x11')](0x1f4,_0x1dee33[_0x5297('0x13')]));});});};exports['ShowDynamics365Account']=function(_0x3400d5){var _0x28009f=this;return new Promise(function(_0x4e517f,_0x3c9cae){return db[_0x5297('0x17')][_0x5297('0x20')]({'raw':_0x3400d5[_0x5297('0x19')]?_0x3400d5[_0x5297('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x3400d5[_0x5297('0x19')]?_0x3400d5[_0x5297('0x19')][_0x5297('0x1a')]||null:null,'attributes':_0x3400d5[_0x5297('0x19')]?_0x3400d5['options'][_0x5297('0x1b')]||null:null,'include':_0x3400d5['options']?_0x3400d5[_0x5297('0x19')][_0x5297('0x1d')]?_['map'](_0x3400d5[_0x5297('0x19')][_0x5297('0x1d')],function(_0x4470cc){return{'model':db[_0x4470cc[_0x5297('0x1f')]],'as':_0x4470cc['as'],'attributes':_0x4470cc['attributes'],'include':_0x4470cc[_0x5297('0x1d')]?_[_0x5297('0x1e')](_0x4470cc[_0x5297('0x1d')],function(_0xeb1099){return{'model':db[_0xeb1099['model']],'as':_0xeb1099['as'],'attributes':_0xeb1099[_0x5297('0x1b')],'include':_0xeb1099[_0x5297('0x1d')]?_[_0x5297('0x1e')](_0xeb1099[_0x5297('0x1d')],function(_0x3068ed){return{'model':db[_0x3068ed[_0x5297('0x1f')]],'as':_0x3068ed['as'],'attributes':_0x3068ed[_0x5297('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x5297('0xb')](function(_0x209c21){logger[_0x5297('0xc')]('ShowDynamics365Account',_0x3400d5);logger[_0x5297('0xe')](_0x5297('0x21'),_0x3400d5,JSON[_0x5297('0x10')](_0x209c21));_0x4e517f(_0x209c21);})[_0x5297('0x15')](function(_0x2d564c){logger[_0x5297('0x11')]('ShowDynamics365Account',_0x2d564c[_0x5297('0x13')],_0x3400d5);_0x3c9cae(_0x28009f['error'](0x1f4,_0x2d564c[_0x5297('0x13')]));});});};
\ 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