Built motion from commit 97153652.|2.6.26
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index a59a339..b4c0a77 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdade=['stringify','error','code','Dynamics365Account,\x20%s,\x20%s','message','result','catch','GetDynamics365Account','findAll','options','where','attributes','limit','model','include','map','debug','ShowDynamics365Account','Dynamics365Account','raw','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then','info','request\x20sent','Dynamics365Account,\x20%s,\x20%s,\x20%s'];(function(_0x1e4bfe,_0x5396a4){var _0x421fa8=function(_0x318f7d){while(--_0x318f7d){_0x1e4bfe['push'](_0x1e4bfe['shift']());}};_0x421fa8(++_0x5396a4);}(_0xdade,0xe0));var _0xedad=function(_0x42d1f8,_0x22e529){_0x42d1f8=_0x42d1f8-0x0;var _0x40d234=_0xdade[_0x42d1f8];return _0x40d234;};'use strict';var _=require('lodash');var util=require(_0xedad('0x0'));var moment=require(_0xedad('0x1'));var BPromise=require(_0xedad('0x2'));var rs=require(_0xedad('0x3'));var fs=require('fs');var Redis=require(_0xedad('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xedad('0x5'));var logger=require(_0xedad('0x6'))(_0xedad('0x7'));var config=require(_0xedad('0x8'));var jayson=require(_0xedad('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x321f9b,_0x82ad24,_0x3a18b9){return new BPromise(function(_0x1f9ee9,_0x1837b5){return client['request'](_0x321f9b,_0x3a18b9)[_0xedad('0xa')](function(_0x3611b2){logger[_0xedad('0xb')]('Dynamics365Account,\x20%s,\x20%s',_0x82ad24,_0xedad('0xc'));logger['debug'](_0xedad('0xd'),_0x82ad24,_0xedad('0xc'),JSON[_0xedad('0xe')](_0x3611b2));if(_0x3611b2[_0xedad('0xf')]){if(_0x3611b2[_0xedad('0xf')][_0xedad('0x10')]===0x1f4){logger[_0xedad('0xf')](_0xedad('0x11'),_0x82ad24,_0x3611b2[_0xedad('0xf')][_0xedad('0x12')]);return _0x1837b5(_0x3611b2[_0xedad('0xf')][_0xedad('0x12')]);}logger[_0xedad('0xf')](_0xedad('0x11'),_0x82ad24,_0x3611b2['error']['message']);return _0x1f9ee9(_0x3611b2[_0xedad('0xf')]['message']);}else{logger[_0xedad('0xb')]('Dynamics365Account,\x20%s,\x20%s',_0x82ad24,_0xedad('0xc'));_0x1f9ee9(_0x3611b2[_0xedad('0x13')][_0xedad('0x12')]);}})[_0xedad('0x14')](function(_0x4965f6){logger[_0xedad('0xf')](_0xedad('0x11'),_0x82ad24,_0x4965f6);_0x1837b5(_0x4965f6);});});}exports[_0xedad('0x15')]=function(_0x548e48){var _0x48dfa6=this;return new Promise(function(_0x43d9bb,_0x20f794){return db['Dynamics365Account'][_0xedad('0x16')]({'raw':_0x548e48[_0xedad('0x17')]?_0x548e48[_0xedad('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x548e48[_0xedad('0x17')]?_0x548e48[_0xedad('0x17')][_0xedad('0x18')]||null:null,'attributes':_0x548e48[_0xedad('0x17')]?_0x548e48[_0xedad('0x17')][_0xedad('0x19')]||null:null,'limit':_0x548e48['options']?_0x548e48[_0xedad('0x17')][_0xedad('0x1a')]||null:null,'include':_0x548e48['options']?_0x548e48[_0xedad('0x17')]['include']?_['map'](_0x548e48['options']['include'],function(_0x230263){return{'model':db[_0x230263[_0xedad('0x1b')]],'as':_0x230263['as'],'attributes':_0x230263[_0xedad('0x19')],'include':_0x230263['include']?_['map'](_0x230263[_0xedad('0x1c')],function(_0x17f53c){return{'model':db[_0x17f53c[_0xedad('0x1b')]],'as':_0x17f53c['as'],'attributes':_0x17f53c[_0xedad('0x19')],'include':_0x17f53c['include']?_[_0xedad('0x1d')](_0x17f53c['include'],function(_0x5cb637){return{'model':db[_0x5cb637[_0xedad('0x1b')]],'as':_0x5cb637['as'],'attributes':_0x5cb637['attributes']};}):[]};}):[]};}):[]:[]})[_0xedad('0xa')](function(_0xb47d9){logger[_0xedad('0xb')](_0xedad('0x15'),_0x548e48);logger[_0xedad('0x1e')]('GetDynamics365Account',_0x548e48,JSON[_0xedad('0xe')](_0xb47d9));_0x43d9bb(_0xb47d9);})[_0xedad('0x14')](function(_0x4189ae){logger['error']('GetDynamics365Account',_0x4189ae[_0xedad('0x12')],_0x548e48);_0x20f794(_0x48dfa6[_0xedad('0xf')](0x1f4,_0x4189ae[_0xedad('0x12')]));});});};exports[_0xedad('0x1f')]=function(_0x150315){var _0xd80a8=this;return new Promise(function(_0x197ee3,_0x4f59ba){return db[_0xedad('0x20')]['find']({'raw':_0x150315[_0xedad('0x17')]?_0x150315[_0xedad('0x17')][_0xedad('0x21')]===undefined?!![]:![]:!![],'where':_0x150315[_0xedad('0x17')]?_0x150315['options'][_0xedad('0x18')]||null:null,'attributes':_0x150315[_0xedad('0x17')]?_0x150315['options'][_0xedad('0x19')]||null:null,'include':_0x150315[_0xedad('0x17')]?_0x150315['options'][_0xedad('0x1c')]?_[_0xedad('0x1d')](_0x150315[_0xedad('0x17')][_0xedad('0x1c')],function(_0x128a20){return{'model':db[_0x128a20[_0xedad('0x1b')]],'as':_0x128a20['as'],'attributes':_0x128a20[_0xedad('0x19')],'include':_0x128a20['include']?_['map'](_0x128a20[_0xedad('0x1c')],function(_0x5bc970){return{'model':db[_0x5bc970[_0xedad('0x1b')]],'as':_0x5bc970['as'],'attributes':_0x5bc970[_0xedad('0x19')],'include':_0x5bc970[_0xedad('0x1c')]?_[_0xedad('0x1d')](_0x5bc970['include'],function(_0x3b82f6){return{'model':db[_0x3b82f6[_0xedad('0x1b')]],'as':_0x3b82f6['as'],'attributes':_0x3b82f6[_0xedad('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x339563){logger[_0xedad('0xb')](_0xedad('0x1f'),_0x150315);logger[_0xedad('0x1e')](_0xedad('0x1f'),_0x150315,JSON[_0xedad('0xe')](_0x339563));_0x197ee3(_0x339563);})[_0xedad('0x14')](function(_0x2a0ad6){logger[_0xedad('0xf')](_0xedad('0x1f'),_0x2a0ad6['message'],_0x150315);_0x4f59ba(_0xd80a8['error'](0x1f4,_0x2a0ad6[_0xedad('0x12')]));});});};
\ No newline at end of file
+var _0x0c2e=['include','map','model','attributes','GetDynamics365Account','find','raw','ShowDynamics365Account','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','Dynamics365Account','findAll','options','where','limit'];(function(_0x1beb1c,_0xb9e72c){var _0x401b20=function(_0x4ad115){while(--_0x4ad115){_0x1beb1c['push'](_0x1beb1c['shift']());}};_0x401b20(++_0xb9e72c);}(_0x0c2e,0x14d));var _0xe0c2=function(_0x545928,_0x28b70f){_0x545928=_0x545928-0x0;var _0x3b3dac=_0x0c2e[_0x545928];return _0x3b3dac;};'use strict';var _=require(_0xe0c2('0x0'));var util=require(_0xe0c2('0x1'));var moment=require(_0xe0c2('0x2'));var BPromise=require(_0xe0c2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe0c2('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xe0c2('0x5'));var logger=require(_0xe0c2('0x6'))('rpc');var config=require(_0xe0c2('0x7'));var jayson=require(_0xe0c2('0x8'));var client=jayson[_0xe0c2('0x9')][_0xe0c2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x489dbb,_0x26d88a,_0x440a23){return new BPromise(function(_0x1f8e4a,_0x50a567){return client['request'](_0x489dbb,_0x440a23)[_0xe0c2('0xb')](function(_0x4ef345){logger[_0xe0c2('0xc')](_0xe0c2('0xd'),_0x26d88a,_0xe0c2('0xe'));logger[_0xe0c2('0xf')](_0xe0c2('0x10'),_0x26d88a,'request\x20sent',JSON[_0xe0c2('0x11')](_0x4ef345));if(_0x4ef345[_0xe0c2('0x12')]){if(_0x4ef345[_0xe0c2('0x12')][_0xe0c2('0x13')]===0x1f4){logger[_0xe0c2('0x12')](_0xe0c2('0xd'),_0x26d88a,_0x4ef345['error'][_0xe0c2('0x14')]);return _0x50a567(_0x4ef345[_0xe0c2('0x12')][_0xe0c2('0x14')]);}logger['error'](_0xe0c2('0xd'),_0x26d88a,_0x4ef345['error'][_0xe0c2('0x14')]);return _0x1f8e4a(_0x4ef345[_0xe0c2('0x12')][_0xe0c2('0x14')]);}else{logger[_0xe0c2('0xc')]('Dynamics365Account,\x20%s,\x20%s',_0x26d88a,'request\x20sent');_0x1f8e4a(_0x4ef345[_0xe0c2('0x15')][_0xe0c2('0x14')]);}})['catch'](function(_0x51907a){logger[_0xe0c2('0x12')](_0xe0c2('0xd'),_0x26d88a,_0x51907a);_0x50a567(_0x51907a);});});}exports['GetDynamics365Account']=function(_0x4c48d1){var _0x587a70=this;return new Promise(function(_0x583c25,_0x1d54ab){return db[_0xe0c2('0x16')][_0xe0c2('0x17')]({'raw':_0x4c48d1[_0xe0c2('0x18')]?_0x4c48d1[_0xe0c2('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x4c48d1[_0xe0c2('0x18')]?_0x4c48d1['options'][_0xe0c2('0x19')]||null:null,'attributes':_0x4c48d1[_0xe0c2('0x18')]?_0x4c48d1['options']['attributes']||null:null,'limit':_0x4c48d1[_0xe0c2('0x18')]?_0x4c48d1['options'][_0xe0c2('0x1a')]||null:null,'include':_0x4c48d1[_0xe0c2('0x18')]?_0x4c48d1[_0xe0c2('0x18')][_0xe0c2('0x1b')]?_[_0xe0c2('0x1c')](_0x4c48d1[_0xe0c2('0x18')][_0xe0c2('0x1b')],function(_0x129712){return{'model':db[_0x129712[_0xe0c2('0x1d')]],'as':_0x129712['as'],'attributes':_0x129712[_0xe0c2('0x1e')],'include':_0x129712[_0xe0c2('0x1b')]?_[_0xe0c2('0x1c')](_0x129712[_0xe0c2('0x1b')],function(_0x3fec12){return{'model':db[_0x3fec12[_0xe0c2('0x1d')]],'as':_0x3fec12['as'],'attributes':_0x3fec12[_0xe0c2('0x1e')],'include':_0x3fec12['include']?_[_0xe0c2('0x1c')](_0x3fec12['include'],function(_0x388eca){return{'model':db[_0x388eca[_0xe0c2('0x1d')]],'as':_0x388eca['as'],'attributes':_0x388eca['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0xec24b3){logger[_0xe0c2('0xc')]('GetDynamics365Account',_0x4c48d1);logger['debug'](_0xe0c2('0x1f'),_0x4c48d1,JSON[_0xe0c2('0x11')](_0xec24b3));_0x583c25(_0xec24b3);})['catch'](function(_0x54fb6e){logger['error'](_0xe0c2('0x1f'),_0x54fb6e['message'],_0x4c48d1);_0x1d54ab(_0x587a70['error'](0x1f4,_0x54fb6e[_0xe0c2('0x14')]));});});};exports['ShowDynamics365Account']=function(_0x1711f1){var _0x2119a3=this;return new Promise(function(_0x34845e,_0x53ff78){return db[_0xe0c2('0x16')][_0xe0c2('0x20')]({'raw':_0x1711f1[_0xe0c2('0x18')]?_0x1711f1[_0xe0c2('0x18')][_0xe0c2('0x21')]===undefined?!![]:![]:!![],'where':_0x1711f1[_0xe0c2('0x18')]?_0x1711f1[_0xe0c2('0x18')][_0xe0c2('0x19')]||null:null,'attributes':_0x1711f1[_0xe0c2('0x18')]?_0x1711f1[_0xe0c2('0x18')]['attributes']||null:null,'include':_0x1711f1[_0xe0c2('0x18')]?_0x1711f1[_0xe0c2('0x18')][_0xe0c2('0x1b')]?_[_0xe0c2('0x1c')](_0x1711f1['options'][_0xe0c2('0x1b')],function(_0x14de1b){return{'model':db[_0x14de1b[_0xe0c2('0x1d')]],'as':_0x14de1b['as'],'attributes':_0x14de1b[_0xe0c2('0x1e')],'include':_0x14de1b['include']?_[_0xe0c2('0x1c')](_0x14de1b['include'],function(_0x2c4119){return{'model':db[_0x2c4119[_0xe0c2('0x1d')]],'as':_0x2c4119['as'],'attributes':_0x2c4119[_0xe0c2('0x1e')],'include':_0x2c4119[_0xe0c2('0x1b')]?_[_0xe0c2('0x1c')](_0x2c4119[_0xe0c2('0x1b')],function(_0x294933){return{'model':db[_0x294933[_0xe0c2('0x1d')]],'as':_0x294933['as'],'attributes':_0x294933['attributes']};}):[]};}):[]};}):[]:[]})[_0xe0c2('0xb')](function(_0x205dc4){logger[_0xe0c2('0xc')](_0xe0c2('0x22'),_0x1711f1);logger[_0xe0c2('0xf')](_0xe0c2('0x22'),_0x1711f1,JSON[_0xe0c2('0x11')](_0x205dc4));_0x34845e(_0x205dc4);})[_0xe0c2('0x23')](function(_0x594e02){logger[_0xe0c2('0x12')](_0xe0c2('0x22'),_0x594e02[_0xe0c2('0x14')],_0x1711f1);_0x53ff78(_0x2119a3[_0xe0c2('0x12')](0x1f4,_0x594e02[_0xe0c2('0x14')]));});});};
\ No newline at end of file