Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / intSalesforceAccount / intSalesforceAccount.rpc.js
index 70debdb..06a9fd6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x524a=['limit','include','map','model','ShowSalesforceAccount','find','where','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','request','then','info','SalesforceAccount,\x20%s,\x20%s','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','catch','GetSalesforceAccount','SalesforceAccount','options','raw','attributes'];(function(_0x2b23d8,_0x8fa9f6){var _0x19ea3f=function(_0x428494){while(--_0x428494){_0x2b23d8['push'](_0x2b23d8['shift']());}};_0x19ea3f(++_0x8fa9f6);}(_0x524a,0xf5));var _0xa524=function(_0x29c419,_0x310c29){_0x29c419=_0x29c419-0x0;var _0x4b609a=_0x524a[_0x29c419];return _0x4b609a;};'use strict';var _=require(_0xa524('0x0'));var util=require(_0xa524('0x1'));var moment=require(_0xa524('0x2'));var BPromise=require(_0xa524('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa524('0x4'));var db=require(_0xa524('0x5'))['db'];var utils=require(_0xa524('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0xa524('0x7'));var jayson=require(_0xa524('0x8'));var client=jayson[_0xa524('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x460738,_0x56bd0e,_0x3a2dd6){return new BPromise(function(_0x11aa98,_0x56849e){return client[_0xa524('0xa')](_0x460738,_0x3a2dd6)[_0xa524('0xb')](function(_0x228ffe){logger[_0xa524('0xc')](_0xa524('0xd'),_0x56bd0e,'request\x20sent');logger[_0xa524('0xe')](_0xa524('0xf'),_0x56bd0e,'request\x20sent',JSON['stringify'](_0x228ffe));if(_0x228ffe[_0xa524('0x10')]){if(_0x228ffe[_0xa524('0x10')][_0xa524('0x11')]===0x1f4){logger['error']('SalesforceAccount,\x20%s,\x20%s',_0x56bd0e,_0x228ffe[_0xa524('0x10')]['message']);return _0x56849e(_0x228ffe[_0xa524('0x10')]['message']);}logger[_0xa524('0x10')]('SalesforceAccount,\x20%s,\x20%s',_0x56bd0e,_0x228ffe[_0xa524('0x10')][_0xa524('0x12')]);return _0x11aa98(_0x228ffe['error'][_0xa524('0x12')]);}else{logger[_0xa524('0xc')](_0xa524('0xd'),_0x56bd0e,_0xa524('0x13'));_0x11aa98(_0x228ffe[_0xa524('0x14')][_0xa524('0x12')]);}})[_0xa524('0x15')](function(_0x4fc42f){logger[_0xa524('0x10')](_0xa524('0xd'),_0x56bd0e,_0x4fc42f);_0x56849e(_0x4fc42f);});});}exports[_0xa524('0x16')]=function(_0x3d6a0d){var _0x375277=this;return new Promise(function(_0x805b93,_0x562941){return db[_0xa524('0x17')]['findAll']({'raw':_0x3d6a0d[_0xa524('0x18')]?_0x3d6a0d[_0xa524('0x18')][_0xa524('0x19')]===undefined?!![]:![]:!![],'where':_0x3d6a0d[_0xa524('0x18')]?_0x3d6a0d['options']['where']||null:null,'attributes':_0x3d6a0d[_0xa524('0x18')]?_0x3d6a0d[_0xa524('0x18')][_0xa524('0x1a')]||null:null,'limit':_0x3d6a0d[_0xa524('0x18')]?_0x3d6a0d[_0xa524('0x18')][_0xa524('0x1b')]||null:null,'include':_0x3d6a0d['options']?_0x3d6a0d[_0xa524('0x18')][_0xa524('0x1c')]?_[_0xa524('0x1d')](_0x3d6a0d[_0xa524('0x18')][_0xa524('0x1c')],function(_0x45cdcc){return{'model':db[_0x45cdcc[_0xa524('0x1e')]],'as':_0x45cdcc['as'],'attributes':_0x45cdcc['attributes'],'include':_0x45cdcc[_0xa524('0x1c')]?_[_0xa524('0x1d')](_0x45cdcc['include'],function(_0x47efb3){return{'model':db[_0x47efb3[_0xa524('0x1e')]],'as':_0x47efb3['as'],'attributes':_0x47efb3[_0xa524('0x1a')],'include':_0x47efb3[_0xa524('0x1c')]?_[_0xa524('0x1d')](_0x47efb3[_0xa524('0x1c')],function(_0x546060){return{'model':db[_0x546060['model']],'as':_0x546060['as'],'attributes':_0x546060[_0xa524('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xa524('0xb')](function(_0x1582fa){logger[_0xa524('0xc')]('GetSalesforceAccount',_0x3d6a0d);logger[_0xa524('0xe')](_0xa524('0x16'),_0x3d6a0d,JSON['stringify'](_0x1582fa));_0x805b93(_0x1582fa);})[_0xa524('0x15')](function(_0x147094){logger['error'](_0xa524('0x16'),_0x147094['message'],_0x3d6a0d);_0x562941(_0x375277[_0xa524('0x10')](0x1f4,_0x147094[_0xa524('0x12')]));});});};exports[_0xa524('0x1f')]=function(_0x238133){var _0x136e83=this;return new Promise(function(_0x1c706b,_0x4f6133){return db[_0xa524('0x17')][_0xa524('0x20')]({'raw':_0x238133['options']?_0x238133['options'][_0xa524('0x19')]===undefined?!![]:![]:!![],'where':_0x238133['options']?_0x238133['options'][_0xa524('0x21')]||null:null,'attributes':_0x238133[_0xa524('0x18')]?_0x238133[_0xa524('0x18')][_0xa524('0x1a')]||null:null,'include':_0x238133['options']?_0x238133['options'][_0xa524('0x1c')]?_['map'](_0x238133['options'][_0xa524('0x1c')],function(_0x318ea0){return{'model':db[_0x318ea0[_0xa524('0x1e')]],'as':_0x318ea0['as'],'attributes':_0x318ea0[_0xa524('0x1a')],'include':_0x318ea0[_0xa524('0x1c')]?_[_0xa524('0x1d')](_0x318ea0[_0xa524('0x1c')],function(_0x865c55){return{'model':db[_0x865c55[_0xa524('0x1e')]],'as':_0x865c55['as'],'attributes':_0x865c55[_0xa524('0x1a')],'include':_0x865c55[_0xa524('0x1c')]?_[_0xa524('0x1d')](_0x865c55['include'],function(_0x4f41d8){return{'model':db[_0x4f41d8['model']],'as':_0x4f41d8['as'],'attributes':_0x4f41d8[_0xa524('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xa524('0xb')](function(_0x4c5b8b){logger[_0xa524('0xc')]('ShowSalesforceAccount',_0x238133);logger[_0xa524('0xe')](_0xa524('0x1f'),_0x238133,JSON['stringify'](_0x4c5b8b));_0x1c706b(_0x4c5b8b);})[_0xa524('0x15')](function(_0x259532){logger[_0xa524('0x10')]('ShowSalesforceAccount',_0x259532[_0xa524('0x12')],_0x238133);_0x4f6133(_0x136e83[_0xa524('0x10')](0x1f4,_0x259532['message']));});});};
\ No newline at end of file
+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