Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / intSalesforceAccount / intSalesforceAccount.rpc.js
index 06a9fd6..8b6d795 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc71=['include','map','model','catch','ShowSalesforceAccount','find','lodash','moment','randomstring','../../mysqldb','rpc','../../config/environment','jayson/promise','http','then','info','SalesforceAccount,\x20%s,\x20%s','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','GetSalesforceAccount','SalesforceAccount','findAll','options','raw','where','attributes','limit'];(function(_0x58a03d,_0x4276e5){var _0xd3e2e9=function(_0x292a88){while(--_0x292a88){_0x58a03d['push'](_0x58a03d['shift']());}};_0xd3e2e9(++_0x4276e5);}(_0xbc71,0x86));var _0x1bc7=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0xbc71[_0x3bf83f];return _0x22c4a9;};'use strict';var _=require(_0x1bc7('0x0'));var util=require('util');var moment=require(_0x1bc7('0x1'));var BPromise=require('bluebird');var rs=require(_0x1bc7('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1bc7('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x1bc7('0x4'));var config=require(_0x1bc7('0x5'));var jayson=require(_0x1bc7('0x6'));var client=jayson['client'][_0x1bc7('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2ea667,_0xeb4ea4,_0x15e220){return new BPromise(function(_0x4cf0a4,_0x844b0a){return client['request'](_0x2ea667,_0x15e220)[_0x1bc7('0x8')](function(_0x5ba951){logger[_0x1bc7('0x9')](_0x1bc7('0xa'),_0xeb4ea4,'request\x20sent');logger[_0x1bc7('0xb')](_0x1bc7('0xc'),_0xeb4ea4,_0x1bc7('0xd'),JSON[_0x1bc7('0xe')](_0x5ba951));if(_0x5ba951['error']){if(_0x5ba951[_0x1bc7('0xf')][_0x1bc7('0x10')]===0x1f4){logger['error'](_0x1bc7('0xa'),_0xeb4ea4,_0x5ba951[_0x1bc7('0xf')][_0x1bc7('0x11')]);return _0x844b0a(_0x5ba951[_0x1bc7('0xf')][_0x1bc7('0x11')]);}logger['error'](_0x1bc7('0xa'),_0xeb4ea4,_0x5ba951['error']['message']);return _0x4cf0a4(_0x5ba951['error'][_0x1bc7('0x11')]);}else{logger[_0x1bc7('0x9')]('SalesforceAccount,\x20%s,\x20%s',_0xeb4ea4,_0x1bc7('0xd'));_0x4cf0a4(_0x5ba951['result'][_0x1bc7('0x11')]);}})['catch'](function(_0x5806f1){logger[_0x1bc7('0xf')](_0x1bc7('0xa'),_0xeb4ea4,_0x5806f1);_0x844b0a(_0x5806f1);});});}exports[_0x1bc7('0x12')]=function(_0xbd4f88){var _0x2b0ae4=this;return new Promise(function(_0x21e3f3,_0x2e309e){return db[_0x1bc7('0x13')][_0x1bc7('0x14')]({'raw':_0xbd4f88['options']?_0xbd4f88[_0x1bc7('0x15')][_0x1bc7('0x16')]===undefined?!![]:![]:!![],'where':_0xbd4f88['options']?_0xbd4f88[_0x1bc7('0x15')][_0x1bc7('0x17')]||null:null,'attributes':_0xbd4f88[_0x1bc7('0x15')]?_0xbd4f88[_0x1bc7('0x15')][_0x1bc7('0x18')]||null:null,'limit':_0xbd4f88[_0x1bc7('0x15')]?_0xbd4f88[_0x1bc7('0x15')][_0x1bc7('0x19')]||null:null,'include':_0xbd4f88[_0x1bc7('0x15')]?_0xbd4f88[_0x1bc7('0x15')][_0x1bc7('0x1a')]?_[_0x1bc7('0x1b')](_0xbd4f88[_0x1bc7('0x15')][_0x1bc7('0x1a')],function(_0x3ce3d8){return{'model':db[_0x3ce3d8['model']],'as':_0x3ce3d8['as'],'attributes':_0x3ce3d8['attributes'],'include':_0x3ce3d8[_0x1bc7('0x1a')]?_[_0x1bc7('0x1b')](_0x3ce3d8[_0x1bc7('0x1a')],function(_0x1cddb4){return{'model':db[_0x1cddb4[_0x1bc7('0x1c')]],'as':_0x1cddb4['as'],'attributes':_0x1cddb4[_0x1bc7('0x18')],'include':_0x1cddb4[_0x1bc7('0x1a')]?_[_0x1bc7('0x1b')](_0x1cddb4['include'],function(_0x552a84){return{'model':db[_0x552a84[_0x1bc7('0x1c')]],'as':_0x552a84['as'],'attributes':_0x552a84[_0x1bc7('0x18')]};}):[]};}):[]};}):[]:[]})[_0x1bc7('0x8')](function(_0x584a2c){logger[_0x1bc7('0x9')](_0x1bc7('0x12'),_0xbd4f88);logger[_0x1bc7('0xb')]('GetSalesforceAccount',_0xbd4f88,JSON[_0x1bc7('0xe')](_0x584a2c));_0x21e3f3(_0x584a2c);})[_0x1bc7('0x1d')](function(_0xdb5fbd){logger[_0x1bc7('0xf')](_0x1bc7('0x12'),_0xdb5fbd[_0x1bc7('0x11')],_0xbd4f88);_0x2e309e(_0x2b0ae4['error'](0x1f4,_0xdb5fbd[_0x1bc7('0x11')]));});});};exports[_0x1bc7('0x1e')]=function(_0x326a0e){var _0x14b2dd=this;return new Promise(function(_0x56b059,_0x460749){return db[_0x1bc7('0x13')][_0x1bc7('0x1f')]({'raw':_0x326a0e[_0x1bc7('0x15')]?_0x326a0e[_0x1bc7('0x15')][_0x1bc7('0x16')]===undefined?!![]:![]:!![],'where':_0x326a0e[_0x1bc7('0x15')]?_0x326a0e['options'][_0x1bc7('0x17')]||null:null,'attributes':_0x326a0e[_0x1bc7('0x15')]?_0x326a0e[_0x1bc7('0x15')][_0x1bc7('0x18')]||null:null,'include':_0x326a0e[_0x1bc7('0x15')]?_0x326a0e[_0x1bc7('0x15')][_0x1bc7('0x1a')]?_[_0x1bc7('0x1b')](_0x326a0e['options'][_0x1bc7('0x1a')],function(_0x3ee7a8){return{'model':db[_0x3ee7a8['model']],'as':_0x3ee7a8['as'],'attributes':_0x3ee7a8[_0x1bc7('0x18')],'include':_0x3ee7a8['include']?_[_0x1bc7('0x1b')](_0x3ee7a8[_0x1bc7('0x1a')],function(_0x48ef5c){return{'model':db[_0x48ef5c[_0x1bc7('0x1c')]],'as':_0x48ef5c['as'],'attributes':_0x48ef5c[_0x1bc7('0x18')],'include':_0x48ef5c[_0x1bc7('0x1a')]?_[_0x1bc7('0x1b')](_0x48ef5c[_0x1bc7('0x1a')],function(_0x21432c){return{'model':db[_0x21432c['model']],'as':_0x21432c['as'],'attributes':_0x21432c[_0x1bc7('0x18')]};}):[]};}):[]};}):[]:[]})[_0x1bc7('0x8')](function(_0x152353){logger[_0x1bc7('0x9')]('ShowSalesforceAccount',_0x326a0e);logger[_0x1bc7('0xb')](_0x1bc7('0x1e'),_0x326a0e,JSON[_0x1bc7('0xe')](_0x152353));_0x56b059(_0x152353);})['catch'](function(_0x43c7f4){logger[_0x1bc7('0xf')](_0x1bc7('0x1e'),_0x43c7f4[_0x1bc7('0x11')],_0x326a0e);_0x460749(_0x14b2dd[_0x1bc7('0xf')](0x1f4,_0x43c7f4[_0x1bc7('0x11')]));});});};
\ 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