Built motion from commit ff426b3f.|2.6.29
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index d870640..ac7967f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa093=['message','Dynamics365Account,\x20%s,\x20%s','catch','GetDynamics365Account','findAll','options','where','attributes','limit','include','model','map','stringify','ShowDynamics365Account','Dynamics365Account','find','raw','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x280b2c,_0x39e3c0){var _0x2c240c=function(_0x59ae47){while(--_0x59ae47){_0x280b2c['push'](_0x280b2c['shift']());}};_0x2c240c(++_0x39e3c0);}(_0xa093,0xb6));var _0x3a09=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa093[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x3a09('0x0'));var BPromise=require('bluebird');var rs=require(_0x3a09('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3a09('0x2'))['db'];var utils=require(_0x3a09('0x3'));var logger=require(_0x3a09('0x4'))('rpc');var config=require(_0x3a09('0x5'));var jayson=require(_0x3a09('0x6'));var client=jayson['client'][_0x3a09('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x44d478,_0x5838fd,_0x52c59e){return new BPromise(function(_0x53bcff,_0x36b765){return client[_0x3a09('0x8')](_0x44d478,_0x52c59e)[_0x3a09('0x9')](function(_0x1e4d75){logger[_0x3a09('0xa')]('Dynamics365Account,\x20%s,\x20%s',_0x5838fd,_0x3a09('0xb'));logger[_0x3a09('0xc')](_0x3a09('0xd'),_0x5838fd,_0x3a09('0xb'),JSON['stringify'](_0x1e4d75));if(_0x1e4d75[_0x3a09('0xe')]){if(_0x1e4d75[_0x3a09('0xe')][_0x3a09('0xf')]===0x1f4){logger['error']('Dynamics365Account,\x20%s,\x20%s',_0x5838fd,_0x1e4d75['error'][_0x3a09('0x10')]);return _0x36b765(_0x1e4d75[_0x3a09('0xe')][_0x3a09('0x10')]);}logger[_0x3a09('0xe')](_0x3a09('0x11'),_0x5838fd,_0x1e4d75[_0x3a09('0xe')][_0x3a09('0x10')]);return _0x53bcff(_0x1e4d75['error'][_0x3a09('0x10')]);}else{logger[_0x3a09('0xa')]('Dynamics365Account,\x20%s,\x20%s',_0x5838fd,_0x3a09('0xb'));_0x53bcff(_0x1e4d75['result'][_0x3a09('0x10')]);}})[_0x3a09('0x12')](function(_0x1238c6){logger[_0x3a09('0xe')](_0x3a09('0x11'),_0x5838fd,_0x1238c6);_0x36b765(_0x1238c6);});});}exports[_0x3a09('0x13')]=function(_0x492439){var _0x249adf=this;return new Promise(function(_0x4c8274,_0xaff68f){return db['Dynamics365Account'][_0x3a09('0x14')]({'raw':_0x492439[_0x3a09('0x15')]?_0x492439['options']['raw']===undefined?!![]:![]:!![],'where':_0x492439[_0x3a09('0x15')]?_0x492439['options'][_0x3a09('0x16')]||null:null,'attributes':_0x492439[_0x3a09('0x15')]?_0x492439[_0x3a09('0x15')][_0x3a09('0x17')]||null:null,'limit':_0x492439[_0x3a09('0x15')]?_0x492439[_0x3a09('0x15')][_0x3a09('0x18')]||null:null,'include':_0x492439[_0x3a09('0x15')]?_0x492439['options'][_0x3a09('0x19')]?_['map'](_0x492439[_0x3a09('0x15')][_0x3a09('0x19')],function(_0x34a465){return{'model':db[_0x34a465[_0x3a09('0x1a')]],'as':_0x34a465['as'],'attributes':_0x34a465['attributes'],'include':_0x34a465[_0x3a09('0x19')]?_['map'](_0x34a465[_0x3a09('0x19')],function(_0x557a4d){return{'model':db[_0x557a4d[_0x3a09('0x1a')]],'as':_0x557a4d['as'],'attributes':_0x557a4d[_0x3a09('0x17')],'include':_0x557a4d[_0x3a09('0x19')]?_[_0x3a09('0x1b')](_0x557a4d[_0x3a09('0x19')],function(_0x21ac47){return{'model':db[_0x21ac47[_0x3a09('0x1a')]],'as':_0x21ac47['as'],'attributes':_0x21ac47[_0x3a09('0x17')]};}):[]};}):[]};}):[]:[]})[_0x3a09('0x9')](function(_0x5cb8cf){logger[_0x3a09('0xa')](_0x3a09('0x13'),_0x492439);logger[_0x3a09('0xc')]('GetDynamics365Account',_0x492439,JSON[_0x3a09('0x1c')](_0x5cb8cf));_0x4c8274(_0x5cb8cf);})[_0x3a09('0x12')](function(_0x2fb1bf){logger[_0x3a09('0xe')](_0x3a09('0x13'),_0x2fb1bf[_0x3a09('0x10')],_0x492439);_0xaff68f(_0x249adf[_0x3a09('0xe')](0x1f4,_0x2fb1bf['message']));});});};exports[_0x3a09('0x1d')]=function(_0x6e287d){var _0x313881=this;return new Promise(function(_0x2d8c3e,_0x1f4fe9){return db[_0x3a09('0x1e')][_0x3a09('0x1f')]({'raw':_0x6e287d[_0x3a09('0x15')]?_0x6e287d[_0x3a09('0x15')][_0x3a09('0x20')]===undefined?!![]:![]:!![],'where':_0x6e287d['options']?_0x6e287d[_0x3a09('0x15')][_0x3a09('0x16')]||null:null,'attributes':_0x6e287d[_0x3a09('0x15')]?_0x6e287d['options'][_0x3a09('0x17')]||null:null,'include':_0x6e287d['options']?_0x6e287d[_0x3a09('0x15')][_0x3a09('0x19')]?_[_0x3a09('0x1b')](_0x6e287d[_0x3a09('0x15')][_0x3a09('0x19')],function(_0x3d4236){return{'model':db[_0x3d4236[_0x3a09('0x1a')]],'as':_0x3d4236['as'],'attributes':_0x3d4236[_0x3a09('0x17')],'include':_0x3d4236['include']?_[_0x3a09('0x1b')](_0x3d4236[_0x3a09('0x19')],function(_0x432455){return{'model':db[_0x432455[_0x3a09('0x1a')]],'as':_0x432455['as'],'attributes':_0x432455[_0x3a09('0x17')],'include':_0x432455[_0x3a09('0x19')]?_[_0x3a09('0x1b')](_0x432455[_0x3a09('0x19')],function(_0x159304){return{'model':db[_0x159304[_0x3a09('0x1a')]],'as':_0x159304['as'],'attributes':_0x159304[_0x3a09('0x17')]};}):[]};}):[]};}):[]:[]})[_0x3a09('0x9')](function(_0x3f0c01){logger[_0x3a09('0xa')](_0x3a09('0x1d'),_0x6e287d);logger['debug'](_0x3a09('0x1d'),_0x6e287d,JSON[_0x3a09('0x1c')](_0x3f0c01));_0x2d8c3e(_0x3f0c01);})[_0x3a09('0x12')](function(_0x32d49c){logger[_0x3a09('0xe')](_0x3a09('0x1d'),_0x32d49c[_0x3a09('0x10')],_0x6e287d);_0x1f4fe9(_0x313881[_0x3a09('0xe')](0x1f4,_0x32d49c[_0x3a09('0x10')]));});});};
\ No newline at end of file
+var _0xecfb=['raw','where','include','map','model','attributes','GetDynamics365Account','stringify','ShowDynamics365Account','find','debug','lodash','util','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Dynamics365Account,\x20%s,\x20%s','request\x20sent','Dynamics365Account,\x20%s,\x20%s,\x20%s','error','code','message','info','catch','Dynamics365Account','findAll','options'];(function(_0x374ada,_0x27b3a5){var _0x449ed8=function(_0x3efc46){while(--_0x3efc46){_0x374ada['push'](_0x374ada['shift']());}};_0x449ed8(++_0x27b3a5);}(_0xecfb,0x1d2));var _0xbecf=function(_0x37a5a7,_0x2bdad5){_0x37a5a7=_0x37a5a7-0x0;var _0x5981d2=_0xecfb[_0x37a5a7];return _0x5981d2;};'use strict';var _=require(_0xbecf('0x0'));var util=require(_0xbecf('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xbecf('0x2'));var fs=require('fs');var Redis=require(_0xbecf('0x3'));var db=require(_0xbecf('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xbecf('0x5'))(_0xbecf('0x6'));var config=require(_0xbecf('0x7'));var jayson=require(_0xbecf('0x8'));var client=jayson[_0xbecf('0x9')][_0xbecf('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xf17f2a,_0x4260ec,_0x26836f){return new BPromise(function(_0x580309,_0x12210e){return client[_0xbecf('0xb')](_0xf17f2a,_0x26836f)[_0xbecf('0xc')](function(_0x495532){logger['info'](_0xbecf('0xd'),_0x4260ec,_0xbecf('0xe'));logger['debug'](_0xbecf('0xf'),_0x4260ec,_0xbecf('0xe'),JSON['stringify'](_0x495532));if(_0x495532[_0xbecf('0x10')]){if(_0x495532[_0xbecf('0x10')][_0xbecf('0x11')]===0x1f4){logger[_0xbecf('0x10')](_0xbecf('0xd'),_0x4260ec,_0x495532[_0xbecf('0x10')][_0xbecf('0x12')]);return _0x12210e(_0x495532[_0xbecf('0x10')][_0xbecf('0x12')]);}logger['error']('Dynamics365Account,\x20%s,\x20%s',_0x4260ec,_0x495532['error']['message']);return _0x580309(_0x495532['error'][_0xbecf('0x12')]);}else{logger[_0xbecf('0x13')](_0xbecf('0xd'),_0x4260ec,_0xbecf('0xe'));_0x580309(_0x495532['result']['message']);}})[_0xbecf('0x14')](function(_0xd02931){logger[_0xbecf('0x10')](_0xbecf('0xd'),_0x4260ec,_0xd02931);_0x12210e(_0xd02931);});});}exports['GetDynamics365Account']=function(_0x12ad90){var _0xa2464=this;return new Promise(function(_0x3bb877,_0x174e92){return db[_0xbecf('0x15')][_0xbecf('0x16')]({'raw':_0x12ad90[_0xbecf('0x17')]?_0x12ad90[_0xbecf('0x17')][_0xbecf('0x18')]===undefined?!![]:![]:!![],'where':_0x12ad90[_0xbecf('0x17')]?_0x12ad90[_0xbecf('0x17')][_0xbecf('0x19')]||null:null,'attributes':_0x12ad90[_0xbecf('0x17')]?_0x12ad90[_0xbecf('0x17')]['attributes']||null:null,'limit':_0x12ad90[_0xbecf('0x17')]?_0x12ad90['options']['limit']||null:null,'include':_0x12ad90[_0xbecf('0x17')]?_0x12ad90[_0xbecf('0x17')][_0xbecf('0x1a')]?_[_0xbecf('0x1b')](_0x12ad90[_0xbecf('0x17')]['include'],function(_0x43f927){return{'model':db[_0x43f927[_0xbecf('0x1c')]],'as':_0x43f927['as'],'attributes':_0x43f927[_0xbecf('0x1d')],'include':_0x43f927[_0xbecf('0x1a')]?_[_0xbecf('0x1b')](_0x43f927[_0xbecf('0x1a')],function(_0x204ef9){return{'model':db[_0x204ef9[_0xbecf('0x1c')]],'as':_0x204ef9['as'],'attributes':_0x204ef9[_0xbecf('0x1d')],'include':_0x204ef9[_0xbecf('0x1a')]?_[_0xbecf('0x1b')](_0x204ef9['include'],function(_0x3b7fa5){return{'model':db[_0x3b7fa5['model']],'as':_0x3b7fa5['as'],'attributes':_0x3b7fa5[_0xbecf('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xbecf('0xc')](function(_0x58f3b9){logger[_0xbecf('0x13')](_0xbecf('0x1e'),_0x12ad90);logger['debug'](_0xbecf('0x1e'),_0x12ad90,JSON[_0xbecf('0x1f')](_0x58f3b9));_0x3bb877(_0x58f3b9);})['catch'](function(_0xbba93e){logger[_0xbecf('0x10')](_0xbecf('0x1e'),_0xbba93e[_0xbecf('0x12')],_0x12ad90);_0x174e92(_0xa2464[_0xbecf('0x10')](0x1f4,_0xbba93e[_0xbecf('0x12')]));});});};exports[_0xbecf('0x20')]=function(_0x3a846e){var _0x18cb3a=this;return new Promise(function(_0x5e24ad,_0x17cf56){return db[_0xbecf('0x15')][_0xbecf('0x21')]({'raw':_0x3a846e[_0xbecf('0x17')]?_0x3a846e[_0xbecf('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x3a846e[_0xbecf('0x17')]?_0x3a846e['options'][_0xbecf('0x19')]||null:null,'attributes':_0x3a846e['options']?_0x3a846e[_0xbecf('0x17')][_0xbecf('0x1d')]||null:null,'include':_0x3a846e[_0xbecf('0x17')]?_0x3a846e[_0xbecf('0x17')][_0xbecf('0x1a')]?_[_0xbecf('0x1b')](_0x3a846e[_0xbecf('0x17')][_0xbecf('0x1a')],function(_0x5f4bb9){return{'model':db[_0x5f4bb9[_0xbecf('0x1c')]],'as':_0x5f4bb9['as'],'attributes':_0x5f4bb9[_0xbecf('0x1d')],'include':_0x5f4bb9['include']?_[_0xbecf('0x1b')](_0x5f4bb9['include'],function(_0x49f781){return{'model':db[_0x49f781[_0xbecf('0x1c')]],'as':_0x49f781['as'],'attributes':_0x49f781[_0xbecf('0x1d')],'include':_0x49f781['include']?_[_0xbecf('0x1b')](_0x49f781[_0xbecf('0x1a')],function(_0x3baca5){return{'model':db[_0x3baca5[_0xbecf('0x1c')]],'as':_0x3baca5['as'],'attributes':_0x3baca5['attributes']};}):[]};}):[]};}):[]:[]})[_0xbecf('0xc')](function(_0x26e397){logger[_0xbecf('0x13')](_0xbecf('0x20'),_0x3a846e);logger[_0xbecf('0x22')]('ShowDynamics365Account',_0x3a846e,JSON[_0xbecf('0x1f')](_0x26e397));_0x5e24ad(_0x26e397);})[_0xbecf('0x14')](function(_0x52ee36){logger['error'](_0xbecf('0x20'),_0x52ee36[_0xbecf('0x12')],_0x3a846e);_0x17cf56(_0x18cb3a[_0xbecf('0x10')](0x1f4,_0x52ee36['message']));});});};
\ No newline at end of file