Built motion from commit 97153652.|2.6.26
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index 2eab715..b4c0a77 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f71=['../../config/logger','rpc','jayson/promise','client','http','request','then','info','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','Dynamics365Account,\x20%s,\x20%s','message','request\x20sent','result','catch','Dynamics365Account','findAll','options','raw','where','attributes','limit','include','map','model','GetDynamics365Account','find','ShowDynamics365Account','lodash','moment','randomstring'];(function(_0x4de877,_0x340170){var _0xb2cfeb=function(_0x488634){while(--_0x488634){_0x4de877['push'](_0x4de877['shift']());}};_0xb2cfeb(++_0x340170);}(_0x5f71,0xc9));var _0x15f7=function(_0x18946c,_0x3a7d1d){_0x18946c=_0x18946c-0x0;var _0x470381=_0x5f71[_0x18946c];return _0x470381;};'use strict';var _=require(_0x15f7('0x0'));var util=require('util');var moment=require(_0x15f7('0x1'));var BPromise=require('bluebird');var rs=require(_0x15f7('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x15f7('0x3'))(_0x15f7('0x4'));var config=require('../../config/environment');var jayson=require(_0x15f7('0x5'));var client=jayson[_0x15f7('0x6')][_0x15f7('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1de7b3,_0x307158,_0x30d083){return new BPromise(function(_0x1c9509,_0x3f1490){return client[_0x15f7('0x8')](_0x1de7b3,_0x30d083)[_0x15f7('0x9')](function(_0x3e2f43){logger[_0x15f7('0xa')]('Dynamics365Account,\x20%s,\x20%s',_0x307158,'request\x20sent');logger[_0x15f7('0xb')](_0x15f7('0xc'),_0x307158,'request\x20sent',JSON[_0x15f7('0xd')](_0x3e2f43));if(_0x3e2f43[_0x15f7('0xe')]){if(_0x3e2f43[_0x15f7('0xe')][_0x15f7('0xf')]===0x1f4){logger[_0x15f7('0xe')](_0x15f7('0x10'),_0x307158,_0x3e2f43[_0x15f7('0xe')]['message']);return _0x3f1490(_0x3e2f43[_0x15f7('0xe')][_0x15f7('0x11')]);}logger[_0x15f7('0xe')]('Dynamics365Account,\x20%s,\x20%s',_0x307158,_0x3e2f43[_0x15f7('0xe')][_0x15f7('0x11')]);return _0x1c9509(_0x3e2f43['error'][_0x15f7('0x11')]);}else{logger[_0x15f7('0xa')](_0x15f7('0x10'),_0x307158,_0x15f7('0x12'));_0x1c9509(_0x3e2f43[_0x15f7('0x13')][_0x15f7('0x11')]);}})[_0x15f7('0x14')](function(_0x4b0d42){logger[_0x15f7('0xe')](_0x15f7('0x10'),_0x307158,_0x4b0d42);_0x3f1490(_0x4b0d42);});});}exports['GetDynamics365Account']=function(_0x2c78ca){var _0x333ff8=this;return new Promise(function(_0x2d4bc3,_0x40b752){return db[_0x15f7('0x15')][_0x15f7('0x16')]({'raw':_0x2c78ca[_0x15f7('0x17')]?_0x2c78ca['options'][_0x15f7('0x18')]===undefined?!![]:![]:!![],'where':_0x2c78ca[_0x15f7('0x17')]?_0x2c78ca[_0x15f7('0x17')][_0x15f7('0x19')]||null:null,'attributes':_0x2c78ca[_0x15f7('0x17')]?_0x2c78ca[_0x15f7('0x17')][_0x15f7('0x1a')]||null:null,'limit':_0x2c78ca['options']?_0x2c78ca['options'][_0x15f7('0x1b')]||null:null,'include':_0x2c78ca[_0x15f7('0x17')]?_0x2c78ca[_0x15f7('0x17')][_0x15f7('0x1c')]?_[_0x15f7('0x1d')](_0x2c78ca['options'][_0x15f7('0x1c')],function(_0x4fe2ca){return{'model':db[_0x4fe2ca[_0x15f7('0x1e')]],'as':_0x4fe2ca['as'],'attributes':_0x4fe2ca[_0x15f7('0x1a')],'include':_0x4fe2ca['include']?_['map'](_0x4fe2ca[_0x15f7('0x1c')],function(_0x5a1e21){return{'model':db[_0x5a1e21['model']],'as':_0x5a1e21['as'],'attributes':_0x5a1e21[_0x15f7('0x1a')],'include':_0x5a1e21['include']?_[_0x15f7('0x1d')](_0x5a1e21[_0x15f7('0x1c')],function(_0x64f9d9){return{'model':db[_0x64f9d9[_0x15f7('0x1e')]],'as':_0x64f9d9['as'],'attributes':_0x64f9d9[_0x15f7('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3adf28){logger[_0x15f7('0xa')](_0x15f7('0x1f'),_0x2c78ca);logger['debug']('GetDynamics365Account',_0x2c78ca,JSON['stringify'](_0x3adf28));_0x2d4bc3(_0x3adf28);})['catch'](function(_0x1aef2b){logger[_0x15f7('0xe')](_0x15f7('0x1f'),_0x1aef2b[_0x15f7('0x11')],_0x2c78ca);_0x40b752(_0x333ff8[_0x15f7('0xe')](0x1f4,_0x1aef2b[_0x15f7('0x11')]));});});};exports['ShowDynamics365Account']=function(_0x521934){var _0x31bf43=this;return new Promise(function(_0xd240bb,_0x350f8a){return db['Dynamics365Account'][_0x15f7('0x20')]({'raw':_0x521934['options']?_0x521934[_0x15f7('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x521934[_0x15f7('0x17')]?_0x521934[_0x15f7('0x17')][_0x15f7('0x19')]||null:null,'attributes':_0x521934[_0x15f7('0x17')]?_0x521934['options']['attributes']||null:null,'include':_0x521934[_0x15f7('0x17')]?_0x521934[_0x15f7('0x17')][_0x15f7('0x1c')]?_[_0x15f7('0x1d')](_0x521934[_0x15f7('0x17')][_0x15f7('0x1c')],function(_0x2954cb){return{'model':db[_0x2954cb[_0x15f7('0x1e')]],'as':_0x2954cb['as'],'attributes':_0x2954cb[_0x15f7('0x1a')],'include':_0x2954cb[_0x15f7('0x1c')]?_[_0x15f7('0x1d')](_0x2954cb['include'],function(_0x1c737c){return{'model':db[_0x1c737c['model']],'as':_0x1c737c['as'],'attributes':_0x1c737c[_0x15f7('0x1a')],'include':_0x1c737c[_0x15f7('0x1c')]?_[_0x15f7('0x1d')](_0x1c737c[_0x15f7('0x1c')],function(_0x2b2525){return{'model':db[_0x2b2525[_0x15f7('0x1e')]],'as':_0x2b2525['as'],'attributes':_0x2b2525['attributes']};}):[]};}):[]};}):[]:[]})[_0x15f7('0x9')](function(_0x5a2343){logger[_0x15f7('0xa')](_0x15f7('0x21'),_0x521934);logger[_0x15f7('0xb')](_0x15f7('0x21'),_0x521934,JSON[_0x15f7('0xd')](_0x5a2343));_0xd240bb(_0x5a2343);})['catch'](function(_0x2c875e){logger['error']('ShowDynamics365Account',_0x2c875e[_0x15f7('0x11')],_0x521934);_0x350f8a(_0x31bf43['error'](0x1f4,_0x2c875e[_0x15f7('0x11')]));});});};
\ 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