Built motion from commit fade34fd.|2.5.41
[motion2.git] / server / api / intSalesforceAccount / intSalesforceAccount.rpc.js
index c700ec7..893f72e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd82=['include','map','model','then','ShowSalesforceAccount','find','lodash','util','moment','ioredis','../../mysqldb','../../config/logger','../../config/environment','client','http','request','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetSalesforceAccount','SalesforceAccount','findAll','options','raw','where','attributes','limit'];(function(_0x12f08d,_0x5f13b3){var _0x3a49cd=function(_0x39c753){while(--_0x39c753){_0x12f08d['push'](_0x12f08d['shift']());}};_0x3a49cd(++_0x5f13b3);}(_0xfd82,0x138));var _0x2fd8=function(_0x34956e,_0xbcaeef){_0x34956e=_0x34956e-0x0;var _0x156cce=_0xfd82[_0x34956e];return _0x156cce;};'use strict';var _=require(_0x2fd8('0x0'));var util=require(_0x2fd8('0x1'));var moment=require(_0x2fd8('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2fd8('0x3'));var db=require(_0x2fd8('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x2fd8('0x5'))('rpc');var config=require(_0x2fd8('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x2fd8('0x7')][_0x2fd8('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2a0844,_0x322136,_0x13bb55){return new BPromise(function(_0x2f9120,_0x13960a){return client[_0x2fd8('0x9')](_0x2a0844,_0x13bb55)['then'](function(_0xad92fb){logger[_0x2fd8('0xa')](_0x2fd8('0xb'),_0x322136,_0x2fd8('0xc'));logger[_0x2fd8('0xd')](_0x2fd8('0xe'),_0x322136,_0x2fd8('0xc'),JSON[_0x2fd8('0xf')](_0xad92fb));if(_0xad92fb[_0x2fd8('0x10')]){if(_0xad92fb[_0x2fd8('0x10')]['code']===0x1f4){logger[_0x2fd8('0x10')](_0x2fd8('0xb'),_0x322136,_0xad92fb[_0x2fd8('0x10')][_0x2fd8('0x11')]);return _0x13960a(_0xad92fb[_0x2fd8('0x10')]['message']);}logger[_0x2fd8('0x10')]('SalesforceAccount,\x20%s,\x20%s',_0x322136,_0xad92fb[_0x2fd8('0x10')][_0x2fd8('0x11')]);return _0x2f9120(_0xad92fb[_0x2fd8('0x10')][_0x2fd8('0x11')]);}else{logger[_0x2fd8('0xa')]('SalesforceAccount,\x20%s,\x20%s',_0x322136,_0x2fd8('0xc'));_0x2f9120(_0xad92fb[_0x2fd8('0x12')][_0x2fd8('0x11')]);}})[_0x2fd8('0x13')](function(_0x54b5b1){logger[_0x2fd8('0x10')](_0x2fd8('0xb'),_0x322136,_0x54b5b1);_0x13960a(_0x54b5b1);});});}exports[_0x2fd8('0x14')]=function(_0x545b98){var _0x3b8040=this;return new Promise(function(_0x47bf61,_0x8a5227){return db[_0x2fd8('0x15')][_0x2fd8('0x16')]({'raw':_0x545b98['options']?_0x545b98[_0x2fd8('0x17')][_0x2fd8('0x18')]===undefined?!![]:![]:!![],'where':_0x545b98[_0x2fd8('0x17')]?_0x545b98[_0x2fd8('0x17')][_0x2fd8('0x19')]||null:null,'attributes':_0x545b98[_0x2fd8('0x17')]?_0x545b98[_0x2fd8('0x17')][_0x2fd8('0x1a')]||null:null,'limit':_0x545b98[_0x2fd8('0x17')]?_0x545b98[_0x2fd8('0x17')][_0x2fd8('0x1b')]||null:null,'include':_0x545b98[_0x2fd8('0x17')]?_0x545b98[_0x2fd8('0x17')][_0x2fd8('0x1c')]?_[_0x2fd8('0x1d')](_0x545b98['options'][_0x2fd8('0x1c')],function(_0x5a454b){return{'model':db[_0x5a454b[_0x2fd8('0x1e')]],'as':_0x5a454b['as'],'attributes':_0x5a454b[_0x2fd8('0x1a')],'include':_0x5a454b[_0x2fd8('0x1c')]?_[_0x2fd8('0x1d')](_0x5a454b[_0x2fd8('0x1c')],function(_0xf525e){return{'model':db[_0xf525e[_0x2fd8('0x1e')]],'as':_0xf525e['as'],'attributes':_0xf525e[_0x2fd8('0x1a')],'include':_0xf525e[_0x2fd8('0x1c')]?_['map'](_0xf525e[_0x2fd8('0x1c')],function(_0x3d3dc3){return{'model':db[_0x3d3dc3[_0x2fd8('0x1e')]],'as':_0x3d3dc3['as'],'attributes':_0x3d3dc3[_0x2fd8('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x2fd8('0x1f')](function(_0x1d7530){logger['info'](_0x2fd8('0x14'),_0x545b98);logger['debug'](_0x2fd8('0x14'),_0x545b98,JSON['stringify'](_0x1d7530));_0x47bf61(_0x1d7530);})[_0x2fd8('0x13')](function(_0x525f52){logger[_0x2fd8('0x10')](_0x2fd8('0x14'),_0x525f52[_0x2fd8('0x11')],_0x545b98);_0x8a5227(_0x3b8040[_0x2fd8('0x10')](0x1f4,_0x525f52['message']));});});};exports[_0x2fd8('0x20')]=function(_0x3473e4){var _0x5c49ab=this;return new Promise(function(_0x319d40,_0xcddafe){return db['SalesforceAccount'][_0x2fd8('0x21')]({'raw':_0x3473e4['options']?_0x3473e4[_0x2fd8('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x3473e4[_0x2fd8('0x17')]?_0x3473e4['options'][_0x2fd8('0x19')]||null:null,'attributes':_0x3473e4['options']?_0x3473e4['options'][_0x2fd8('0x1a')]||null:null,'include':_0x3473e4['options']?_0x3473e4[_0x2fd8('0x17')]['include']?_[_0x2fd8('0x1d')](_0x3473e4[_0x2fd8('0x17')][_0x2fd8('0x1c')],function(_0x4f18e7){return{'model':db[_0x4f18e7[_0x2fd8('0x1e')]],'as':_0x4f18e7['as'],'attributes':_0x4f18e7[_0x2fd8('0x1a')],'include':_0x4f18e7['include']?_[_0x2fd8('0x1d')](_0x4f18e7['include'],function(_0x58ab9d){return{'model':db[_0x58ab9d[_0x2fd8('0x1e')]],'as':_0x58ab9d['as'],'attributes':_0x58ab9d[_0x2fd8('0x1a')],'include':_0x58ab9d[_0x2fd8('0x1c')]?_[_0x2fd8('0x1d')](_0x58ab9d['include'],function(_0x4f2a7f){return{'model':db[_0x4f2a7f[_0x2fd8('0x1e')]],'as':_0x4f2a7f['as'],'attributes':_0x4f2a7f[_0x2fd8('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1ef955){logger[_0x2fd8('0xa')](_0x2fd8('0x20'),_0x3473e4);logger['debug'](_0x2fd8('0x20'),_0x3473e4,JSON[_0x2fd8('0xf')](_0x1ef955));_0x319d40(_0x1ef955);})[_0x2fd8('0x13')](function(_0x164afe){logger[_0x2fd8('0x10')]('ShowSalesforceAccount',_0x164afe['message'],_0x3473e4);_0xcddafe(_0x5c49ab[_0x2fd8('0x10')](0x1f4,_0x164afe[_0x2fd8('0x11')]));});});};
\ No newline at end of file
+var _0x9ccb=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','request\x20sent','stringify','error','code','message','SalesforceAccount,\x20%s,\x20%s','catch','GetSalesforceAccount','SalesforceAccount','findAll','options','where','attributes','include','map','model','find','raw','ShowSalesforceAccount'];(function(_0x4709c0,_0x3396c7){var _0x13348b=function(_0x426235){while(--_0x426235){_0x4709c0['push'](_0x4709c0['shift']());}};_0x13348b(++_0x3396c7);}(_0x9ccb,0x1ea));var _0xb9cc=function(_0x312abc,_0x17f25c){_0x312abc=_0x312abc-0x0;var _0x314298=_0x9ccb[_0x312abc];return _0x314298;};'use strict';var _=require('lodash');var util=require(_0xb9cc('0x0'));var moment=require(_0xb9cc('0x1'));var BPromise=require(_0xb9cc('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb9cc('0x3'));var db=require(_0xb9cc('0x4'))['db'];var utils=require(_0xb9cc('0x5'));var logger=require(_0xb9cc('0x6'))(_0xb9cc('0x7'));var config=require(_0xb9cc('0x8'));var jayson=require(_0xb9cc('0x9'));var client=jayson[_0xb9cc('0xa')][_0xb9cc('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3ef5bf,_0x190a97,_0x342cef){return new BPromise(function(_0x38e01f,_0x5c8997){return client[_0xb9cc('0xc')](_0x3ef5bf,_0x342cef)[_0xb9cc('0xd')](function(_0x42916b){logger[_0xb9cc('0xe')]('SalesforceAccount,\x20%s,\x20%s',_0x190a97,'request\x20sent');logger[_0xb9cc('0xf')]('SalesforceAccount,\x20%s,\x20%s,\x20%s',_0x190a97,_0xb9cc('0x10'),JSON[_0xb9cc('0x11')](_0x42916b));if(_0x42916b[_0xb9cc('0x12')]){if(_0x42916b[_0xb9cc('0x12')][_0xb9cc('0x13')]===0x1f4){logger[_0xb9cc('0x12')]('SalesforceAccount,\x20%s,\x20%s',_0x190a97,_0x42916b[_0xb9cc('0x12')][_0xb9cc('0x14')]);return _0x5c8997(_0x42916b[_0xb9cc('0x12')][_0xb9cc('0x14')]);}logger[_0xb9cc('0x12')](_0xb9cc('0x15'),_0x190a97,_0x42916b['error'][_0xb9cc('0x14')]);return _0x38e01f(_0x42916b[_0xb9cc('0x12')][_0xb9cc('0x14')]);}else{logger[_0xb9cc('0xe')](_0xb9cc('0x15'),_0x190a97,_0xb9cc('0x10'));_0x38e01f(_0x42916b['result'][_0xb9cc('0x14')]);}})[_0xb9cc('0x16')](function(_0x3a8a04){logger[_0xb9cc('0x12')](_0xb9cc('0x15'),_0x190a97,_0x3a8a04);_0x5c8997(_0x3a8a04);});});}exports[_0xb9cc('0x17')]=function(_0x2ff69a){var _0x61eb19=this;return new Promise(function(_0x5ac83c,_0x42f248){return db[_0xb9cc('0x18')][_0xb9cc('0x19')]({'raw':_0x2ff69a[_0xb9cc('0x1a')]?_0x2ff69a[_0xb9cc('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x2ff69a[_0xb9cc('0x1a')]?_0x2ff69a['options'][_0xb9cc('0x1b')]||null:null,'attributes':_0x2ff69a[_0xb9cc('0x1a')]?_0x2ff69a[_0xb9cc('0x1a')][_0xb9cc('0x1c')]||null:null,'limit':_0x2ff69a['options']?_0x2ff69a[_0xb9cc('0x1a')]['limit']||null:null,'include':_0x2ff69a[_0xb9cc('0x1a')]?_0x2ff69a['options'][_0xb9cc('0x1d')]?_[_0xb9cc('0x1e')](_0x2ff69a[_0xb9cc('0x1a')][_0xb9cc('0x1d')],function(_0x95054b){return{'model':db[_0x95054b[_0xb9cc('0x1f')]],'as':_0x95054b['as'],'attributes':_0x95054b[_0xb9cc('0x1c')],'include':_0x95054b[_0xb9cc('0x1d')]?_[_0xb9cc('0x1e')](_0x95054b[_0xb9cc('0x1d')],function(_0x1f8f1c){return{'model':db[_0x1f8f1c[_0xb9cc('0x1f')]],'as':_0x1f8f1c['as'],'attributes':_0x1f8f1c[_0xb9cc('0x1c')],'include':_0x1f8f1c[_0xb9cc('0x1d')]?_[_0xb9cc('0x1e')](_0x1f8f1c[_0xb9cc('0x1d')],function(_0x8d2660){return{'model':db[_0x8d2660['model']],'as':_0x8d2660['as'],'attributes':_0x8d2660[_0xb9cc('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xb9cc('0xd')](function(_0x392dd0){logger[_0xb9cc('0xe')]('GetSalesforceAccount',_0x2ff69a);logger[_0xb9cc('0xf')](_0xb9cc('0x17'),_0x2ff69a,JSON['stringify'](_0x392dd0));_0x5ac83c(_0x392dd0);})['catch'](function(_0x235211){logger[_0xb9cc('0x12')]('GetSalesforceAccount',_0x235211[_0xb9cc('0x14')],_0x2ff69a);_0x42f248(_0x61eb19['error'](0x1f4,_0x235211[_0xb9cc('0x14')]));});});};exports['ShowSalesforceAccount']=function(_0x29bfdd){var _0x376ed8=this;return new Promise(function(_0x10b277,_0x1bec0e){return db[_0xb9cc('0x18')][_0xb9cc('0x20')]({'raw':_0x29bfdd[_0xb9cc('0x1a')]?_0x29bfdd[_0xb9cc('0x1a')][_0xb9cc('0x21')]===undefined?!![]:![]:!![],'where':_0x29bfdd[_0xb9cc('0x1a')]?_0x29bfdd[_0xb9cc('0x1a')]['where']||null:null,'attributes':_0x29bfdd[_0xb9cc('0x1a')]?_0x29bfdd[_0xb9cc('0x1a')][_0xb9cc('0x1c')]||null:null,'include':_0x29bfdd[_0xb9cc('0x1a')]?_0x29bfdd['options']['include']?_['map'](_0x29bfdd[_0xb9cc('0x1a')][_0xb9cc('0x1d')],function(_0x5850a9){return{'model':db[_0x5850a9[_0xb9cc('0x1f')]],'as':_0x5850a9['as'],'attributes':_0x5850a9[_0xb9cc('0x1c')],'include':_0x5850a9[_0xb9cc('0x1d')]?_[_0xb9cc('0x1e')](_0x5850a9[_0xb9cc('0x1d')],function(_0x31befb){return{'model':db[_0x31befb['model']],'as':_0x31befb['as'],'attributes':_0x31befb[_0xb9cc('0x1c')],'include':_0x31befb[_0xb9cc('0x1d')]?_['map'](_0x31befb[_0xb9cc('0x1d')],function(_0x20d3db){return{'model':db[_0x20d3db['model']],'as':_0x20d3db['as'],'attributes':_0x20d3db[_0xb9cc('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5c45b8){logger[_0xb9cc('0xe')](_0xb9cc('0x22'),_0x29bfdd);logger[_0xb9cc('0xf')](_0xb9cc('0x22'),_0x29bfdd,JSON[_0xb9cc('0x11')](_0x5c45b8));_0x10b277(_0x5c45b8);})[_0xb9cc('0x16')](function(_0x6eec20){logger[_0xb9cc('0x12')](_0xb9cc('0x22'),_0x6eec20[_0xb9cc('0x14')],_0x29bfdd);_0x1bec0e(_0x376ed8['error'](0x1f4,_0x6eec20[_0xb9cc('0x14')]));});});};
\ No newline at end of file