Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / intZohoAccount / intZohoAccount.rpc.js
index ad6f4d6..147093d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb5fb=['../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','ZohoAccount,\x20%s,\x20%s','message','GetZohoAccount','findAll','options','where','limit','map','include','model','attributes','then','ShowZohoAccount','ZohoAccount','raw','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0xd1f099,_0x48a728){var _0x5db86d=function(_0x81c62f){while(--_0x81c62f){_0xd1f099['push'](_0xd1f099['shift']());}};_0x5db86d(++_0x48a728);}(_0xb5fb,0x172));var _0xbb5f=function(_0x7d5b1b,_0x20e692){_0x7d5b1b=_0x7d5b1b-0x0;var _0x51988c=_0xb5fb[_0x7d5b1b];return _0x51988c;};'use strict';var _=require(_0xbb5f('0x0'));var util=require(_0xbb5f('0x1'));var moment=require(_0xbb5f('0x2'));var BPromise=require(_0xbb5f('0x3'));var rs=require(_0xbb5f('0x4'));var fs=require('fs');var Redis=require(_0xbb5f('0x5'));var db=require(_0xbb5f('0x6'))['db'];var utils=require(_0xbb5f('0x7'));var logger=require(_0xbb5f('0x8'))(_0xbb5f('0x9'));var config=require(_0xbb5f('0xa'));var jayson=require(_0xbb5f('0xb'));var client=jayson[_0xbb5f('0xc')][_0xbb5f('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x487a1a,_0x597050,_0x317cd9){return new BPromise(function(_0x5e7943,_0x5b91){return client[_0xbb5f('0xe')](_0x487a1a,_0x317cd9)['then'](function(_0x4f13a9){logger[_0xbb5f('0xf')]('ZohoAccount,\x20%s,\x20%s',_0x597050,_0xbb5f('0x10'));logger[_0xbb5f('0x11')](_0xbb5f('0x12'),_0x597050,_0xbb5f('0x10'),JSON[_0xbb5f('0x13')](_0x4f13a9));if(_0x4f13a9[_0xbb5f('0x14')]){if(_0x4f13a9[_0xbb5f('0x14')][_0xbb5f('0x15')]===0x1f4){logger['error'](_0xbb5f('0x16'),_0x597050,_0x4f13a9['error'][_0xbb5f('0x17')]);return _0x5b91(_0x4f13a9[_0xbb5f('0x14')][_0xbb5f('0x17')]);}logger['error'](_0xbb5f('0x16'),_0x597050,_0x4f13a9[_0xbb5f('0x14')]['message']);return _0x5e7943(_0x4f13a9[_0xbb5f('0x14')][_0xbb5f('0x17')]);}else{logger[_0xbb5f('0xf')](_0xbb5f('0x16'),_0x597050,'request\x20sent');_0x5e7943(_0x4f13a9['result'][_0xbb5f('0x17')]);}})['catch'](function(_0xdf4ec8){logger[_0xbb5f('0x14')]('ZohoAccount,\x20%s,\x20%s',_0x597050,_0xdf4ec8);_0x5b91(_0xdf4ec8);});});}exports[_0xbb5f('0x18')]=function(_0x4cc050){var _0x313a0e=this;return new Promise(function(_0xca33c1,_0x5944f9){return db['ZohoAccount'][_0xbb5f('0x19')]({'raw':_0x4cc050[_0xbb5f('0x1a')]?_0x4cc050[_0xbb5f('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x4cc050[_0xbb5f('0x1a')]?_0x4cc050['options'][_0xbb5f('0x1b')]||null:null,'attributes':_0x4cc050[_0xbb5f('0x1a')]?_0x4cc050[_0xbb5f('0x1a')]['attributes']||null:null,'limit':_0x4cc050[_0xbb5f('0x1a')]?_0x4cc050['options'][_0xbb5f('0x1c')]||null:null,'include':_0x4cc050['options']?_0x4cc050[_0xbb5f('0x1a')]['include']?_[_0xbb5f('0x1d')](_0x4cc050['options'][_0xbb5f('0x1e')],function(_0xb35efe){return{'model':db[_0xb35efe[_0xbb5f('0x1f')]],'as':_0xb35efe['as'],'attributes':_0xb35efe['attributes'],'include':_0xb35efe[_0xbb5f('0x1e')]?_['map'](_0xb35efe['include'],function(_0x41be1c){return{'model':db[_0x41be1c[_0xbb5f('0x1f')]],'as':_0x41be1c['as'],'attributes':_0x41be1c[_0xbb5f('0x20')],'include':_0x41be1c[_0xbb5f('0x1e')]?_[_0xbb5f('0x1d')](_0x41be1c[_0xbb5f('0x1e')],function(_0x150e10){return{'model':db[_0x150e10[_0xbb5f('0x1f')]],'as':_0x150e10['as'],'attributes':_0x150e10[_0xbb5f('0x20')]};}):[]};}):[]};}):[]:[]})[_0xbb5f('0x21')](function(_0xa87ebb){logger[_0xbb5f('0xf')](_0xbb5f('0x18'),_0x4cc050);logger[_0xbb5f('0x11')](_0xbb5f('0x18'),_0x4cc050,JSON[_0xbb5f('0x13')](_0xa87ebb));_0xca33c1(_0xa87ebb);})['catch'](function(_0x5a2f1a){logger[_0xbb5f('0x14')](_0xbb5f('0x18'),_0x5a2f1a['message'],_0x4cc050);_0x5944f9(_0x313a0e[_0xbb5f('0x14')](0x1f4,_0x5a2f1a['message']));});});};exports[_0xbb5f('0x22')]=function(_0x30641a){var _0xa2adf2=this;return new Promise(function(_0x24e8c2,_0x22d528){return db[_0xbb5f('0x23')]['find']({'raw':_0x30641a[_0xbb5f('0x1a')]?_0x30641a[_0xbb5f('0x1a')][_0xbb5f('0x24')]===undefined?!![]:![]:!![],'where':_0x30641a[_0xbb5f('0x1a')]?_0x30641a[_0xbb5f('0x1a')][_0xbb5f('0x1b')]||null:null,'attributes':_0x30641a[_0xbb5f('0x1a')]?_0x30641a[_0xbb5f('0x1a')][_0xbb5f('0x20')]||null:null,'include':_0x30641a[_0xbb5f('0x1a')]?_0x30641a[_0xbb5f('0x1a')][_0xbb5f('0x1e')]?_['map'](_0x30641a[_0xbb5f('0x1a')][_0xbb5f('0x1e')],function(_0x543b0e){return{'model':db[_0x543b0e[_0xbb5f('0x1f')]],'as':_0x543b0e['as'],'attributes':_0x543b0e['attributes'],'include':_0x543b0e[_0xbb5f('0x1e')]?_['map'](_0x543b0e['include'],function(_0x25c061){return{'model':db[_0x25c061[_0xbb5f('0x1f')]],'as':_0x25c061['as'],'attributes':_0x25c061[_0xbb5f('0x20')],'include':_0x25c061[_0xbb5f('0x1e')]?_[_0xbb5f('0x1d')](_0x25c061[_0xbb5f('0x1e')],function(_0x7769fe){return{'model':db[_0x7769fe[_0xbb5f('0x1f')]],'as':_0x7769fe['as'],'attributes':_0x7769fe[_0xbb5f('0x20')]};}):[]};}):[]};}):[]:[]})[_0xbb5f('0x21')](function(_0x2eb51a){logger[_0xbb5f('0xf')](_0xbb5f('0x22'),_0x30641a);logger['debug'](_0xbb5f('0x22'),_0x30641a,JSON[_0xbb5f('0x13')](_0x2eb51a));_0x24e8c2(_0x2eb51a);})[_0xbb5f('0x25')](function(_0x39a895){logger['error'](_0xbb5f('0x22'),_0x39a895['message'],_0x30641a);_0x22d528(_0xa2adf2[_0xbb5f('0x14')](0x1f4,_0x39a895[_0xbb5f('0x17')]));});});};
\ No newline at end of file
+var _0xa30a=['util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','ZohoAccount,\x20%s,\x20%s','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','GetZohoAccount','findAll','options','where','attributes','limit','include','model','map','debug','catch','ShowZohoAccount','ZohoAccount','find','raw','lodash'];(function(_0x2f9b50,_0x1bf527){var _0x43bb2f=function(_0x5d6a2a){while(--_0x5d6a2a){_0x2f9b50['push'](_0x2f9b50['shift']());}};_0x43bb2f(++_0x1bf527);}(_0xa30a,0xd7));var _0xaa30=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xa30a[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xaa30('0x0'));var util=require(_0xaa30('0x1'));var moment=require(_0xaa30('0x2'));var BPromise=require('bluebird');var rs=require(_0xaa30('0x3'));var fs=require('fs');var Redis=require(_0xaa30('0x4'));var db=require(_0xaa30('0x5'))['db'];var utils=require(_0xaa30('0x6'));var logger=require(_0xaa30('0x7'))(_0xaa30('0x8'));var config=require(_0xaa30('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xaa30('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x8af448,_0x14fe09,_0x42dc22){return new BPromise(function(_0x5d076a,_0xedbc45){return client[_0xaa30('0xb')](_0x8af448,_0x42dc22)[_0xaa30('0xc')](function(_0x59d028){logger[_0xaa30('0xd')](_0xaa30('0xe'),_0x14fe09,'request\x20sent');logger['debug'](_0xaa30('0xf'),_0x14fe09,'request\x20sent',JSON[_0xaa30('0x10')](_0x59d028));if(_0x59d028[_0xaa30('0x11')]){if(_0x59d028[_0xaa30('0x11')][_0xaa30('0x12')]===0x1f4){logger['error'](_0xaa30('0xe'),_0x14fe09,_0x59d028[_0xaa30('0x11')][_0xaa30('0x13')]);return _0xedbc45(_0x59d028['error'][_0xaa30('0x13')]);}logger[_0xaa30('0x11')](_0xaa30('0xe'),_0x14fe09,_0x59d028[_0xaa30('0x11')][_0xaa30('0x13')]);return _0x5d076a(_0x59d028[_0xaa30('0x11')][_0xaa30('0x13')]);}else{logger[_0xaa30('0xd')](_0xaa30('0xe'),_0x14fe09,_0xaa30('0x14'));_0x5d076a(_0x59d028['result'][_0xaa30('0x13')]);}})['catch'](function(_0x5eb356){logger[_0xaa30('0x11')](_0xaa30('0xe'),_0x14fe09,_0x5eb356);_0xedbc45(_0x5eb356);});});}exports[_0xaa30('0x15')]=function(_0x540e36){var _0x54fa49=this;return new Promise(function(_0x53f9fd,_0x23ad3b){return db['ZohoAccount'][_0xaa30('0x16')]({'raw':_0x540e36[_0xaa30('0x17')]?_0x540e36['options']['raw']===undefined?!![]:![]:!![],'where':_0x540e36['options']?_0x540e36[_0xaa30('0x17')][_0xaa30('0x18')]||null:null,'attributes':_0x540e36[_0xaa30('0x17')]?_0x540e36[_0xaa30('0x17')][_0xaa30('0x19')]||null:null,'limit':_0x540e36['options']?_0x540e36[_0xaa30('0x17')][_0xaa30('0x1a')]||null:null,'include':_0x540e36[_0xaa30('0x17')]?_0x540e36[_0xaa30('0x17')][_0xaa30('0x1b')]?_['map'](_0x540e36[_0xaa30('0x17')][_0xaa30('0x1b')],function(_0x2fecdd){return{'model':db[_0x2fecdd[_0xaa30('0x1c')]],'as':_0x2fecdd['as'],'attributes':_0x2fecdd['attributes'],'include':_0x2fecdd[_0xaa30('0x1b')]?_[_0xaa30('0x1d')](_0x2fecdd[_0xaa30('0x1b')],function(_0x12da2f){return{'model':db[_0x12da2f[_0xaa30('0x1c')]],'as':_0x12da2f['as'],'attributes':_0x12da2f[_0xaa30('0x19')],'include':_0x12da2f['include']?_[_0xaa30('0x1d')](_0x12da2f[_0xaa30('0x1b')],function(_0x5d4da8){return{'model':db[_0x5d4da8[_0xaa30('0x1c')]],'as':_0x5d4da8['as'],'attributes':_0x5d4da8['attributes']};}):[]};}):[]};}):[]:[]})[_0xaa30('0xc')](function(_0x33a0c9){logger[_0xaa30('0xd')](_0xaa30('0x15'),_0x540e36);logger[_0xaa30('0x1e')](_0xaa30('0x15'),_0x540e36,JSON[_0xaa30('0x10')](_0x33a0c9));_0x53f9fd(_0x33a0c9);})[_0xaa30('0x1f')](function(_0x1f288c){logger[_0xaa30('0x11')](_0xaa30('0x15'),_0x1f288c[_0xaa30('0x13')],_0x540e36);_0x23ad3b(_0x54fa49[_0xaa30('0x11')](0x1f4,_0x1f288c[_0xaa30('0x13')]));});});};exports[_0xaa30('0x20')]=function(_0x1a3f64){var _0x230d56=this;return new Promise(function(_0x1fa8d4,_0x484ffb){return db[_0xaa30('0x21')][_0xaa30('0x22')]({'raw':_0x1a3f64[_0xaa30('0x17')]?_0x1a3f64[_0xaa30('0x17')][_0xaa30('0x23')]===undefined?!![]:![]:!![],'where':_0x1a3f64[_0xaa30('0x17')]?_0x1a3f64['options']['where']||null:null,'attributes':_0x1a3f64['options']?_0x1a3f64[_0xaa30('0x17')][_0xaa30('0x19')]||null:null,'include':_0x1a3f64[_0xaa30('0x17')]?_0x1a3f64[_0xaa30('0x17')][_0xaa30('0x1b')]?_['map'](_0x1a3f64['options'][_0xaa30('0x1b')],function(_0x2d26fb){return{'model':db[_0x2d26fb['model']],'as':_0x2d26fb['as'],'attributes':_0x2d26fb[_0xaa30('0x19')],'include':_0x2d26fb['include']?_[_0xaa30('0x1d')](_0x2d26fb['include'],function(_0x2ae4ed){return{'model':db[_0x2ae4ed[_0xaa30('0x1c')]],'as':_0x2ae4ed['as'],'attributes':_0x2ae4ed['attributes'],'include':_0x2ae4ed[_0xaa30('0x1b')]?_[_0xaa30('0x1d')](_0x2ae4ed[_0xaa30('0x1b')],function(_0x2cca77){return{'model':db[_0x2cca77[_0xaa30('0x1c')]],'as':_0x2cca77['as'],'attributes':_0x2cca77[_0xaa30('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x30712f){logger[_0xaa30('0xd')]('ShowZohoAccount',_0x1a3f64);logger[_0xaa30('0x1e')](_0xaa30('0x20'),_0x1a3f64,JSON[_0xaa30('0x10')](_0x30712f));_0x1fa8d4(_0x30712f);})['catch'](function(_0x4add3e){logger[_0xaa30('0x11')](_0xaa30('0x20'),_0x4add3e[_0xaa30('0x13')],_0x1a3f64);_0x484ffb(_0x230d56[_0xaa30('0x11')](0x1f4,_0x4add3e[_0xaa30('0x13')]));});});};
\ No newline at end of file