Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index ee7fcac..a77ab0f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5502=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetDynamics365Account','Dynamics365Account','options','raw','attributes','limit','include','map','model','stringify','ShowDynamics365Account','find','where','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x314085,_0x4235c6){var _0x26190a=function(_0x2314a2){while(--_0x2314a2){_0x314085['push'](_0x314085['shift']());}};_0x26190a(++_0x4235c6);}(_0x5502,0x69));var _0x2550=function(_0x3862d9,_0x483475){_0x3862d9=_0x3862d9-0x0;var _0x46877c=_0x5502[_0x3862d9];return _0x46877c;};'use strict';var _=require(_0x2550('0x0'));var util=require(_0x2550('0x1'));var moment=require(_0x2550('0x2'));var BPromise=require(_0x2550('0x3'));var rs=require(_0x2550('0x4'));var fs=require('fs');var Redis=require(_0x2550('0x5'));var db=require(_0x2550('0x6'))['db'];var utils=require(_0x2550('0x7'));var logger=require(_0x2550('0x8'))(_0x2550('0x9'));var config=require(_0x2550('0xa'));var jayson=require(_0x2550('0xb'));var client=jayson[_0x2550('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1fdfc5,_0x557e76,_0x51a38d){return new BPromise(function(_0x410692,_0x40ead6){return client['request'](_0x1fdfc5,_0x51a38d)[_0x2550('0xd')](function(_0x59ac75){logger[_0x2550('0xe')](_0x2550('0xf'),_0x557e76,_0x2550('0x10'));logger[_0x2550('0x11')](_0x2550('0x12'),_0x557e76,_0x2550('0x10'),JSON['stringify'](_0x59ac75));if(_0x59ac75[_0x2550('0x13')]){if(_0x59ac75[_0x2550('0x13')][_0x2550('0x14')]===0x1f4){logger[_0x2550('0x13')]('Dynamics365Account,\x20%s,\x20%s',_0x557e76,_0x59ac75[_0x2550('0x13')][_0x2550('0x15')]);return _0x40ead6(_0x59ac75['error'][_0x2550('0x15')]);}logger[_0x2550('0x13')](_0x2550('0xf'),_0x557e76,_0x59ac75[_0x2550('0x13')][_0x2550('0x15')]);return _0x410692(_0x59ac75[_0x2550('0x13')]['message']);}else{logger[_0x2550('0xe')](_0x2550('0xf'),_0x557e76,_0x2550('0x10'));_0x410692(_0x59ac75[_0x2550('0x16')][_0x2550('0x15')]);}})[_0x2550('0x17')](function(_0x4fcabb){logger[_0x2550('0x13')](_0x2550('0xf'),_0x557e76,_0x4fcabb);_0x40ead6(_0x4fcabb);});});}exports[_0x2550('0x18')]=function(_0x5c1bcb){var _0x98f713=this;return new Promise(function(_0x5451de,_0x50d45d){return db[_0x2550('0x19')]['findAll']({'raw':_0x5c1bcb[_0x2550('0x1a')]?_0x5c1bcb[_0x2550('0x1a')][_0x2550('0x1b')]===undefined?!![]:![]:!![],'where':_0x5c1bcb[_0x2550('0x1a')]?_0x5c1bcb[_0x2550('0x1a')]['where']||null:null,'attributes':_0x5c1bcb['options']?_0x5c1bcb['options'][_0x2550('0x1c')]||null:null,'limit':_0x5c1bcb[_0x2550('0x1a')]?_0x5c1bcb[_0x2550('0x1a')][_0x2550('0x1d')]||null:null,'include':_0x5c1bcb[_0x2550('0x1a')]?_0x5c1bcb[_0x2550('0x1a')][_0x2550('0x1e')]?_[_0x2550('0x1f')](_0x5c1bcb[_0x2550('0x1a')]['include'],function(_0x3dadc8){return{'model':db[_0x3dadc8[_0x2550('0x20')]],'as':_0x3dadc8['as'],'attributes':_0x3dadc8['attributes'],'include':_0x3dadc8[_0x2550('0x1e')]?_[_0x2550('0x1f')](_0x3dadc8['include'],function(_0x418828){return{'model':db[_0x418828[_0x2550('0x20')]],'as':_0x418828['as'],'attributes':_0x418828[_0x2550('0x1c')],'include':_0x418828[_0x2550('0x1e')]?_[_0x2550('0x1f')](_0x418828[_0x2550('0x1e')],function(_0x66ac37){return{'model':db[_0x66ac37[_0x2550('0x20')]],'as':_0x66ac37['as'],'attributes':_0x66ac37[_0x2550('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x2550('0xd')](function(_0xe2744b){logger[_0x2550('0xe')](_0x2550('0x18'),_0x5c1bcb);logger['debug'](_0x2550('0x18'),_0x5c1bcb,JSON[_0x2550('0x21')](_0xe2744b));_0x5451de(_0xe2744b);})[_0x2550('0x17')](function(_0x38f07a){logger[_0x2550('0x13')](_0x2550('0x18'),_0x38f07a[_0x2550('0x15')],_0x5c1bcb);_0x50d45d(_0x98f713[_0x2550('0x13')](0x1f4,_0x38f07a[_0x2550('0x15')]));});});};exports[_0x2550('0x22')]=function(_0x222f62){var _0x3c6613=this;return new Promise(function(_0x561e7d,_0x3edad6){return db[_0x2550('0x19')][_0x2550('0x23')]({'raw':_0x222f62[_0x2550('0x1a')]?_0x222f62[_0x2550('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x222f62['options']?_0x222f62[_0x2550('0x1a')][_0x2550('0x24')]||null:null,'attributes':_0x222f62[_0x2550('0x1a')]?_0x222f62['options'][_0x2550('0x1c')]||null:null,'include':_0x222f62[_0x2550('0x1a')]?_0x222f62[_0x2550('0x1a')]['include']?_[_0x2550('0x1f')](_0x222f62[_0x2550('0x1a')][_0x2550('0x1e')],function(_0x5bce72){return{'model':db[_0x5bce72[_0x2550('0x20')]],'as':_0x5bce72['as'],'attributes':_0x5bce72['attributes'],'include':_0x5bce72[_0x2550('0x1e')]?_[_0x2550('0x1f')](_0x5bce72[_0x2550('0x1e')],function(_0x5dcf5a){return{'model':db[_0x5dcf5a[_0x2550('0x20')]],'as':_0x5dcf5a['as'],'attributes':_0x5dcf5a[_0x2550('0x1c')],'include':_0x5dcf5a['include']?_['map'](_0x5dcf5a[_0x2550('0x1e')],function(_0x40105b){return{'model':db[_0x40105b[_0x2550('0x20')]],'as':_0x40105b['as'],'attributes':_0x40105b[_0x2550('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x2550('0xd')](function(_0x254456){logger[_0x2550('0xe')](_0x2550('0x22'),_0x222f62);logger[_0x2550('0x11')](_0x2550('0x22'),_0x222f62,JSON[_0x2550('0x21')](_0x254456));_0x561e7d(_0x254456);})[_0x2550('0x17')](function(_0x1f7e04){logger[_0x2550('0x13')](_0x2550('0x22'),_0x1f7e04['message'],_0x222f62);_0x3edad6(_0x3c6613['error'](0x1f4,_0x1f7e04[_0x2550('0x15')]));});});};
\ No newline at end of file
+var _0x6299=['find','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','info','Dynamics365Account,\x20%s,\x20%s','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','GetDynamics365Account','findAll','options','raw','where','attributes','limit','map','include','model','then','stringify','ShowDynamics365Account','Dynamics365Account'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x6299,0x169));var _0x9629=function(_0x5cdd4d,_0x2b2807){_0x5cdd4d=_0x5cdd4d-0x0;var _0x1cde38=_0x6299[_0x5cdd4d];return _0x1cde38;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x9629('0x0'));var BPromise=require(_0x9629('0x1'));var rs=require(_0x9629('0x2'));var fs=require('fs');var Redis=require(_0x9629('0x3'));var db=require(_0x9629('0x4'))['db'];var utils=require(_0x9629('0x5'));var logger=require('../../config/logger')(_0x9629('0x6'));var config=require(_0x9629('0x7'));var jayson=require(_0x9629('0x8'));var client=jayson[_0x9629('0x9')][_0x9629('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5d5981,_0x57c6fe,_0x2c5ca5){return new BPromise(function(_0x1754e6,_0x533868){return client['request'](_0x5d5981,_0x2c5ca5)['then'](function(_0x439129){logger[_0x9629('0xb')](_0x9629('0xc'),_0x57c6fe,'request\x20sent');logger[_0x9629('0xd')](_0x9629('0xe'),_0x57c6fe,_0x9629('0xf'),JSON['stringify'](_0x439129));if(_0x439129[_0x9629('0x10')]){if(_0x439129[_0x9629('0x10')][_0x9629('0x11')]===0x1f4){logger[_0x9629('0x10')](_0x9629('0xc'),_0x57c6fe,_0x439129['error'][_0x9629('0x12')]);return _0x533868(_0x439129[_0x9629('0x10')][_0x9629('0x12')]);}logger[_0x9629('0x10')](_0x9629('0xc'),_0x57c6fe,_0x439129[_0x9629('0x10')]['message']);return _0x1754e6(_0x439129[_0x9629('0x10')][_0x9629('0x12')]);}else{logger[_0x9629('0xb')](_0x9629('0xc'),_0x57c6fe,_0x9629('0xf'));_0x1754e6(_0x439129[_0x9629('0x13')]['message']);}})[_0x9629('0x14')](function(_0x3524f8){logger[_0x9629('0x10')](_0x9629('0xc'),_0x57c6fe,_0x3524f8);_0x533868(_0x3524f8);});});}exports[_0x9629('0x15')]=function(_0x3f777a){var _0x3df55f=this;return new Promise(function(_0x447f28,_0x1fbacf){return db['Dynamics365Account'][_0x9629('0x16')]({'raw':_0x3f777a['options']?_0x3f777a[_0x9629('0x17')][_0x9629('0x18')]===undefined?!![]:![]:!![],'where':_0x3f777a['options']?_0x3f777a[_0x9629('0x17')][_0x9629('0x19')]||null:null,'attributes':_0x3f777a[_0x9629('0x17')]?_0x3f777a[_0x9629('0x17')][_0x9629('0x1a')]||null:null,'limit':_0x3f777a['options']?_0x3f777a['options'][_0x9629('0x1b')]||null:null,'include':_0x3f777a[_0x9629('0x17')]?_0x3f777a[_0x9629('0x17')]['include']?_[_0x9629('0x1c')](_0x3f777a[_0x9629('0x17')][_0x9629('0x1d')],function(_0x4ae0c7){return{'model':db[_0x4ae0c7['model']],'as':_0x4ae0c7['as'],'attributes':_0x4ae0c7[_0x9629('0x1a')],'include':_0x4ae0c7[_0x9629('0x1d')]?_[_0x9629('0x1c')](_0x4ae0c7[_0x9629('0x1d')],function(_0x1232ec){return{'model':db[_0x1232ec[_0x9629('0x1e')]],'as':_0x1232ec['as'],'attributes':_0x1232ec['attributes'],'include':_0x1232ec[_0x9629('0x1d')]?_['map'](_0x1232ec[_0x9629('0x1d')],function(_0x1db0d9){return{'model':db[_0x1db0d9[_0x9629('0x1e')]],'as':_0x1db0d9['as'],'attributes':_0x1db0d9[_0x9629('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x9629('0x1f')](function(_0xe7c85c){logger[_0x9629('0xb')](_0x9629('0x15'),_0x3f777a);logger[_0x9629('0xd')]('GetDynamics365Account',_0x3f777a,JSON[_0x9629('0x20')](_0xe7c85c));_0x447f28(_0xe7c85c);})[_0x9629('0x14')](function(_0x596376){logger[_0x9629('0x10')](_0x9629('0x15'),_0x596376[_0x9629('0x12')],_0x3f777a);_0x1fbacf(_0x3df55f[_0x9629('0x10')](0x1f4,_0x596376['message']));});});};exports[_0x9629('0x21')]=function(_0x2de66e){var _0x5cf1b6=this;return new Promise(function(_0x160eb9,_0x505590){return db[_0x9629('0x22')][_0x9629('0x23')]({'raw':_0x2de66e['options']?_0x2de66e['options'][_0x9629('0x18')]===undefined?!![]:![]:!![],'where':_0x2de66e[_0x9629('0x17')]?_0x2de66e[_0x9629('0x17')][_0x9629('0x19')]||null:null,'attributes':_0x2de66e[_0x9629('0x17')]?_0x2de66e[_0x9629('0x17')][_0x9629('0x1a')]||null:null,'include':_0x2de66e[_0x9629('0x17')]?_0x2de66e[_0x9629('0x17')][_0x9629('0x1d')]?_[_0x9629('0x1c')](_0x2de66e['options'][_0x9629('0x1d')],function(_0x4c4e22){return{'model':db[_0x4c4e22[_0x9629('0x1e')]],'as':_0x4c4e22['as'],'attributes':_0x4c4e22[_0x9629('0x1a')],'include':_0x4c4e22[_0x9629('0x1d')]?_[_0x9629('0x1c')](_0x4c4e22[_0x9629('0x1d')],function(_0x5c9c41){return{'model':db[_0x5c9c41[_0x9629('0x1e')]],'as':_0x5c9c41['as'],'attributes':_0x5c9c41[_0x9629('0x1a')],'include':_0x5c9c41[_0x9629('0x1d')]?_[_0x9629('0x1c')](_0x5c9c41[_0x9629('0x1d')],function(_0x168c7b){return{'model':db[_0x168c7b['model']],'as':_0x168c7b['as'],'attributes':_0x168c7b[_0x9629('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x9629('0x1f')](function(_0x528b35){logger['info'](_0x9629('0x21'),_0x2de66e);logger[_0x9629('0xd')](_0x9629('0x21'),_0x2de66e,JSON['stringify'](_0x528b35));_0x160eb9(_0x528b35);})[_0x9629('0x14')](function(_0x3b8d6b){logger[_0x9629('0x10')](_0x9629('0x21'),_0x3b8d6b[_0x9629('0x12')],_0x2de66e);_0x505590(_0x5cf1b6[_0x9629('0x10')](0x1f4,_0x3b8d6b[_0x9629('0x12')]));});});};
\ No newline at end of file