Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / intSalesforceAccount / intSalesforceAccount.rpc.js
index 9e25b31..8b6d795 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5ff3=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','SalesforceAccount,\x20%s,\x20%s','message','result','catch','GetSalesforceAccount','SalesforceAccount','findAll','options','attributes','limit','include','map','model','ShowSalesforceAccount','raw','util','bluebird','ioredis'];(function(_0xe63472,_0x5ac604){var _0x1bfa86=function(_0x56c080){while(--_0x56c080){_0xe63472['push'](_0xe63472['shift']());}};_0x1bfa86(++_0x5ac604);}(_0x5ff3,0x17d));var _0x35ff=function(_0x3cac2a,_0x3be23d){_0x3cac2a=_0x3cac2a-0x0;var _0x3b249b=_0x5ff3[_0x3cac2a];return _0x3b249b;};'use strict';var _=require('lodash');var util=require(_0x35ff('0x0'));var moment=require('moment');var BPromise=require(_0x35ff('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x35ff('0x2'));var db=require(_0x35ff('0x3'))['db'];var utils=require(_0x35ff('0x4'));var logger=require(_0x35ff('0x5'))('rpc');var config=require(_0x35ff('0x6'));var jayson=require(_0x35ff('0x7'));var client=jayson[_0x35ff('0x8')][_0x35ff('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x30c3ff,_0x495c31,_0x92b403){return new BPromise(function(_0x4c9fab,_0x2e7470){return client[_0x35ff('0xa')](_0x30c3ff,_0x92b403)[_0x35ff('0xb')](function(_0x51967a){logger[_0x35ff('0xc')]('SalesforceAccount,\x20%s,\x20%s',_0x495c31,_0x35ff('0xd'));logger[_0x35ff('0xe')]('SalesforceAccount,\x20%s,\x20%s,\x20%s',_0x495c31,'request\x20sent',JSON[_0x35ff('0xf')](_0x51967a));if(_0x51967a['error']){if(_0x51967a['error']['code']===0x1f4){logger[_0x35ff('0x10')](_0x35ff('0x11'),_0x495c31,_0x51967a[_0x35ff('0x10')][_0x35ff('0x12')]);return _0x2e7470(_0x51967a['error'][_0x35ff('0x12')]);}logger[_0x35ff('0x10')](_0x35ff('0x11'),_0x495c31,_0x51967a['error'][_0x35ff('0x12')]);return _0x4c9fab(_0x51967a[_0x35ff('0x10')][_0x35ff('0x12')]);}else{logger[_0x35ff('0xc')](_0x35ff('0x11'),_0x495c31,_0x35ff('0xd'));_0x4c9fab(_0x51967a[_0x35ff('0x13')][_0x35ff('0x12')]);}})[_0x35ff('0x14')](function(_0x2f3456){logger[_0x35ff('0x10')](_0x35ff('0x11'),_0x495c31,_0x2f3456);_0x2e7470(_0x2f3456);});});}exports[_0x35ff('0x15')]=function(_0x16c803){var _0x186f6a=this;return new Promise(function(_0x5f470e,_0x2404e5){return db[_0x35ff('0x16')][_0x35ff('0x17')]({'raw':_0x16c803[_0x35ff('0x18')]?_0x16c803['options']['raw']===undefined?!![]:![]:!![],'where':_0x16c803[_0x35ff('0x18')]?_0x16c803[_0x35ff('0x18')]['where']||null:null,'attributes':_0x16c803[_0x35ff('0x18')]?_0x16c803[_0x35ff('0x18')][_0x35ff('0x19')]||null:null,'limit':_0x16c803[_0x35ff('0x18')]?_0x16c803['options'][_0x35ff('0x1a')]||null:null,'include':_0x16c803['options']?_0x16c803[_0x35ff('0x18')][_0x35ff('0x1b')]?_[_0x35ff('0x1c')](_0x16c803[_0x35ff('0x18')][_0x35ff('0x1b')],function(_0x2b3782){return{'model':db[_0x2b3782[_0x35ff('0x1d')]],'as':_0x2b3782['as'],'attributes':_0x2b3782['attributes'],'include':_0x2b3782[_0x35ff('0x1b')]?_[_0x35ff('0x1c')](_0x2b3782['include'],function(_0x426e4e){return{'model':db[_0x426e4e['model']],'as':_0x426e4e['as'],'attributes':_0x426e4e['attributes'],'include':_0x426e4e[_0x35ff('0x1b')]?_[_0x35ff('0x1c')](_0x426e4e[_0x35ff('0x1b')],function(_0x11a5eb){return{'model':db[_0x11a5eb[_0x35ff('0x1d')]],'as':_0x11a5eb['as'],'attributes':_0x11a5eb['attributes']};}):[]};}):[]};}):[]:[]})[_0x35ff('0xb')](function(_0x412873){logger[_0x35ff('0xc')]('GetSalesforceAccount',_0x16c803);logger[_0x35ff('0xe')](_0x35ff('0x15'),_0x16c803,JSON[_0x35ff('0xf')](_0x412873));_0x5f470e(_0x412873);})[_0x35ff('0x14')](function(_0x47fcb5){logger[_0x35ff('0x10')](_0x35ff('0x15'),_0x47fcb5[_0x35ff('0x12')],_0x16c803);_0x2404e5(_0x186f6a[_0x35ff('0x10')](0x1f4,_0x47fcb5['message']));});});};exports[_0x35ff('0x1e')]=function(_0x57339d){var _0x1cb370=this;return new Promise(function(_0x257501,_0x2bc118){return db[_0x35ff('0x16')]['find']({'raw':_0x57339d[_0x35ff('0x18')]?_0x57339d['options'][_0x35ff('0x1f')]===undefined?!![]:![]:!![],'where':_0x57339d[_0x35ff('0x18')]?_0x57339d['options']['where']||null:null,'attributes':_0x57339d[_0x35ff('0x18')]?_0x57339d[_0x35ff('0x18')]['attributes']||null:null,'include':_0x57339d[_0x35ff('0x18')]?_0x57339d[_0x35ff('0x18')]['include']?_[_0x35ff('0x1c')](_0x57339d[_0x35ff('0x18')][_0x35ff('0x1b')],function(_0x2727c3){return{'model':db[_0x2727c3[_0x35ff('0x1d')]],'as':_0x2727c3['as'],'attributes':_0x2727c3[_0x35ff('0x19')],'include':_0x2727c3[_0x35ff('0x1b')]?_[_0x35ff('0x1c')](_0x2727c3[_0x35ff('0x1b')],function(_0x1a5c81){return{'model':db[_0x1a5c81[_0x35ff('0x1d')]],'as':_0x1a5c81['as'],'attributes':_0x1a5c81[_0x35ff('0x19')],'include':_0x1a5c81[_0x35ff('0x1b')]?_['map'](_0x1a5c81[_0x35ff('0x1b')],function(_0x5c5dcb){return{'model':db[_0x5c5dcb[_0x35ff('0x1d')]],'as':_0x5c5dcb['as'],'attributes':_0x5c5dcb[_0x35ff('0x19')]};}):[]};}):[]};}):[]:[]})[_0x35ff('0xb')](function(_0x11115d){logger[_0x35ff('0xc')]('ShowSalesforceAccount',_0x57339d);logger[_0x35ff('0xe')](_0x35ff('0x1e'),_0x57339d,JSON[_0x35ff('0xf')](_0x11115d));_0x257501(_0x11115d);})[_0x35ff('0x14')](function(_0x324f6c){logger['error'](_0x35ff('0x1e'),_0x324f6c[_0x35ff('0x12')],_0x57339d);_0x2bc118(_0x1cb370[_0x35ff('0x10')](0x1f4,_0x324f6c['message']));});});};
\ No newline at end of file
+var _0x47a1=['stringify','error','code','message','result','catch','findAll','options','raw','where','attributes','limit','include','map','model','GetSalesforceAccount','SalesforceAccount','find','ShowSalesforceAccount','lodash','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','SalesforceAccount,\x20%s,\x20%s','debug','request\x20sent'];(function(_0x1d3639,_0x2b9506){var _0x344fd1=function(_0x48aea0){while(--_0x48aea0){_0x1d3639['push'](_0x1d3639['shift']());}};_0x344fd1(++_0x2b9506);}(_0x47a1,0xbd));var _0x147a=function(_0x5b1669,_0x244898){_0x5b1669=_0x5b1669-0x0;var _0xe28953=_0x47a1[_0x5b1669];return _0xe28953;};'use strict';var _=require(_0x147a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x147a('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x147a('0x2'));var db=require(_0x147a('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x147a('0x4'))(_0x147a('0x5'));var config=require(_0x147a('0x6'));var jayson=require(_0x147a('0x7'));var client=jayson[_0x147a('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2a0a85,_0x312654,_0x130a3b){return new BPromise(function(_0x28a263,_0x375c68){return client[_0x147a('0x9')](_0x2a0a85,_0x130a3b)[_0x147a('0xa')](function(_0x5c80cf){logger[_0x147a('0xb')](_0x147a('0xc'),_0x312654,'request\x20sent');logger[_0x147a('0xd')]('SalesforceAccount,\x20%s,\x20%s,\x20%s',_0x312654,_0x147a('0xe'),JSON[_0x147a('0xf')](_0x5c80cf));if(_0x5c80cf[_0x147a('0x10')]){if(_0x5c80cf['error'][_0x147a('0x11')]===0x1f4){logger[_0x147a('0x10')](_0x147a('0xc'),_0x312654,_0x5c80cf['error'][_0x147a('0x12')]);return _0x375c68(_0x5c80cf[_0x147a('0x10')][_0x147a('0x12')]);}logger[_0x147a('0x10')](_0x147a('0xc'),_0x312654,_0x5c80cf[_0x147a('0x10')][_0x147a('0x12')]);return _0x28a263(_0x5c80cf[_0x147a('0x10')][_0x147a('0x12')]);}else{logger['info'](_0x147a('0xc'),_0x312654,'request\x20sent');_0x28a263(_0x5c80cf[_0x147a('0x13')][_0x147a('0x12')]);}})[_0x147a('0x14')](function(_0xac7ef5){logger[_0x147a('0x10')](_0x147a('0xc'),_0x312654,_0xac7ef5);_0x375c68(_0xac7ef5);});});}exports['GetSalesforceAccount']=function(_0x51fd3a){var _0x590a79=this;return new Promise(function(_0x427ffd,_0x19848e){return db['SalesforceAccount'][_0x147a('0x15')]({'raw':_0x51fd3a['options']?_0x51fd3a[_0x147a('0x16')][_0x147a('0x17')]===undefined?!![]:![]:!![],'where':_0x51fd3a[_0x147a('0x16')]?_0x51fd3a[_0x147a('0x16')][_0x147a('0x18')]||null:null,'attributes':_0x51fd3a[_0x147a('0x16')]?_0x51fd3a[_0x147a('0x16')][_0x147a('0x19')]||null:null,'limit':_0x51fd3a[_0x147a('0x16')]?_0x51fd3a[_0x147a('0x16')][_0x147a('0x1a')]||null:null,'include':_0x51fd3a['options']?_0x51fd3a[_0x147a('0x16')][_0x147a('0x1b')]?_[_0x147a('0x1c')](_0x51fd3a[_0x147a('0x16')][_0x147a('0x1b')],function(_0x5059f7){return{'model':db[_0x5059f7[_0x147a('0x1d')]],'as':_0x5059f7['as'],'attributes':_0x5059f7['attributes'],'include':_0x5059f7['include']?_['map'](_0x5059f7[_0x147a('0x1b')],function(_0x5774cb){return{'model':db[_0x5774cb[_0x147a('0x1d')]],'as':_0x5774cb['as'],'attributes':_0x5774cb['attributes'],'include':_0x5774cb[_0x147a('0x1b')]?_[_0x147a('0x1c')](_0x5774cb[_0x147a('0x1b')],function(_0x534e3a){return{'model':db[_0x534e3a['model']],'as':_0x534e3a['as'],'attributes':_0x534e3a[_0x147a('0x19')]};}):[]};}):[]};}):[]:[]})[_0x147a('0xa')](function(_0x3131e9){logger[_0x147a('0xb')](_0x147a('0x1e'),_0x51fd3a);logger[_0x147a('0xd')](_0x147a('0x1e'),_0x51fd3a,JSON[_0x147a('0xf')](_0x3131e9));_0x427ffd(_0x3131e9);})['catch'](function(_0x346c78){logger[_0x147a('0x10')](_0x147a('0x1e'),_0x346c78[_0x147a('0x12')],_0x51fd3a);_0x19848e(_0x590a79['error'](0x1f4,_0x346c78['message']));});});};exports['ShowSalesforceAccount']=function(_0x3a7189){var _0x2f5bc7=this;return new Promise(function(_0x59ccf5,_0x45c3d3){return db[_0x147a('0x1f')][_0x147a('0x20')]({'raw':_0x3a7189[_0x147a('0x16')]?_0x3a7189[_0x147a('0x16')][_0x147a('0x17')]===undefined?!![]:![]:!![],'where':_0x3a7189['options']?_0x3a7189['options']['where']||null:null,'attributes':_0x3a7189[_0x147a('0x16')]?_0x3a7189[_0x147a('0x16')]['attributes']||null:null,'include':_0x3a7189[_0x147a('0x16')]?_0x3a7189[_0x147a('0x16')]['include']?_[_0x147a('0x1c')](_0x3a7189[_0x147a('0x16')][_0x147a('0x1b')],function(_0x5d87b1){return{'model':db[_0x5d87b1['model']],'as':_0x5d87b1['as'],'attributes':_0x5d87b1[_0x147a('0x19')],'include':_0x5d87b1['include']?_[_0x147a('0x1c')](_0x5d87b1[_0x147a('0x1b')],function(_0x2a7a6f){return{'model':db[_0x2a7a6f[_0x147a('0x1d')]],'as':_0x2a7a6f['as'],'attributes':_0x2a7a6f[_0x147a('0x19')],'include':_0x2a7a6f[_0x147a('0x1b')]?_[_0x147a('0x1c')](_0x2a7a6f[_0x147a('0x1b')],function(_0x140f7b){return{'model':db[_0x140f7b[_0x147a('0x1d')]],'as':_0x140f7b['as'],'attributes':_0x140f7b[_0x147a('0x19')]};}):[]};}):[]};}):[]:[]})[_0x147a('0xa')](function(_0x123bfc){logger[_0x147a('0xb')]('ShowSalesforceAccount',_0x3a7189);logger['debug'](_0x147a('0x21'),_0x3a7189,JSON[_0x147a('0xf')](_0x123bfc));_0x59ccf5(_0x123bfc);})[_0x147a('0x14')](function(_0x275321){logger[_0x147a('0x10')](_0x147a('0x21'),_0x275321[_0x147a('0x12')],_0x3a7189);_0x45c3d3(_0x2f5bc7[_0x147a('0x10')](0x1f4,_0x275321[_0x147a('0x12')]));});});};
\ No newline at end of file