Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index 0a24b6b..ad0c01c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf40f=['stringify','error','code','Dynamics365Account,\x20%s,\x20%s','message','catch','GetDynamics365Account','Dynamics365Account','findAll','options','raw','where','map','include','model','attributes','then','debug','ShowDynamics365Account','find','lodash','util','moment','bluebird','randomstring','ioredis','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','Dynamics365Account,\x20%s,\x20%s,\x20%s'];(function(_0x5ebda9,_0x2badfe){var _0x3a99ee=function(_0x1354a5){while(--_0x1354a5){_0x5ebda9['push'](_0x5ebda9['shift']());}};_0x3a99ee(++_0x2badfe);}(_0xf40f,0x124));var _0xff40=function(_0x32672c,_0x13eca8){_0x32672c=_0x32672c-0x0;var _0x5e2a97=_0xf40f[_0x32672c];return _0x5e2a97;};'use strict';var _=require(_0xff40('0x0'));var util=require(_0xff40('0x1'));var moment=require(_0xff40('0x2'));var BPromise=require(_0xff40('0x3'));var rs=require(_0xff40('0x4'));var fs=require('fs');var Redis=require(_0xff40('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xff40('0x6'));var jayson=require(_0xff40('0x7'));var client=jayson[_0xff40('0x8')][_0xff40('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4513a0,_0x1240f0,_0x30131a){return new BPromise(function(_0x19016c,_0x116598){return client[_0xff40('0xa')](_0x4513a0,_0x30131a)['then'](function(_0x643b9f){logger[_0xff40('0xb')]('Dynamics365Account,\x20%s,\x20%s',_0x1240f0,_0xff40('0xc'));logger['debug'](_0xff40('0xd'),_0x1240f0,'request\x20sent',JSON[_0xff40('0xe')](_0x643b9f));if(_0x643b9f[_0xff40('0xf')]){if(_0x643b9f[_0xff40('0xf')][_0xff40('0x10')]===0x1f4){logger['error'](_0xff40('0x11'),_0x1240f0,_0x643b9f[_0xff40('0xf')][_0xff40('0x12')]);return _0x116598(_0x643b9f['error']['message']);}logger[_0xff40('0xf')](_0xff40('0x11'),_0x1240f0,_0x643b9f[_0xff40('0xf')][_0xff40('0x12')]);return _0x19016c(_0x643b9f[_0xff40('0xf')][_0xff40('0x12')]);}else{logger[_0xff40('0xb')](_0xff40('0x11'),_0x1240f0,_0xff40('0xc'));_0x19016c(_0x643b9f['result'][_0xff40('0x12')]);}})[_0xff40('0x13')](function(_0x27ae2c){logger[_0xff40('0xf')](_0xff40('0x11'),_0x1240f0,_0x27ae2c);_0x116598(_0x27ae2c);});});}exports[_0xff40('0x14')]=function(_0x4f3098){var _0x37c119=this;return new Promise(function(_0xcd0ada,_0x2654d5){return db[_0xff40('0x15')][_0xff40('0x16')]({'raw':_0x4f3098[_0xff40('0x17')]?_0x4f3098[_0xff40('0x17')][_0xff40('0x18')]===undefined?!![]:![]:!![],'where':_0x4f3098[_0xff40('0x17')]?_0x4f3098[_0xff40('0x17')][_0xff40('0x19')]||null:null,'attributes':_0x4f3098['options']?_0x4f3098[_0xff40('0x17')]['attributes']||null:null,'limit':_0x4f3098[_0xff40('0x17')]?_0x4f3098['options']['limit']||null:null,'include':_0x4f3098[_0xff40('0x17')]?_0x4f3098[_0xff40('0x17')]['include']?_[_0xff40('0x1a')](_0x4f3098[_0xff40('0x17')][_0xff40('0x1b')],function(_0x17dccd){return{'model':db[_0x17dccd[_0xff40('0x1c')]],'as':_0x17dccd['as'],'attributes':_0x17dccd[_0xff40('0x1d')],'include':_0x17dccd['include']?_['map'](_0x17dccd['include'],function(_0x151902){return{'model':db[_0x151902['model']],'as':_0x151902['as'],'attributes':_0x151902['attributes'],'include':_0x151902['include']?_[_0xff40('0x1a')](_0x151902[_0xff40('0x1b')],function(_0xfad76a){return{'model':db[_0xfad76a[_0xff40('0x1c')]],'as':_0xfad76a['as'],'attributes':_0xfad76a['attributes']};}):[]};}):[]};}):[]:[]})[_0xff40('0x1e')](function(_0x3a3726){logger[_0xff40('0xb')](_0xff40('0x14'),_0x4f3098);logger[_0xff40('0x1f')]('GetDynamics365Account',_0x4f3098,JSON[_0xff40('0xe')](_0x3a3726));_0xcd0ada(_0x3a3726);})[_0xff40('0x13')](function(_0x37df6c){logger[_0xff40('0xf')]('GetDynamics365Account',_0x37df6c[_0xff40('0x12')],_0x4f3098);_0x2654d5(_0x37c119[_0xff40('0xf')](0x1f4,_0x37df6c['message']));});});};exports[_0xff40('0x20')]=function(_0x103c56){var _0x4372bc=this;return new Promise(function(_0xb8ad7c,_0x3aba3e){return db['Dynamics365Account'][_0xff40('0x21')]({'raw':_0x103c56[_0xff40('0x17')]?_0x103c56[_0xff40('0x17')][_0xff40('0x18')]===undefined?!![]:![]:!![],'where':_0x103c56['options']?_0x103c56[_0xff40('0x17')][_0xff40('0x19')]||null:null,'attributes':_0x103c56[_0xff40('0x17')]?_0x103c56[_0xff40('0x17')][_0xff40('0x1d')]||null:null,'include':_0x103c56[_0xff40('0x17')]?_0x103c56[_0xff40('0x17')][_0xff40('0x1b')]?_[_0xff40('0x1a')](_0x103c56['options'][_0xff40('0x1b')],function(_0x3918c9){return{'model':db[_0x3918c9[_0xff40('0x1c')]],'as':_0x3918c9['as'],'attributes':_0x3918c9[_0xff40('0x1d')],'include':_0x3918c9['include']?_[_0xff40('0x1a')](_0x3918c9[_0xff40('0x1b')],function(_0x132ae0){return{'model':db[_0x132ae0[_0xff40('0x1c')]],'as':_0x132ae0['as'],'attributes':_0x132ae0['attributes'],'include':_0x132ae0[_0xff40('0x1b')]?_[_0xff40('0x1a')](_0x132ae0[_0xff40('0x1b')],function(_0x1ee7e8){return{'model':db[_0x1ee7e8[_0xff40('0x1c')]],'as':_0x1ee7e8['as'],'attributes':_0x1ee7e8[_0xff40('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xff40('0x1e')](function(_0x568675){logger[_0xff40('0xb')](_0xff40('0x20'),_0x103c56);logger['debug'](_0xff40('0x20'),_0x103c56,JSON[_0xff40('0xe')](_0x568675));_0xb8ad7c(_0x568675);})[_0xff40('0x13')](function(_0x2b0700){logger[_0xff40('0xf')](_0xff40('0x20'),_0x2b0700[_0xff40('0x12')],_0x103c56);_0x3aba3e(_0x4372bc[_0xff40('0xf')](0x1f4,_0x2b0700['message']));});});};
\ No newline at end of file
+var _0x4469=['ShowDynamics365Account','find','where','then','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','Dynamics365Account','findAll','options','raw','limit','map','include','model','attributes','catch','GetDynamics365Account'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x4469,0x16c));var _0x9446=function(_0x45df0e,_0x4c1b8f){_0x45df0e=_0x45df0e-0x0;var _0x122c0b=_0x4469[_0x45df0e];return _0x122c0b;};'use strict';var _=require(_0x9446('0x0'));var util=require(_0x9446('0x1'));var moment=require(_0x9446('0x2'));var BPromise=require(_0x9446('0x3'));var rs=require(_0x9446('0x4'));var fs=require('fs');var Redis=require(_0x9446('0x5'));var db=require(_0x9446('0x6'))['db'];var utils=require(_0x9446('0x7'));var logger=require(_0x9446('0x8'))('rpc');var config=require(_0x9446('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x9446('0xa')][_0x9446('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5e7c97,_0x123aa6,_0x45e208){return new BPromise(function(_0x3599b0,_0x46b954){return client[_0x9446('0xc')](_0x5e7c97,_0x45e208)['then'](function(_0x58d54a){logger['info'](_0x9446('0xd'),_0x123aa6,_0x9446('0xe'));logger[_0x9446('0xf')]('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x123aa6,'request\x20sent',JSON[_0x9446('0x10')](_0x58d54a));if(_0x58d54a[_0x9446('0x11')]){if(_0x58d54a[_0x9446('0x11')][_0x9446('0x12')]===0x1f4){logger['error']('Dynamics365Account,\x20%s,\x20%s',_0x123aa6,_0x58d54a[_0x9446('0x11')][_0x9446('0x13')]);return _0x46b954(_0x58d54a[_0x9446('0x11')][_0x9446('0x13')]);}logger['error'](_0x9446('0xd'),_0x123aa6,_0x58d54a[_0x9446('0x11')][_0x9446('0x13')]);return _0x3599b0(_0x58d54a[_0x9446('0x11')]['message']);}else{logger[_0x9446('0x14')]('Dynamics365Account,\x20%s,\x20%s',_0x123aa6,_0x9446('0xe'));_0x3599b0(_0x58d54a['result']['message']);}})['catch'](function(_0x23b89e){logger[_0x9446('0x11')](_0x9446('0xd'),_0x123aa6,_0x23b89e);_0x46b954(_0x23b89e);});});}exports['GetDynamics365Account']=function(_0x386207){var _0x3d766a=this;return new Promise(function(_0x158d4b,_0x482eba){return db[_0x9446('0x15')][_0x9446('0x16')]({'raw':_0x386207[_0x9446('0x17')]?_0x386207[_0x9446('0x17')][_0x9446('0x18')]===undefined?!![]:![]:!![],'where':_0x386207[_0x9446('0x17')]?_0x386207['options']['where']||null:null,'attributes':_0x386207['options']?_0x386207[_0x9446('0x17')]['attributes']||null:null,'limit':_0x386207[_0x9446('0x17')]?_0x386207['options'][_0x9446('0x19')]||null:null,'include':_0x386207[_0x9446('0x17')]?_0x386207[_0x9446('0x17')]['include']?_[_0x9446('0x1a')](_0x386207[_0x9446('0x17')][_0x9446('0x1b')],function(_0x1a53db){return{'model':db[_0x1a53db[_0x9446('0x1c')]],'as':_0x1a53db['as'],'attributes':_0x1a53db[_0x9446('0x1d')],'include':_0x1a53db[_0x9446('0x1b')]?_[_0x9446('0x1a')](_0x1a53db['include'],function(_0x3f7c0d){return{'model':db[_0x3f7c0d[_0x9446('0x1c')]],'as':_0x3f7c0d['as'],'attributes':_0x3f7c0d[_0x9446('0x1d')],'include':_0x3f7c0d[_0x9446('0x1b')]?_[_0x9446('0x1a')](_0x3f7c0d[_0x9446('0x1b')],function(_0x287951){return{'model':db[_0x287951[_0x9446('0x1c')]],'as':_0x287951['as'],'attributes':_0x287951['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x478f05){logger['info']('GetDynamics365Account',_0x386207);logger[_0x9446('0xf')]('GetDynamics365Account',_0x386207,JSON[_0x9446('0x10')](_0x478f05));_0x158d4b(_0x478f05);})[_0x9446('0x1e')](function(_0x19acaa){logger['error'](_0x9446('0x1f'),_0x19acaa[_0x9446('0x13')],_0x386207);_0x482eba(_0x3d766a[_0x9446('0x11')](0x1f4,_0x19acaa[_0x9446('0x13')]));});});};exports[_0x9446('0x20')]=function(_0x5d390d){var _0x59a8e0=this;return new Promise(function(_0x3f7148,_0xcfdbe6){return db[_0x9446('0x15')][_0x9446('0x21')]({'raw':_0x5d390d[_0x9446('0x17')]?_0x5d390d[_0x9446('0x17')][_0x9446('0x18')]===undefined?!![]:![]:!![],'where':_0x5d390d['options']?_0x5d390d['options'][_0x9446('0x22')]||null:null,'attributes':_0x5d390d[_0x9446('0x17')]?_0x5d390d['options']['attributes']||null:null,'include':_0x5d390d[_0x9446('0x17')]?_0x5d390d[_0x9446('0x17')][_0x9446('0x1b')]?_[_0x9446('0x1a')](_0x5d390d[_0x9446('0x17')][_0x9446('0x1b')],function(_0x5a31b6){return{'model':db[_0x5a31b6['model']],'as':_0x5a31b6['as'],'attributes':_0x5a31b6[_0x9446('0x1d')],'include':_0x5a31b6[_0x9446('0x1b')]?_[_0x9446('0x1a')](_0x5a31b6['include'],function(_0x51e8ef){return{'model':db[_0x51e8ef[_0x9446('0x1c')]],'as':_0x51e8ef['as'],'attributes':_0x51e8ef[_0x9446('0x1d')],'include':_0x51e8ef[_0x9446('0x1b')]?_['map'](_0x51e8ef['include'],function(_0x26968c){return{'model':db[_0x26968c[_0x9446('0x1c')]],'as':_0x26968c['as'],'attributes':_0x26968c['attributes']};}):[]};}):[]};}):[]:[]})[_0x9446('0x23')](function(_0x5021ab){logger[_0x9446('0x14')](_0x9446('0x20'),_0x5d390d);logger[_0x9446('0xf')](_0x9446('0x20'),_0x5d390d,JSON[_0x9446('0x10')](_0x5021ab));_0x3f7148(_0x5021ab);})[_0x9446('0x1e')](function(_0x1638f2){logger[_0x9446('0x11')](_0x9446('0x20'),_0x1638f2[_0x9446('0x13')],_0x5d390d);_0xcfdbe6(_0x59a8e0[_0x9446('0x11')](0x1f4,_0x1638f2[_0x9446('0x13')]));});});};
\ No newline at end of file