Built motion from commit 616d3211.|2.6.4
[motion2.git] / server / api / intSalesforceAccount / intSalesforceAccount.rpc.js
index 869e98b..97aa807 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb2d9=['options','raw','attributes','limit','map','include','model','GetSalesforceAccount','stringify','ShowSalesforceAccount','find','where','then','debug','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','client','http','request','info','request\x20sent','SalesforceAccount,\x20%s,\x20%s,\x20%s','error','message','SalesforceAccount,\x20%s,\x20%s','result','catch','SalesforceAccount','findAll'];(function(_0x1bf006,_0x462eb9){var _0x1df67e=function(_0x1ba22d){while(--_0x1ba22d){_0x1bf006['push'](_0x1bf006['shift']());}};_0x1df67e(++_0x462eb9);}(_0xb2d9,0x1a6));var _0x9b2d=function(_0x1b6c66,_0x41374a){_0x1b6c66=_0x1b6c66-0x0;var _0x1be7b7=_0xb2d9[_0x1b6c66];return _0x1be7b7;};'use strict';var _=require(_0x9b2d('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x9b2d('0x1'));var rs=require(_0x9b2d('0x2'));var fs=require('fs');var Redis=require(_0x9b2d('0x3'));var db=require(_0x9b2d('0x4'))['db'];var utils=require(_0x9b2d('0x5'));var logger=require('../../config/logger')(_0x9b2d('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x9b2d('0x7')][_0x9b2d('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x24eaf5,_0x36752e,_0x46cbcb){return new BPromise(function(_0x17ac5f,_0x51edaa){return client[_0x9b2d('0x9')](_0x24eaf5,_0x46cbcb)['then'](function(_0x11beb8){logger[_0x9b2d('0xa')]('SalesforceAccount,\x20%s,\x20%s',_0x36752e,_0x9b2d('0xb'));logger['debug'](_0x9b2d('0xc'),_0x36752e,_0x9b2d('0xb'),JSON['stringify'](_0x11beb8));if(_0x11beb8[_0x9b2d('0xd')]){if(_0x11beb8[_0x9b2d('0xd')]['code']===0x1f4){logger[_0x9b2d('0xd')]('SalesforceAccount,\x20%s,\x20%s',_0x36752e,_0x11beb8['error'][_0x9b2d('0xe')]);return _0x51edaa(_0x11beb8[_0x9b2d('0xd')][_0x9b2d('0xe')]);}logger[_0x9b2d('0xd')](_0x9b2d('0xf'),_0x36752e,_0x11beb8[_0x9b2d('0xd')]['message']);return _0x17ac5f(_0x11beb8[_0x9b2d('0xd')][_0x9b2d('0xe')]);}else{logger[_0x9b2d('0xa')](_0x9b2d('0xf'),_0x36752e,_0x9b2d('0xb'));_0x17ac5f(_0x11beb8[_0x9b2d('0x10')]['message']);}})[_0x9b2d('0x11')](function(_0x422944){logger[_0x9b2d('0xd')](_0x9b2d('0xf'),_0x36752e,_0x422944);_0x51edaa(_0x422944);});});}exports['GetSalesforceAccount']=function(_0x562498){var _0x40e10f=this;return new Promise(function(_0x1ca19d,_0x5a7518){return db[_0x9b2d('0x12')][_0x9b2d('0x13')]({'raw':_0x562498[_0x9b2d('0x14')]?_0x562498[_0x9b2d('0x14')][_0x9b2d('0x15')]===undefined?!![]:![]:!![],'where':_0x562498[_0x9b2d('0x14')]?_0x562498[_0x9b2d('0x14')]['where']||null:null,'attributes':_0x562498[_0x9b2d('0x14')]?_0x562498[_0x9b2d('0x14')][_0x9b2d('0x16')]||null:null,'limit':_0x562498[_0x9b2d('0x14')]?_0x562498[_0x9b2d('0x14')][_0x9b2d('0x17')]||null:null,'include':_0x562498[_0x9b2d('0x14')]?_0x562498[_0x9b2d('0x14')]['include']?_[_0x9b2d('0x18')](_0x562498[_0x9b2d('0x14')][_0x9b2d('0x19')],function(_0x461ab5){return{'model':db[_0x461ab5[_0x9b2d('0x1a')]],'as':_0x461ab5['as'],'attributes':_0x461ab5[_0x9b2d('0x16')],'include':_0x461ab5[_0x9b2d('0x19')]?_[_0x9b2d('0x18')](_0x461ab5[_0x9b2d('0x19')],function(_0x2ed636){return{'model':db[_0x2ed636['model']],'as':_0x2ed636['as'],'attributes':_0x2ed636['attributes'],'include':_0x2ed636[_0x9b2d('0x19')]?_[_0x9b2d('0x18')](_0x2ed636['include'],function(_0x445ba6){return{'model':db[_0x445ba6[_0x9b2d('0x1a')]],'as':_0x445ba6['as'],'attributes':_0x445ba6[_0x9b2d('0x16')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2d9c30){logger[_0x9b2d('0xa')](_0x9b2d('0x1b'),_0x562498);logger['debug']('GetSalesforceAccount',_0x562498,JSON[_0x9b2d('0x1c')](_0x2d9c30));_0x1ca19d(_0x2d9c30);})[_0x9b2d('0x11')](function(_0x4defaf){logger[_0x9b2d('0xd')](_0x9b2d('0x1b'),_0x4defaf['message'],_0x562498);_0x5a7518(_0x40e10f[_0x9b2d('0xd')](0x1f4,_0x4defaf['message']));});});};exports[_0x9b2d('0x1d')]=function(_0x5e3a17){var _0x13e199=this;return new Promise(function(_0x38ac46,_0x4eb0ab){return db[_0x9b2d('0x12')][_0x9b2d('0x1e')]({'raw':_0x5e3a17[_0x9b2d('0x14')]?_0x5e3a17[_0x9b2d('0x14')][_0x9b2d('0x15')]===undefined?!![]:![]:!![],'where':_0x5e3a17['options']?_0x5e3a17[_0x9b2d('0x14')][_0x9b2d('0x1f')]||null:null,'attributes':_0x5e3a17[_0x9b2d('0x14')]?_0x5e3a17['options']['attributes']||null:null,'include':_0x5e3a17[_0x9b2d('0x14')]?_0x5e3a17['options'][_0x9b2d('0x19')]?_[_0x9b2d('0x18')](_0x5e3a17[_0x9b2d('0x14')][_0x9b2d('0x19')],function(_0x837c5a){return{'model':db[_0x837c5a[_0x9b2d('0x1a')]],'as':_0x837c5a['as'],'attributes':_0x837c5a[_0x9b2d('0x16')],'include':_0x837c5a[_0x9b2d('0x19')]?_['map'](_0x837c5a[_0x9b2d('0x19')],function(_0x11612e){return{'model':db[_0x11612e[_0x9b2d('0x1a')]],'as':_0x11612e['as'],'attributes':_0x11612e['attributes'],'include':_0x11612e[_0x9b2d('0x19')]?_['map'](_0x11612e['include'],function(_0x3f6bfe){return{'model':db[_0x3f6bfe[_0x9b2d('0x1a')]],'as':_0x3f6bfe['as'],'attributes':_0x3f6bfe[_0x9b2d('0x16')]};}):[]};}):[]};}):[]:[]})[_0x9b2d('0x20')](function(_0x5d2fa1){logger[_0x9b2d('0xa')](_0x9b2d('0x1d'),_0x5e3a17);logger[_0x9b2d('0x21')]('ShowSalesforceAccount',_0x5e3a17,JSON[_0x9b2d('0x1c')](_0x5d2fa1));_0x38ac46(_0x5d2fa1);})[_0x9b2d('0x11')](function(_0x51c051){logger[_0x9b2d('0xd')](_0x9b2d('0x1d'),_0x51c051['message'],_0x5e3a17);_0x4eb0ab(_0x13e199['error'](0x1f4,_0x51c051['message']));});});};
\ No newline at end of file
+var _0x7d8a=['../../config/environment','jayson/promise','client','http','request','SalesforceAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','info','result','catch','GetSalesforceAccount','SalesforceAccount','findAll','options','where','attributes','limit','include','map','model','ShowSalesforceAccount','raw','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x59b229,_0x213d4e){var _0x217180=function(_0x16b29d){while(--_0x16b29d){_0x59b229['push'](_0x59b229['shift']());}};_0x217180(++_0x213d4e);}(_0x7d8a,0x1ca));var _0xa7d8=function(_0x313c96,_0x3cee6e){_0x313c96=_0x313c96-0x0;var _0x522f53=_0x7d8a[_0x313c96];return _0x522f53;};'use strict';var _=require(_0xa7d8('0x0'));var util=require(_0xa7d8('0x1'));var moment=require(_0xa7d8('0x2'));var BPromise=require(_0xa7d8('0x3'));var rs=require(_0xa7d8('0x4'));var fs=require('fs');var Redis=require(_0xa7d8('0x5'));var db=require(_0xa7d8('0x6'))['db'];var utils=require(_0xa7d8('0x7'));var logger=require(_0xa7d8('0x8'))(_0xa7d8('0x9'));var config=require(_0xa7d8('0xa'));var jayson=require(_0xa7d8('0xb'));var client=jayson[_0xa7d8('0xc')][_0xa7d8('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x55bb66,_0x410b09,_0x2e1955){return new BPromise(function(_0x1807cc,_0x455082){return client[_0xa7d8('0xe')](_0x55bb66,_0x2e1955)['then'](function(_0x40f419){logger['info'](_0xa7d8('0xf'),_0x410b09,'request\x20sent');logger[_0xa7d8('0x10')]('SalesforceAccount,\x20%s,\x20%s,\x20%s',_0x410b09,_0xa7d8('0x11'),JSON[_0xa7d8('0x12')](_0x40f419));if(_0x40f419['error']){if(_0x40f419[_0xa7d8('0x13')]['code']===0x1f4){logger[_0xa7d8('0x13')](_0xa7d8('0xf'),_0x410b09,_0x40f419[_0xa7d8('0x13')]['message']);return _0x455082(_0x40f419[_0xa7d8('0x13')][_0xa7d8('0x14')]);}logger['error']('SalesforceAccount,\x20%s,\x20%s',_0x410b09,_0x40f419['error'][_0xa7d8('0x14')]);return _0x1807cc(_0x40f419[_0xa7d8('0x13')][_0xa7d8('0x14')]);}else{logger[_0xa7d8('0x15')](_0xa7d8('0xf'),_0x410b09,_0xa7d8('0x11'));_0x1807cc(_0x40f419[_0xa7d8('0x16')][_0xa7d8('0x14')]);}})[_0xa7d8('0x17')](function(_0xfc0284){logger[_0xa7d8('0x13')](_0xa7d8('0xf'),_0x410b09,_0xfc0284);_0x455082(_0xfc0284);});});}exports[_0xa7d8('0x18')]=function(_0x50d6a6){var _0x34eac8=this;return new Promise(function(_0x3af212,_0x50dd47){return db[_0xa7d8('0x19')][_0xa7d8('0x1a')]({'raw':_0x50d6a6[_0xa7d8('0x1b')]?_0x50d6a6[_0xa7d8('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x50d6a6[_0xa7d8('0x1b')]?_0x50d6a6['options'][_0xa7d8('0x1c')]||null:null,'attributes':_0x50d6a6[_0xa7d8('0x1b')]?_0x50d6a6['options'][_0xa7d8('0x1d')]||null:null,'limit':_0x50d6a6[_0xa7d8('0x1b')]?_0x50d6a6[_0xa7d8('0x1b')][_0xa7d8('0x1e')]||null:null,'include':_0x50d6a6[_0xa7d8('0x1b')]?_0x50d6a6['options'][_0xa7d8('0x1f')]?_[_0xa7d8('0x20')](_0x50d6a6['options'][_0xa7d8('0x1f')],function(_0x31afb8){return{'model':db[_0x31afb8['model']],'as':_0x31afb8['as'],'attributes':_0x31afb8[_0xa7d8('0x1d')],'include':_0x31afb8[_0xa7d8('0x1f')]?_[_0xa7d8('0x20')](_0x31afb8[_0xa7d8('0x1f')],function(_0x1f49f6){return{'model':db[_0x1f49f6[_0xa7d8('0x21')]],'as':_0x1f49f6['as'],'attributes':_0x1f49f6[_0xa7d8('0x1d')],'include':_0x1f49f6['include']?_[_0xa7d8('0x20')](_0x1f49f6['include'],function(_0x1dcb71){return{'model':db[_0x1dcb71['model']],'as':_0x1dcb71['as'],'attributes':_0x1dcb71['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x491fa0){logger[_0xa7d8('0x15')](_0xa7d8('0x18'),_0x50d6a6);logger['debug'](_0xa7d8('0x18'),_0x50d6a6,JSON[_0xa7d8('0x12')](_0x491fa0));_0x3af212(_0x491fa0);})[_0xa7d8('0x17')](function(_0x54676b){logger[_0xa7d8('0x13')](_0xa7d8('0x18'),_0x54676b[_0xa7d8('0x14')],_0x50d6a6);_0x50dd47(_0x34eac8['error'](0x1f4,_0x54676b[_0xa7d8('0x14')]));});});};exports[_0xa7d8('0x22')]=function(_0x541508){var _0x5f1b22=this;return new Promise(function(_0x1f56d2,_0x3d31fa){return db[_0xa7d8('0x19')]['find']({'raw':_0x541508['options']?_0x541508['options'][_0xa7d8('0x23')]===undefined?!![]:![]:!![],'where':_0x541508[_0xa7d8('0x1b')]?_0x541508['options'][_0xa7d8('0x1c')]||null:null,'attributes':_0x541508['options']?_0x541508[_0xa7d8('0x1b')]['attributes']||null:null,'include':_0x541508[_0xa7d8('0x1b')]?_0x541508[_0xa7d8('0x1b')][_0xa7d8('0x1f')]?_['map'](_0x541508[_0xa7d8('0x1b')][_0xa7d8('0x1f')],function(_0x3025b0){return{'model':db[_0x3025b0[_0xa7d8('0x21')]],'as':_0x3025b0['as'],'attributes':_0x3025b0[_0xa7d8('0x1d')],'include':_0x3025b0[_0xa7d8('0x1f')]?_[_0xa7d8('0x20')](_0x3025b0[_0xa7d8('0x1f')],function(_0xb3e677){return{'model':db[_0xb3e677[_0xa7d8('0x21')]],'as':_0xb3e677['as'],'attributes':_0xb3e677[_0xa7d8('0x1d')],'include':_0xb3e677['include']?_[_0xa7d8('0x20')](_0xb3e677[_0xa7d8('0x1f')],function(_0x2073bc){return{'model':db[_0x2073bc[_0xa7d8('0x21')]],'as':_0x2073bc['as'],'attributes':_0x2073bc[_0xa7d8('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x202be8){logger[_0xa7d8('0x15')](_0xa7d8('0x22'),_0x541508);logger[_0xa7d8('0x10')](_0xa7d8('0x22'),_0x541508,JSON[_0xa7d8('0x12')](_0x202be8));_0x1f56d2(_0x202be8);})[_0xa7d8('0x17')](function(_0x2e1357){logger[_0xa7d8('0x13')](_0xa7d8('0x22'),_0x2e1357[_0xa7d8('0x14')],_0x541508);_0x3d31fa(_0x5f1b22[_0xa7d8('0x13')](0x1f4,_0x2e1357['message']));});});};
\ No newline at end of file