Built motion from commit 1fa89557.|2.6.10
[motion2.git] / server / api / intSalesforceAccount / intSalesforceAccount.rpc.js
index 9e25b31..4558341 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 _0x116a=['moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','SalesforceAccount,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','catch','GetSalesforceAccount','SalesforceAccount','findAll','options','raw','where','attributes','limit','include','map','model','then','debug','ShowSalesforceAccount','lodash','util'];(function(_0x23a079,_0xb8c9aa){var _0x53f2a5=function(_0x1b3dc5){while(--_0x1b3dc5){_0x23a079['push'](_0x23a079['shift']());}};_0x53f2a5(++_0xb8c9aa);}(_0x116a,0x174));var _0xa116=function(_0xbea703,_0x2a4c4a){_0xbea703=_0xbea703-0x0;var _0x3a527d=_0x116a[_0xbea703];return _0x3a527d;};'use strict';var _=require(_0xa116('0x0'));var util=require(_0xa116('0x1'));var moment=require(_0xa116('0x2'));var BPromise=require(_0xa116('0x3'));var rs=require(_0xa116('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa116('0x5'))['db'];var utils=require(_0xa116('0x6'));var logger=require(_0xa116('0x7'))(_0xa116('0x8'));var config=require(_0xa116('0x9'));var jayson=require(_0xa116('0xa'));var client=jayson[_0xa116('0xb')][_0xa116('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xf93552,_0x19dc56,_0x2c2eea){return new BPromise(function(_0xbcdb1e,_0x4bbb1c){return client['request'](_0xf93552,_0x2c2eea)['then'](function(_0x52925f){logger['info'](_0xa116('0xd'),_0x19dc56,_0xa116('0xe'));logger['debug']('SalesforceAccount,\x20%s,\x20%s,\x20%s',_0x19dc56,'request\x20sent',JSON[_0xa116('0xf')](_0x52925f));if(_0x52925f[_0xa116('0x10')]){if(_0x52925f[_0xa116('0x10')]['code']===0x1f4){logger['error'](_0xa116('0xd'),_0x19dc56,_0x52925f['error'][_0xa116('0x11')]);return _0x4bbb1c(_0x52925f['error'][_0xa116('0x11')]);}logger[_0xa116('0x10')](_0xa116('0xd'),_0x19dc56,_0x52925f[_0xa116('0x10')][_0xa116('0x11')]);return _0xbcdb1e(_0x52925f['error']['message']);}else{logger[_0xa116('0x12')](_0xa116('0xd'),_0x19dc56,_0xa116('0xe'));_0xbcdb1e(_0x52925f['result'][_0xa116('0x11')]);}})[_0xa116('0x13')](function(_0x244be1){logger[_0xa116('0x10')]('SalesforceAccount,\x20%s,\x20%s',_0x19dc56,_0x244be1);_0x4bbb1c(_0x244be1);});});}exports[_0xa116('0x14')]=function(_0x286928){var _0x44103f=this;return new Promise(function(_0x5abe46,_0x5a083e){return db[_0xa116('0x15')][_0xa116('0x16')]({'raw':_0x286928['options']?_0x286928[_0xa116('0x17')][_0xa116('0x18')]===undefined?!![]:![]:!![],'where':_0x286928['options']?_0x286928[_0xa116('0x17')][_0xa116('0x19')]||null:null,'attributes':_0x286928['options']?_0x286928[_0xa116('0x17')][_0xa116('0x1a')]||null:null,'limit':_0x286928[_0xa116('0x17')]?_0x286928[_0xa116('0x17')][_0xa116('0x1b')]||null:null,'include':_0x286928[_0xa116('0x17')]?_0x286928[_0xa116('0x17')][_0xa116('0x1c')]?_[_0xa116('0x1d')](_0x286928[_0xa116('0x17')]['include'],function(_0x323d1b){return{'model':db[_0x323d1b[_0xa116('0x1e')]],'as':_0x323d1b['as'],'attributes':_0x323d1b[_0xa116('0x1a')],'include':_0x323d1b['include']?_[_0xa116('0x1d')](_0x323d1b[_0xa116('0x1c')],function(_0x7d5689){return{'model':db[_0x7d5689[_0xa116('0x1e')]],'as':_0x7d5689['as'],'attributes':_0x7d5689[_0xa116('0x1a')],'include':_0x7d5689[_0xa116('0x1c')]?_[_0xa116('0x1d')](_0x7d5689[_0xa116('0x1c')],function(_0x302ffb){return{'model':db[_0x302ffb[_0xa116('0x1e')]],'as':_0x302ffb['as'],'attributes':_0x302ffb['attributes']};}):[]};}):[]};}):[]:[]})[_0xa116('0x1f')](function(_0x454d33){logger[_0xa116('0x12')](_0xa116('0x14'),_0x286928);logger[_0xa116('0x20')](_0xa116('0x14'),_0x286928,JSON['stringify'](_0x454d33));_0x5abe46(_0x454d33);})[_0xa116('0x13')](function(_0x42eec9){logger[_0xa116('0x10')]('GetSalesforceAccount',_0x42eec9[_0xa116('0x11')],_0x286928);_0x5a083e(_0x44103f['error'](0x1f4,_0x42eec9['message']));});});};exports[_0xa116('0x21')]=function(_0x358676){var _0x2abd4a=this;return new Promise(function(_0x316765,_0x57a47f){return db[_0xa116('0x15')]['find']({'raw':_0x358676['options']?_0x358676[_0xa116('0x17')][_0xa116('0x18')]===undefined?!![]:![]:!![],'where':_0x358676[_0xa116('0x17')]?_0x358676[_0xa116('0x17')][_0xa116('0x19')]||null:null,'attributes':_0x358676['options']?_0x358676[_0xa116('0x17')]['attributes']||null:null,'include':_0x358676['options']?_0x358676[_0xa116('0x17')][_0xa116('0x1c')]?_[_0xa116('0x1d')](_0x358676['options']['include'],function(_0x20726e){return{'model':db[_0x20726e[_0xa116('0x1e')]],'as':_0x20726e['as'],'attributes':_0x20726e['attributes'],'include':_0x20726e[_0xa116('0x1c')]?_['map'](_0x20726e['include'],function(_0x3fa243){return{'model':db[_0x3fa243[_0xa116('0x1e')]],'as':_0x3fa243['as'],'attributes':_0x3fa243[_0xa116('0x1a')],'include':_0x3fa243['include']?_[_0xa116('0x1d')](_0x3fa243[_0xa116('0x1c')],function(_0x100771){return{'model':db[_0x100771[_0xa116('0x1e')]],'as':_0x100771['as'],'attributes':_0x100771[_0xa116('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1647e5){logger[_0xa116('0x12')](_0xa116('0x21'),_0x358676);logger[_0xa116('0x20')](_0xa116('0x21'),_0x358676,JSON[_0xa116('0xf')](_0x1647e5));_0x316765(_0x1647e5);})[_0xa116('0x13')](function(_0x293329){logger[_0xa116('0x10')]('ShowSalesforceAccount',_0x293329[_0xa116('0x11')],_0x358676);_0x57a47f(_0x2abd4a['error'](0x1f4,_0x293329[_0xa116('0x11')]));});});};
\ No newline at end of file