Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index ba628a3..b7e1cc6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbb3f=['client','request','then','info','Dynamics365Account,\x20%s,\x20%s','debug','request\x20sent','error','message','result','catch','GetDynamics365Account','Dynamics365Account','findAll','options','raw','where','attributes','limit','include','map','model','ShowDynamics365Account','find','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xbb3f,0x98));var _0xfbb3=function(_0x49cbd7,_0x17d8ec){_0x49cbd7=_0x49cbd7-0x0;var _0x2ed6fa=_0xbb3f[_0x49cbd7];return _0x2ed6fa;};'use strict';var _=require(_0xfbb3('0x0'));var util=require(_0xfbb3('0x1'));var moment=require(_0xfbb3('0x2'));var BPromise=require(_0xfbb3('0x3'));var rs=require(_0xfbb3('0x4'));var fs=require('fs');var Redis=require(_0xfbb3('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xfbb3('0x6'))(_0xfbb3('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xfbb3('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x10905d,_0x4572b5,_0x285462){return new BPromise(function(_0x3a4464,_0x2c699c){return client[_0xfbb3('0x9')](_0x10905d,_0x285462)[_0xfbb3('0xa')](function(_0xd67203){logger[_0xfbb3('0xb')](_0xfbb3('0xc'),_0x4572b5,'request\x20sent');logger[_0xfbb3('0xd')]('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x4572b5,_0xfbb3('0xe'),JSON['stringify'](_0xd67203));if(_0xd67203[_0xfbb3('0xf')]){if(_0xd67203[_0xfbb3('0xf')]['code']===0x1f4){logger[_0xfbb3('0xf')]('Dynamics365Account,\x20%s,\x20%s',_0x4572b5,_0xd67203['error'][_0xfbb3('0x10')]);return _0x2c699c(_0xd67203[_0xfbb3('0xf')]['message']);}logger[_0xfbb3('0xf')](_0xfbb3('0xc'),_0x4572b5,_0xd67203[_0xfbb3('0xf')][_0xfbb3('0x10')]);return _0x3a4464(_0xd67203[_0xfbb3('0xf')][_0xfbb3('0x10')]);}else{logger['info'](_0xfbb3('0xc'),_0x4572b5,_0xfbb3('0xe'));_0x3a4464(_0xd67203[_0xfbb3('0x11')]['message']);}})[_0xfbb3('0x12')](function(_0x4d41f9){logger['error'](_0xfbb3('0xc'),_0x4572b5,_0x4d41f9);_0x2c699c(_0x4d41f9);});});}exports[_0xfbb3('0x13')]=function(_0x2c8c26){var _0x2d500c=this;return new Promise(function(_0x2298e8,_0x71d78d){return db[_0xfbb3('0x14')][_0xfbb3('0x15')]({'raw':_0x2c8c26[_0xfbb3('0x16')]?_0x2c8c26[_0xfbb3('0x16')][_0xfbb3('0x17')]===undefined?!![]:![]:!![],'where':_0x2c8c26[_0xfbb3('0x16')]?_0x2c8c26['options'][_0xfbb3('0x18')]||null:null,'attributes':_0x2c8c26[_0xfbb3('0x16')]?_0x2c8c26[_0xfbb3('0x16')][_0xfbb3('0x19')]||null:null,'limit':_0x2c8c26[_0xfbb3('0x16')]?_0x2c8c26[_0xfbb3('0x16')][_0xfbb3('0x1a')]||null:null,'include':_0x2c8c26[_0xfbb3('0x16')]?_0x2c8c26[_0xfbb3('0x16')][_0xfbb3('0x1b')]?_[_0xfbb3('0x1c')](_0x2c8c26[_0xfbb3('0x16')]['include'],function(_0x41ce65){return{'model':db[_0x41ce65[_0xfbb3('0x1d')]],'as':_0x41ce65['as'],'attributes':_0x41ce65['attributes'],'include':_0x41ce65['include']?_['map'](_0x41ce65[_0xfbb3('0x1b')],function(_0x4bd99e){return{'model':db[_0x4bd99e[_0xfbb3('0x1d')]],'as':_0x4bd99e['as'],'attributes':_0x4bd99e[_0xfbb3('0x19')],'include':_0x4bd99e[_0xfbb3('0x1b')]?_[_0xfbb3('0x1c')](_0x4bd99e['include'],function(_0x4a6f9d){return{'model':db[_0x4a6f9d['model']],'as':_0x4a6f9d['as'],'attributes':_0x4a6f9d[_0xfbb3('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x19e12d){logger[_0xfbb3('0xb')](_0xfbb3('0x13'),_0x2c8c26);logger['debug'](_0xfbb3('0x13'),_0x2c8c26,JSON['stringify'](_0x19e12d));_0x2298e8(_0x19e12d);})[_0xfbb3('0x12')](function(_0x30f04a){logger['error']('GetDynamics365Account',_0x30f04a[_0xfbb3('0x10')],_0x2c8c26);_0x71d78d(_0x2d500c[_0xfbb3('0xf')](0x1f4,_0x30f04a[_0xfbb3('0x10')]));});});};exports[_0xfbb3('0x1e')]=function(_0x29ff81){var _0xd6645d=this;return new Promise(function(_0x12969a,_0xd32d6){return db[_0xfbb3('0x14')][_0xfbb3('0x1f')]({'raw':_0x29ff81[_0xfbb3('0x16')]?_0x29ff81[_0xfbb3('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x29ff81[_0xfbb3('0x16')]?_0x29ff81['options'][_0xfbb3('0x18')]||null:null,'attributes':_0x29ff81[_0xfbb3('0x16')]?_0x29ff81['options']['attributes']||null:null,'include':_0x29ff81[_0xfbb3('0x16')]?_0x29ff81['options'][_0xfbb3('0x1b')]?_['map'](_0x29ff81[_0xfbb3('0x16')][_0xfbb3('0x1b')],function(_0x3f3c2a){return{'model':db[_0x3f3c2a[_0xfbb3('0x1d')]],'as':_0x3f3c2a['as'],'attributes':_0x3f3c2a['attributes'],'include':_0x3f3c2a[_0xfbb3('0x1b')]?_['map'](_0x3f3c2a[_0xfbb3('0x1b')],function(_0x9ddfdf){return{'model':db[_0x9ddfdf['model']],'as':_0x9ddfdf['as'],'attributes':_0x9ddfdf[_0xfbb3('0x19')],'include':_0x9ddfdf['include']?_[_0xfbb3('0x1c')](_0x9ddfdf['include'],function(_0x1746af){return{'model':db[_0x1746af['model']],'as':_0x1746af['as'],'attributes':_0x1746af[_0xfbb3('0x19')]};}):[]};}):[]};}):[]:[]})[_0xfbb3('0xa')](function(_0x486f26){logger[_0xfbb3('0xb')]('ShowDynamics365Account',_0x29ff81);logger['debug'](_0xfbb3('0x1e'),_0x29ff81,JSON['stringify'](_0x486f26));_0x12969a(_0x486f26);})[_0xfbb3('0x12')](function(_0x102db9){logger[_0xfbb3('0xf')](_0xfbb3('0x1e'),_0x102db9['message'],_0x29ff81);_0xd32d6(_0xd6645d[_0xfbb3('0xf')](0x1f4,_0x102db9[_0xfbb3('0x10')]));});});};
\ No newline at end of file
+var _0x0fcb=['model','ShowDynamics365Account','find','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http','then','info','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','message','Dynamics365Account,\x20%s,\x20%s','catch','GetDynamics365Account','Dynamics365Account','findAll','options','raw','where','attributes','limit','include','map'];(function(_0x65f140,_0x45cbc7){var _0x18fbda=function(_0x26fb39){while(--_0x26fb39){_0x65f140['push'](_0x65f140['shift']());}};_0x18fbda(++_0x45cbc7);}(_0x0fcb,0x18f));var _0xb0fc=function(_0x54f753,_0x2a2963){_0x54f753=_0x54f753-0x0;var _0x220ea4=_0x0fcb[_0x54f753];return _0x220ea4;};'use strict';var _=require(_0xb0fc('0x0'));var util=require('util');var moment=require(_0xb0fc('0x1'));var BPromise=require(_0xb0fc('0x2'));var rs=require(_0xb0fc('0x3'));var fs=require('fs');var Redis=require(_0xb0fc('0x4'));var db=require(_0xb0fc('0x5'))['db'];var utils=require(_0xb0fc('0x6'));var logger=require(_0xb0fc('0x7'))(_0xb0fc('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xb0fc('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x23111b,_0x1c7fec,_0x3d994d){return new BPromise(function(_0x3b6c06,_0x3ff126){return client['request'](_0x23111b,_0x3d994d)[_0xb0fc('0xa')](function(_0x2cb7cc){logger[_0xb0fc('0xb')]('Dynamics365Account,\x20%s,\x20%s',_0x1c7fec,_0xb0fc('0xc'));logger[_0xb0fc('0xd')](_0xb0fc('0xe'),_0x1c7fec,'request\x20sent',JSON[_0xb0fc('0xf')](_0x2cb7cc));if(_0x2cb7cc[_0xb0fc('0x10')]){if(_0x2cb7cc['error']['code']===0x1f4){logger['error']('Dynamics365Account,\x20%s,\x20%s',_0x1c7fec,_0x2cb7cc[_0xb0fc('0x10')]['message']);return _0x3ff126(_0x2cb7cc[_0xb0fc('0x10')][_0xb0fc('0x11')]);}logger[_0xb0fc('0x10')](_0xb0fc('0x12'),_0x1c7fec,_0x2cb7cc['error'][_0xb0fc('0x11')]);return _0x3b6c06(_0x2cb7cc[_0xb0fc('0x10')][_0xb0fc('0x11')]);}else{logger['info']('Dynamics365Account,\x20%s,\x20%s',_0x1c7fec,'request\x20sent');_0x3b6c06(_0x2cb7cc['result'][_0xb0fc('0x11')]);}})[_0xb0fc('0x13')](function(_0x6159c1){logger[_0xb0fc('0x10')](_0xb0fc('0x12'),_0x1c7fec,_0x6159c1);_0x3ff126(_0x6159c1);});});}exports[_0xb0fc('0x14')]=function(_0x39d560){var _0x315c7f=this;return new Promise(function(_0x3ae9de,_0x15f729){return db[_0xb0fc('0x15')][_0xb0fc('0x16')]({'raw':_0x39d560[_0xb0fc('0x17')]?_0x39d560[_0xb0fc('0x17')][_0xb0fc('0x18')]===undefined?!![]:![]:!![],'where':_0x39d560[_0xb0fc('0x17')]?_0x39d560[_0xb0fc('0x17')][_0xb0fc('0x19')]||null:null,'attributes':_0x39d560[_0xb0fc('0x17')]?_0x39d560[_0xb0fc('0x17')][_0xb0fc('0x1a')]||null:null,'limit':_0x39d560[_0xb0fc('0x17')]?_0x39d560[_0xb0fc('0x17')][_0xb0fc('0x1b')]||null:null,'include':_0x39d560[_0xb0fc('0x17')]?_0x39d560[_0xb0fc('0x17')][_0xb0fc('0x1c')]?_[_0xb0fc('0x1d')](_0x39d560[_0xb0fc('0x17')][_0xb0fc('0x1c')],function(_0x3ee343){return{'model':db[_0x3ee343['model']],'as':_0x3ee343['as'],'attributes':_0x3ee343[_0xb0fc('0x1a')],'include':_0x3ee343[_0xb0fc('0x1c')]?_[_0xb0fc('0x1d')](_0x3ee343['include'],function(_0x12b2b5){return{'model':db[_0x12b2b5[_0xb0fc('0x1e')]],'as':_0x12b2b5['as'],'attributes':_0x12b2b5[_0xb0fc('0x1a')],'include':_0x12b2b5[_0xb0fc('0x1c')]?_[_0xb0fc('0x1d')](_0x12b2b5[_0xb0fc('0x1c')],function(_0x287993){return{'model':db[_0x287993['model']],'as':_0x287993['as'],'attributes':_0x287993[_0xb0fc('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xb0fc('0xa')](function(_0x33f96b){logger[_0xb0fc('0xb')](_0xb0fc('0x14'),_0x39d560);logger[_0xb0fc('0xd')](_0xb0fc('0x14'),_0x39d560,JSON[_0xb0fc('0xf')](_0x33f96b));_0x3ae9de(_0x33f96b);})[_0xb0fc('0x13')](function(_0x54391a){logger[_0xb0fc('0x10')]('GetDynamics365Account',_0x54391a[_0xb0fc('0x11')],_0x39d560);_0x15f729(_0x315c7f[_0xb0fc('0x10')](0x1f4,_0x54391a[_0xb0fc('0x11')]));});});};exports[_0xb0fc('0x1f')]=function(_0x11fc3a){var _0x4dcc6b=this;return new Promise(function(_0x742b8a,_0x303b9c){return db[_0xb0fc('0x15')][_0xb0fc('0x20')]({'raw':_0x11fc3a['options']?_0x11fc3a['options']['raw']===undefined?!![]:![]:!![],'where':_0x11fc3a[_0xb0fc('0x17')]?_0x11fc3a[_0xb0fc('0x17')][_0xb0fc('0x19')]||null:null,'attributes':_0x11fc3a['options']?_0x11fc3a[_0xb0fc('0x17')][_0xb0fc('0x1a')]||null:null,'include':_0x11fc3a['options']?_0x11fc3a[_0xb0fc('0x17')]['include']?_[_0xb0fc('0x1d')](_0x11fc3a[_0xb0fc('0x17')]['include'],function(_0x28644d){return{'model':db[_0x28644d[_0xb0fc('0x1e')]],'as':_0x28644d['as'],'attributes':_0x28644d[_0xb0fc('0x1a')],'include':_0x28644d[_0xb0fc('0x1c')]?_[_0xb0fc('0x1d')](_0x28644d[_0xb0fc('0x1c')],function(_0x27a228){return{'model':db[_0x27a228[_0xb0fc('0x1e')]],'as':_0x27a228['as'],'attributes':_0x27a228[_0xb0fc('0x1a')],'include':_0x27a228[_0xb0fc('0x1c')]?_[_0xb0fc('0x1d')](_0x27a228['include'],function(_0x36809f){return{'model':db[_0x36809f[_0xb0fc('0x1e')]],'as':_0x36809f['as'],'attributes':_0x36809f[_0xb0fc('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xb0fc('0xa')](function(_0x1eb8d3){logger['info'](_0xb0fc('0x1f'),_0x11fc3a);logger['debug']('ShowDynamics365Account',_0x11fc3a,JSON[_0xb0fc('0xf')](_0x1eb8d3));_0x742b8a(_0x1eb8d3);})[_0xb0fc('0x13')](function(_0x323659){logger['error'](_0xb0fc('0x1f'),_0x323659[_0xb0fc('0x11')],_0x11fc3a);_0x303b9c(_0x4dcc6b[_0xb0fc('0x10')](0x1f4,_0x323659[_0xb0fc('0x11')]));});});};
\ No newline at end of file