Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / intSalesforceAccount / intSalesforceAccount.rpc.js
index 4ece62d..8b6d795 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb332=['catch','SalesforceAccount','findAll','options','raw','where','attributes','include','map','model','GetSalesforceAccount','find','ShowSalesforceAccount','lodash','moment','bluebird','ioredis','../../config/utils','rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','SalesforceAccount,\x20%s,\x20%s','message','result'];(function(_0x56489a,_0x1323f0){var _0x2b22c9=function(_0x165f67){while(--_0x165f67){_0x56489a['push'](_0x56489a['shift']());}};_0x2b22c9(++_0x1323f0);}(_0xb332,0xd9));var _0x2b33=function(_0x385eb1,_0x497a94){_0x385eb1=_0x385eb1-0x0;var _0x5d40eb=_0xb332[_0x385eb1];return _0x5d40eb;};'use strict';var _=require(_0x2b33('0x0'));var util=require('util');var moment=require(_0x2b33('0x1'));var BPromise=require(_0x2b33('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2b33('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x2b33('0x4'));var logger=require('../../config/logger')(_0x2b33('0x5'));var config=require('../../config/environment');var jayson=require(_0x2b33('0x6'));var client=jayson[_0x2b33('0x7')][_0x2b33('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x461d44,_0x5a7a3f,_0x5ccf2d){return new BPromise(function(_0x4302b7,_0x5f29ab){return client[_0x2b33('0x9')](_0x461d44,_0x5ccf2d)[_0x2b33('0xa')](function(_0x2f2cb3){logger[_0x2b33('0xb')]('SalesforceAccount,\x20%s,\x20%s',_0x5a7a3f,_0x2b33('0xc'));logger[_0x2b33('0xd')](_0x2b33('0xe'),_0x5a7a3f,_0x2b33('0xc'),JSON[_0x2b33('0xf')](_0x2f2cb3));if(_0x2f2cb3[_0x2b33('0x10')]){if(_0x2f2cb3[_0x2b33('0x10')][_0x2b33('0x11')]===0x1f4){logger[_0x2b33('0x10')](_0x2b33('0x12'),_0x5a7a3f,_0x2f2cb3[_0x2b33('0x10')]['message']);return _0x5f29ab(_0x2f2cb3[_0x2b33('0x10')][_0x2b33('0x13')]);}logger[_0x2b33('0x10')]('SalesforceAccount,\x20%s,\x20%s',_0x5a7a3f,_0x2f2cb3[_0x2b33('0x10')]['message']);return _0x4302b7(_0x2f2cb3[_0x2b33('0x10')][_0x2b33('0x13')]);}else{logger[_0x2b33('0xb')]('SalesforceAccount,\x20%s,\x20%s',_0x5a7a3f,'request\x20sent');_0x4302b7(_0x2f2cb3[_0x2b33('0x14')][_0x2b33('0x13')]);}})[_0x2b33('0x15')](function(_0x2f5119){logger[_0x2b33('0x10')]('SalesforceAccount,\x20%s,\x20%s',_0x5a7a3f,_0x2f5119);_0x5f29ab(_0x2f5119);});});}exports['GetSalesforceAccount']=function(_0x59f0b6){var _0x4041bd=this;return new Promise(function(_0x4f10c4,_0x543d52){return db[_0x2b33('0x16')][_0x2b33('0x17')]({'raw':_0x59f0b6[_0x2b33('0x18')]?_0x59f0b6['options'][_0x2b33('0x19')]===undefined?!![]:![]:!![],'where':_0x59f0b6['options']?_0x59f0b6[_0x2b33('0x18')][_0x2b33('0x1a')]||null:null,'attributes':_0x59f0b6[_0x2b33('0x18')]?_0x59f0b6[_0x2b33('0x18')][_0x2b33('0x1b')]||null:null,'limit':_0x59f0b6[_0x2b33('0x18')]?_0x59f0b6[_0x2b33('0x18')]['limit']||null:null,'include':_0x59f0b6[_0x2b33('0x18')]?_0x59f0b6[_0x2b33('0x18')][_0x2b33('0x1c')]?_[_0x2b33('0x1d')](_0x59f0b6[_0x2b33('0x18')][_0x2b33('0x1c')],function(_0x27f1b8){return{'model':db[_0x27f1b8[_0x2b33('0x1e')]],'as':_0x27f1b8['as'],'attributes':_0x27f1b8['attributes'],'include':_0x27f1b8[_0x2b33('0x1c')]?_[_0x2b33('0x1d')](_0x27f1b8[_0x2b33('0x1c')],function(_0x32b835){return{'model':db[_0x32b835['model']],'as':_0x32b835['as'],'attributes':_0x32b835[_0x2b33('0x1b')],'include':_0x32b835['include']?_[_0x2b33('0x1d')](_0x32b835['include'],function(_0x2e74d0){return{'model':db[_0x2e74d0[_0x2b33('0x1e')]],'as':_0x2e74d0['as'],'attributes':_0x2e74d0['attributes']};}):[]};}):[]};}):[]:[]})[_0x2b33('0xa')](function(_0x53c2ad){logger[_0x2b33('0xb')]('GetSalesforceAccount',_0x59f0b6);logger[_0x2b33('0xd')](_0x2b33('0x1f'),_0x59f0b6,JSON[_0x2b33('0xf')](_0x53c2ad));_0x4f10c4(_0x53c2ad);})[_0x2b33('0x15')](function(_0xaa6643){logger[_0x2b33('0x10')](_0x2b33('0x1f'),_0xaa6643[_0x2b33('0x13')],_0x59f0b6);_0x543d52(_0x4041bd[_0x2b33('0x10')](0x1f4,_0xaa6643[_0x2b33('0x13')]));});});};exports['ShowSalesforceAccount']=function(_0x5b6527){var _0x106ea0=this;return new Promise(function(_0x2a081c,_0x3282bf){return db[_0x2b33('0x16')][_0x2b33('0x20')]({'raw':_0x5b6527['options']?_0x5b6527['options'][_0x2b33('0x19')]===undefined?!![]:![]:!![],'where':_0x5b6527[_0x2b33('0x18')]?_0x5b6527[_0x2b33('0x18')][_0x2b33('0x1a')]||null:null,'attributes':_0x5b6527[_0x2b33('0x18')]?_0x5b6527[_0x2b33('0x18')]['attributes']||null:null,'include':_0x5b6527[_0x2b33('0x18')]?_0x5b6527['options'][_0x2b33('0x1c')]?_[_0x2b33('0x1d')](_0x5b6527[_0x2b33('0x18')][_0x2b33('0x1c')],function(_0x594d66){return{'model':db[_0x594d66[_0x2b33('0x1e')]],'as':_0x594d66['as'],'attributes':_0x594d66[_0x2b33('0x1b')],'include':_0x594d66[_0x2b33('0x1c')]?_[_0x2b33('0x1d')](_0x594d66[_0x2b33('0x1c')],function(_0x782a64){return{'model':db[_0x782a64[_0x2b33('0x1e')]],'as':_0x782a64['as'],'attributes':_0x782a64[_0x2b33('0x1b')],'include':_0x782a64[_0x2b33('0x1c')]?_[_0x2b33('0x1d')](_0x782a64[_0x2b33('0x1c')],function(_0x565c14){return{'model':db[_0x565c14['model']],'as':_0x565c14['as'],'attributes':_0x565c14['attributes']};}):[]};}):[]};}):[]:[]})[_0x2b33('0xa')](function(_0xcaf635){logger[_0x2b33('0xb')](_0x2b33('0x21'),_0x5b6527);logger[_0x2b33('0xd')]('ShowSalesforceAccount',_0x5b6527,JSON['stringify'](_0xcaf635));_0x2a081c(_0xcaf635);})[_0x2b33('0x15')](function(_0x4c3997){logger[_0x2b33('0x10')](_0x2b33('0x21'),_0x4c3997[_0x2b33('0x13')],_0x5b6527);_0x3282bf(_0x106ea0[_0x2b33('0x10')](0x1f4,_0x4c3997[_0x2b33('0x13')]));});});};
\ 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