Built motion from commit 3e059bc2.|2.5.32
[motion2.git] / server / api / intSalesforceAccount / intSalesforceAccount.rpc.js
index 6d56c3e..3c3175c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe205=['../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','GetSalesforceAccount','SalesforceAccount','options','raw','where','include','map','model','attributes','ShowSalesforceAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x30b0d8,_0x57470c){var _0x459c09=function(_0x5e51b6){while(--_0x5e51b6){_0x30b0d8['push'](_0x30b0d8['shift']());}};_0x459c09(++_0x57470c);}(_0xe205,0xa7));var _0x5e20=function(_0x47da96,_0x2ab4ff){_0x47da96=_0x47da96-0x0;var _0x4a8b27=_0xe205[_0x47da96];return _0x4a8b27;};'use strict';var _=require(_0x5e20('0x0'));var util=require(_0x5e20('0x1'));var moment=require(_0x5e20('0x2'));var BPromise=require(_0x5e20('0x3'));var rs=require(_0x5e20('0x4'));var fs=require('fs');var Redis=require(_0x5e20('0x5'));var db=require(_0x5e20('0x6'))['db'];var utils=require(_0x5e20('0x7'));var logger=require(_0x5e20('0x8'))('rpc');var config=require(_0x5e20('0x9'));var jayson=require(_0x5e20('0xa'));var client=jayson[_0x5e20('0xb')][_0x5e20('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5eca5c,_0x4cc88d,_0x3a382f){return new BPromise(function(_0x4c9332,_0x533e18){return client[_0x5e20('0xd')](_0x5eca5c,_0x3a382f)[_0x5e20('0xe')](function(_0x5c1eee){logger[_0x5e20('0xf')](_0x5e20('0x10'),_0x4cc88d,_0x5e20('0x11'));logger[_0x5e20('0x12')]('SalesforceAccount,\x20%s,\x20%s,\x20%s',_0x4cc88d,_0x5e20('0x11'),JSON[_0x5e20('0x13')](_0x5c1eee));if(_0x5c1eee[_0x5e20('0x14')]){if(_0x5c1eee[_0x5e20('0x14')][_0x5e20('0x15')]===0x1f4){logger[_0x5e20('0x14')]('SalesforceAccount,\x20%s,\x20%s',_0x4cc88d,_0x5c1eee[_0x5e20('0x14')][_0x5e20('0x16')]);return _0x533e18(_0x5c1eee[_0x5e20('0x14')]['message']);}logger[_0x5e20('0x14')]('SalesforceAccount,\x20%s,\x20%s',_0x4cc88d,_0x5c1eee[_0x5e20('0x14')]['message']);return _0x4c9332(_0x5c1eee[_0x5e20('0x14')][_0x5e20('0x16')]);}else{logger[_0x5e20('0xf')](_0x5e20('0x10'),_0x4cc88d,_0x5e20('0x11'));_0x4c9332(_0x5c1eee['result'][_0x5e20('0x16')]);}})[_0x5e20('0x17')](function(_0x166ffd){logger[_0x5e20('0x14')](_0x5e20('0x10'),_0x4cc88d,_0x166ffd);_0x533e18(_0x166ffd);});});}exports[_0x5e20('0x18')]=function(_0x1cc706){var _0xf3488f=this;return new Promise(function(_0x4d3e4a,_0x434686){return db[_0x5e20('0x19')]['findAll']({'raw':_0x1cc706[_0x5e20('0x1a')]?_0x1cc706[_0x5e20('0x1a')][_0x5e20('0x1b')]===undefined?!![]:![]:!![],'where':_0x1cc706[_0x5e20('0x1a')]?_0x1cc706['options'][_0x5e20('0x1c')]||null:null,'attributes':_0x1cc706['options']?_0x1cc706['options']['attributes']||null:null,'limit':_0x1cc706['options']?_0x1cc706[_0x5e20('0x1a')]['limit']||null:null,'include':_0x1cc706[_0x5e20('0x1a')]?_0x1cc706[_0x5e20('0x1a')][_0x5e20('0x1d')]?_[_0x5e20('0x1e')](_0x1cc706[_0x5e20('0x1a')][_0x5e20('0x1d')],function(_0x4c5732){return{'model':db[_0x4c5732[_0x5e20('0x1f')]],'as':_0x4c5732['as'],'attributes':_0x4c5732['attributes'],'include':_0x4c5732['include']?_[_0x5e20('0x1e')](_0x4c5732[_0x5e20('0x1d')],function(_0x2bae08){return{'model':db[_0x2bae08[_0x5e20('0x1f')]],'as':_0x2bae08['as'],'attributes':_0x2bae08[_0x5e20('0x20')],'include':_0x2bae08[_0x5e20('0x1d')]?_[_0x5e20('0x1e')](_0x2bae08['include'],function(_0x3bf4f4){return{'model':db[_0x3bf4f4[_0x5e20('0x1f')]],'as':_0x3bf4f4['as'],'attributes':_0x3bf4f4[_0x5e20('0x20')]};}):[]};}):[]};}):[]:[]})[_0x5e20('0xe')](function(_0x4c799d){logger[_0x5e20('0xf')](_0x5e20('0x18'),_0x1cc706);logger[_0x5e20('0x12')](_0x5e20('0x18'),_0x1cc706,JSON[_0x5e20('0x13')](_0x4c799d));_0x4d3e4a(_0x4c799d);})[_0x5e20('0x17')](function(_0x5ec45b){logger[_0x5e20('0x14')](_0x5e20('0x18'),_0x5ec45b['message'],_0x1cc706);_0x434686(_0xf3488f[_0x5e20('0x14')](0x1f4,_0x5ec45b[_0x5e20('0x16')]));});});};exports[_0x5e20('0x21')]=function(_0x4196a3){var _0x1548c8=this;return new Promise(function(_0x395a27,_0x4ff715){return db[_0x5e20('0x19')][_0x5e20('0x22')]({'raw':_0x4196a3[_0x5e20('0x1a')]?_0x4196a3[_0x5e20('0x1a')][_0x5e20('0x1b')]===undefined?!![]:![]:!![],'where':_0x4196a3[_0x5e20('0x1a')]?_0x4196a3[_0x5e20('0x1a')][_0x5e20('0x1c')]||null:null,'attributes':_0x4196a3[_0x5e20('0x1a')]?_0x4196a3[_0x5e20('0x1a')][_0x5e20('0x20')]||null:null,'include':_0x4196a3['options']?_0x4196a3[_0x5e20('0x1a')][_0x5e20('0x1d')]?_[_0x5e20('0x1e')](_0x4196a3['options'][_0x5e20('0x1d')],function(_0x2d397b){return{'model':db[_0x2d397b[_0x5e20('0x1f')]],'as':_0x2d397b['as'],'attributes':_0x2d397b[_0x5e20('0x20')],'include':_0x2d397b[_0x5e20('0x1d')]?_[_0x5e20('0x1e')](_0x2d397b[_0x5e20('0x1d')],function(_0x173165){return{'model':db[_0x173165[_0x5e20('0x1f')]],'as':_0x173165['as'],'attributes':_0x173165[_0x5e20('0x20')],'include':_0x173165[_0x5e20('0x1d')]?_[_0x5e20('0x1e')](_0x173165[_0x5e20('0x1d')],function(_0x255b67){return{'model':db[_0x255b67['model']],'as':_0x255b67['as'],'attributes':_0x255b67[_0x5e20('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x549f01){logger[_0x5e20('0xf')](_0x5e20('0x21'),_0x4196a3);logger['debug'](_0x5e20('0x21'),_0x4196a3,JSON[_0x5e20('0x13')](_0x549f01));_0x395a27(_0x549f01);})['catch'](function(_0x3f3908){logger[_0x5e20('0x14')](_0x5e20('0x21'),_0x3f3908[_0x5e20('0x16')],_0x4196a3);_0x4ff715(_0x1548c8[_0x5e20('0x14')](0x1f4,_0x3f3908[_0x5e20('0x16')]));});});};
\ No newline at end of file
+var _0xdb4d=['debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','findAll','options','raw','where','attributes','limit','include','map','model','GetSalesforceAccount','find','ShowSalesforceAccount','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client','request','then','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent'];(function(_0x206ec3,_0x18cda4){var _0x1c57fa=function(_0xf653a0){while(--_0xf653a0){_0x206ec3['push'](_0x206ec3['shift']());}};_0x1c57fa(++_0x18cda4);}(_0xdb4d,0x77));var _0xddb4=function(_0x45c7af,_0x1f9a61){_0x45c7af=_0x45c7af-0x0;var _0x414147=_0xdb4d[_0x45c7af];return _0x414147;};'use strict';var _=require(_0xddb4('0x0'));var util=require('util');var moment=require(_0xddb4('0x1'));var BPromise=require('bluebird');var rs=require(_0xddb4('0x2'));var fs=require('fs');var Redis=require(_0xddb4('0x3'));var db=require(_0xddb4('0x4'))['db'];var utils=require(_0xddb4('0x5'));var logger=require(_0xddb4('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xddb4('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x49405b,_0x322e91,_0x2bb133){return new BPromise(function(_0x47bf57,_0xf60e5a){return client[_0xddb4('0x8')](_0x49405b,_0x2bb133)[_0xddb4('0x9')](function(_0x2a2eb7){logger[_0xddb4('0xa')](_0xddb4('0xb'),_0x322e91,_0xddb4('0xc'));logger[_0xddb4('0xd')](_0xddb4('0xe'),_0x322e91,_0xddb4('0xc'),JSON[_0xddb4('0xf')](_0x2a2eb7));if(_0x2a2eb7[_0xddb4('0x10')]){if(_0x2a2eb7[_0xddb4('0x10')][_0xddb4('0x11')]===0x1f4){logger[_0xddb4('0x10')]('SalesforceAccount,\x20%s,\x20%s',_0x322e91,_0x2a2eb7[_0xddb4('0x10')]['message']);return _0xf60e5a(_0x2a2eb7[_0xddb4('0x10')][_0xddb4('0x12')]);}logger[_0xddb4('0x10')]('SalesforceAccount,\x20%s,\x20%s',_0x322e91,_0x2a2eb7[_0xddb4('0x10')][_0xddb4('0x12')]);return _0x47bf57(_0x2a2eb7[_0xddb4('0x10')]['message']);}else{logger[_0xddb4('0xa')](_0xddb4('0xb'),_0x322e91,_0xddb4('0xc'));_0x47bf57(_0x2a2eb7[_0xddb4('0x13')][_0xddb4('0x12')]);}})[_0xddb4('0x14')](function(_0x429840){logger[_0xddb4('0x10')](_0xddb4('0xb'),_0x322e91,_0x429840);_0xf60e5a(_0x429840);});});}exports['GetSalesforceAccount']=function(_0x4ff87d){var _0x1efebb=this;return new Promise(function(_0x20bc16,_0x435ccc){return db['SalesforceAccount'][_0xddb4('0x15')]({'raw':_0x4ff87d['options']?_0x4ff87d[_0xddb4('0x16')][_0xddb4('0x17')]===undefined?!![]:![]:!![],'where':_0x4ff87d[_0xddb4('0x16')]?_0x4ff87d[_0xddb4('0x16')][_0xddb4('0x18')]||null:null,'attributes':_0x4ff87d[_0xddb4('0x16')]?_0x4ff87d[_0xddb4('0x16')][_0xddb4('0x19')]||null:null,'limit':_0x4ff87d['options']?_0x4ff87d[_0xddb4('0x16')][_0xddb4('0x1a')]||null:null,'include':_0x4ff87d['options']?_0x4ff87d[_0xddb4('0x16')][_0xddb4('0x1b')]?_[_0xddb4('0x1c')](_0x4ff87d[_0xddb4('0x16')]['include'],function(_0x1296e7){return{'model':db[_0x1296e7[_0xddb4('0x1d')]],'as':_0x1296e7['as'],'attributes':_0x1296e7[_0xddb4('0x19')],'include':_0x1296e7['include']?_[_0xddb4('0x1c')](_0x1296e7[_0xddb4('0x1b')],function(_0xbc2c6e){return{'model':db[_0xbc2c6e[_0xddb4('0x1d')]],'as':_0xbc2c6e['as'],'attributes':_0xbc2c6e[_0xddb4('0x19')],'include':_0xbc2c6e['include']?_[_0xddb4('0x1c')](_0xbc2c6e[_0xddb4('0x1b')],function(_0x3b88b8){return{'model':db[_0x3b88b8['model']],'as':_0x3b88b8['as'],'attributes':_0x3b88b8[_0xddb4('0x19')]};}):[]};}):[]};}):[]:[]})[_0xddb4('0x9')](function(_0x38f6da){logger[_0xddb4('0xa')](_0xddb4('0x1e'),_0x4ff87d);logger['debug'](_0xddb4('0x1e'),_0x4ff87d,JSON[_0xddb4('0xf')](_0x38f6da));_0x20bc16(_0x38f6da);})[_0xddb4('0x14')](function(_0x305075){logger['error'](_0xddb4('0x1e'),_0x305075['message'],_0x4ff87d);_0x435ccc(_0x1efebb[_0xddb4('0x10')](0x1f4,_0x305075[_0xddb4('0x12')]));});});};exports['ShowSalesforceAccount']=function(_0x224734){var _0x1dbaa9=this;return new Promise(function(_0x4a5d7b,_0x2c2aee){return db['SalesforceAccount'][_0xddb4('0x1f')]({'raw':_0x224734[_0xddb4('0x16')]?_0x224734[_0xddb4('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x224734['options']?_0x224734[_0xddb4('0x16')][_0xddb4('0x18')]||null:null,'attributes':_0x224734['options']?_0x224734['options'][_0xddb4('0x19')]||null:null,'include':_0x224734['options']?_0x224734[_0xddb4('0x16')][_0xddb4('0x1b')]?_[_0xddb4('0x1c')](_0x224734['options'][_0xddb4('0x1b')],function(_0x46f411){return{'model':db[_0x46f411['model']],'as':_0x46f411['as'],'attributes':_0x46f411[_0xddb4('0x19')],'include':_0x46f411['include']?_['map'](_0x46f411[_0xddb4('0x1b')],function(_0x4ce643){return{'model':db[_0x4ce643['model']],'as':_0x4ce643['as'],'attributes':_0x4ce643[_0xddb4('0x19')],'include':_0x4ce643[_0xddb4('0x1b')]?_[_0xddb4('0x1c')](_0x4ce643[_0xddb4('0x1b')],function(_0x26807e){return{'model':db[_0x26807e[_0xddb4('0x1d')]],'as':_0x26807e['as'],'attributes':_0x26807e[_0xddb4('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2699f9){logger['info'](_0xddb4('0x20'),_0x224734);logger[_0xddb4('0xd')](_0xddb4('0x20'),_0x224734,JSON[_0xddb4('0xf')](_0x2699f9));_0x4a5d7b(_0x2699f9);})[_0xddb4('0x14')](function(_0x2b72db){logger['error'](_0xddb4('0x20'),_0x2b72db[_0xddb4('0x12')],_0x224734);_0x2c2aee(_0x1dbaa9[_0xddb4('0x10')](0x1f4,_0x2b72db[_0xddb4('0x12')]));});});};
\ No newline at end of file