Built motion from commit d69f4380.|2.6.29
[motion2.git] / server / api / intServicenowAccount / intServicenowAccount.rpc.js
index 50f1f64..253ba20 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf025=['where','ShowServicenowAccount','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','ServicenowAccount,\x20%s,\x20%s','message','result','GetServicenowAccount','ServicenowAccount','options','raw','limit','map','include','model','attributes'];(function(_0x1ecaba,_0x1f3eec){var _0x134ca1=function(_0x1c99d0){while(--_0x1c99d0){_0x1ecaba['push'](_0x1ecaba['shift']());}};_0x134ca1(++_0x1f3eec);}(_0xf025,0xce));var _0x5f02=function(_0x57da0a,_0x284aed){_0x57da0a=_0x57da0a-0x0;var _0x3145d5=_0xf025[_0x57da0a];return _0x3145d5;};'use strict';var _=require(_0x5f02('0x0'));var util=require(_0x5f02('0x1'));var moment=require(_0x5f02('0x2'));var BPromise=require('bluebird');var rs=require(_0x5f02('0x3'));var fs=require('fs');var Redis=require(_0x5f02('0x4'));var db=require(_0x5f02('0x5'))['db'];var utils=require(_0x5f02('0x6'));var logger=require(_0x5f02('0x7'))('rpc');var config=require(_0x5f02('0x8'));var jayson=require(_0x5f02('0x9'));var client=jayson[_0x5f02('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0xf9122,_0x3e906d,_0x2fb8e8){return new BPromise(function(_0x4af1e8,_0x54c630){return client[_0x5f02('0xb')](_0xf9122,_0x2fb8e8)[_0x5f02('0xc')](function(_0x7d7cf7){logger[_0x5f02('0xd')]('ServicenowAccount,\x20%s,\x20%s',_0x3e906d,_0x5f02('0xe'));logger[_0x5f02('0xf')](_0x5f02('0x10'),_0x3e906d,_0x5f02('0xe'),JSON[_0x5f02('0x11')](_0x7d7cf7));if(_0x7d7cf7[_0x5f02('0x12')]){if(_0x7d7cf7[_0x5f02('0x12')][_0x5f02('0x13')]===0x1f4){logger[_0x5f02('0x12')](_0x5f02('0x14'),_0x3e906d,_0x7d7cf7[_0x5f02('0x12')][_0x5f02('0x15')]);return _0x54c630(_0x7d7cf7[_0x5f02('0x12')]['message']);}logger[_0x5f02('0x12')]('ServicenowAccount,\x20%s,\x20%s',_0x3e906d,_0x7d7cf7[_0x5f02('0x12')][_0x5f02('0x15')]);return _0x4af1e8(_0x7d7cf7[_0x5f02('0x12')]['message']);}else{logger['info']('ServicenowAccount,\x20%s,\x20%s',_0x3e906d,_0x5f02('0xe'));_0x4af1e8(_0x7d7cf7[_0x5f02('0x16')][_0x5f02('0x15')]);}})['catch'](function(_0x549e3b){logger[_0x5f02('0x12')](_0x5f02('0x14'),_0x3e906d,_0x549e3b);_0x54c630(_0x549e3b);});});}exports[_0x5f02('0x17')]=function(_0x141475){var _0x5c04f5=this;return new Promise(function(_0x3e0dad,_0x1da645){return db[_0x5f02('0x18')]['findAll']({'raw':_0x141475[_0x5f02('0x19')]?_0x141475[_0x5f02('0x19')][_0x5f02('0x1a')]===undefined?!![]:![]:!![],'where':_0x141475[_0x5f02('0x19')]?_0x141475[_0x5f02('0x19')]['where']||null:null,'attributes':_0x141475['options']?_0x141475[_0x5f02('0x19')]['attributes']||null:null,'limit':_0x141475[_0x5f02('0x19')]?_0x141475['options'][_0x5f02('0x1b')]||null:null,'include':_0x141475['options']?_0x141475[_0x5f02('0x19')]['include']?_[_0x5f02('0x1c')](_0x141475[_0x5f02('0x19')][_0x5f02('0x1d')],function(_0x29a473){return{'model':db[_0x29a473[_0x5f02('0x1e')]],'as':_0x29a473['as'],'attributes':_0x29a473[_0x5f02('0x1f')],'include':_0x29a473['include']?_[_0x5f02('0x1c')](_0x29a473['include'],function(_0xb70fd){return{'model':db[_0xb70fd[_0x5f02('0x1e')]],'as':_0xb70fd['as'],'attributes':_0xb70fd[_0x5f02('0x1f')],'include':_0xb70fd[_0x5f02('0x1d')]?_[_0x5f02('0x1c')](_0xb70fd[_0x5f02('0x1d')],function(_0xd5aa07){return{'model':db[_0xd5aa07[_0x5f02('0x1e')]],'as':_0xd5aa07['as'],'attributes':_0xd5aa07[_0x5f02('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x5f02('0xc')](function(_0xc8893){logger[_0x5f02('0xd')](_0x5f02('0x17'),_0x141475);logger[_0x5f02('0xf')]('GetServicenowAccount',_0x141475,JSON['stringify'](_0xc8893));_0x3e0dad(_0xc8893);})['catch'](function(_0x21d1e6){logger['error'](_0x5f02('0x17'),_0x21d1e6[_0x5f02('0x15')],_0x141475);_0x1da645(_0x5c04f5[_0x5f02('0x12')](0x1f4,_0x21d1e6[_0x5f02('0x15')]));});});};exports['ShowServicenowAccount']=function(_0x58041c){var _0x4bc523=this;return new Promise(function(_0x3a4b55,_0x38c65f){return db[_0x5f02('0x18')]['find']({'raw':_0x58041c[_0x5f02('0x19')]?_0x58041c[_0x5f02('0x19')][_0x5f02('0x1a')]===undefined?!![]:![]:!![],'where':_0x58041c[_0x5f02('0x19')]?_0x58041c[_0x5f02('0x19')][_0x5f02('0x20')]||null:null,'attributes':_0x58041c[_0x5f02('0x19')]?_0x58041c[_0x5f02('0x19')][_0x5f02('0x1f')]||null:null,'include':_0x58041c[_0x5f02('0x19')]?_0x58041c[_0x5f02('0x19')][_0x5f02('0x1d')]?_['map'](_0x58041c['options']['include'],function(_0x26cec9){return{'model':db[_0x26cec9[_0x5f02('0x1e')]],'as':_0x26cec9['as'],'attributes':_0x26cec9[_0x5f02('0x1f')],'include':_0x26cec9['include']?_[_0x5f02('0x1c')](_0x26cec9[_0x5f02('0x1d')],function(_0x2d4ed8){return{'model':db[_0x2d4ed8['model']],'as':_0x2d4ed8['as'],'attributes':_0x2d4ed8[_0x5f02('0x1f')],'include':_0x2d4ed8[_0x5f02('0x1d')]?_[_0x5f02('0x1c')](_0x2d4ed8['include'],function(_0x28f651){return{'model':db[_0x28f651[_0x5f02('0x1e')]],'as':_0x28f651['as'],'attributes':_0x28f651[_0x5f02('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4023ec){logger['info'](_0x5f02('0x21'),_0x58041c);logger[_0x5f02('0xf')](_0x5f02('0x21'),_0x58041c,JSON[_0x5f02('0x11')](_0x4023ec));_0x3a4b55(_0x4023ec);})['catch'](function(_0xf939d9){logger[_0x5f02('0x12')](_0x5f02('0x21'),_0xf939d9[_0x5f02('0x15')],_0x58041c);_0x38c65f(_0x4bc523[_0x5f02('0x12')](0x1f4,_0xf939d9[_0x5f02('0x15')]));});});};
\ No newline at end of file
+var _0x3ad9=['error','message','info','result','catch','GetServicenowAccount','ServicenowAccount','findAll','options','where','attributes','include','map','model','debug','ShowServicenowAccount','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','ServicenowAccount,\x20%s,\x20%s','request\x20sent','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','code'];(function(_0x1c3a30,_0x330a20){var _0x385263=function(_0x27e02c){while(--_0x27e02c){_0x1c3a30['push'](_0x1c3a30['shift']());}};_0x385263(++_0x330a20);}(_0x3ad9,0x142));var _0x93ad=function(_0x3ce3c,_0x319337){_0x3ce3c=_0x3ce3c-0x0;var _0x55a2c9=_0x3ad9[_0x3ce3c];return _0x55a2c9;};'use strict';var _=require('lodash');var util=require(_0x93ad('0x0'));var moment=require(_0x93ad('0x1'));var BPromise=require('bluebird');var rs=require(_0x93ad('0x2'));var fs=require('fs');var Redis=require(_0x93ad('0x3'));var db=require(_0x93ad('0x4'))['db'];var utils=require(_0x93ad('0x5'));var logger=require(_0x93ad('0x6'))(_0x93ad('0x7'));var config=require('../../config/environment');var jayson=require(_0x93ad('0x8'));var client=jayson[_0x93ad('0x9')][_0x93ad('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x31d933,_0x1055d8,_0x5b8b11){return new BPromise(function(_0x421ac8,_0x5447af){return client[_0x93ad('0xb')](_0x31d933,_0x5b8b11)[_0x93ad('0xc')](function(_0x5744f6){logger['info'](_0x93ad('0xd'),_0x1055d8,_0x93ad('0xe'));logger['debug'](_0x93ad('0xf'),_0x1055d8,'request\x20sent',JSON[_0x93ad('0x10')](_0x5744f6));if(_0x5744f6['error']){if(_0x5744f6['error'][_0x93ad('0x11')]===0x1f4){logger['error'](_0x93ad('0xd'),_0x1055d8,_0x5744f6[_0x93ad('0x12')][_0x93ad('0x13')]);return _0x5447af(_0x5744f6[_0x93ad('0x12')][_0x93ad('0x13')]);}logger[_0x93ad('0x12')](_0x93ad('0xd'),_0x1055d8,_0x5744f6[_0x93ad('0x12')][_0x93ad('0x13')]);return _0x421ac8(_0x5744f6[_0x93ad('0x12')][_0x93ad('0x13')]);}else{logger[_0x93ad('0x14')](_0x93ad('0xd'),_0x1055d8,_0x93ad('0xe'));_0x421ac8(_0x5744f6[_0x93ad('0x15')][_0x93ad('0x13')]);}})[_0x93ad('0x16')](function(_0x2c3c42){logger[_0x93ad('0x12')]('ServicenowAccount,\x20%s,\x20%s',_0x1055d8,_0x2c3c42);_0x5447af(_0x2c3c42);});});}exports[_0x93ad('0x17')]=function(_0x39bd0c){var _0x35bf83=this;return new Promise(function(_0x275630,_0x3c2033){return db[_0x93ad('0x18')][_0x93ad('0x19')]({'raw':_0x39bd0c[_0x93ad('0x1a')]?_0x39bd0c[_0x93ad('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x39bd0c[_0x93ad('0x1a')]?_0x39bd0c[_0x93ad('0x1a')][_0x93ad('0x1b')]||null:null,'attributes':_0x39bd0c[_0x93ad('0x1a')]?_0x39bd0c[_0x93ad('0x1a')][_0x93ad('0x1c')]||null:null,'limit':_0x39bd0c[_0x93ad('0x1a')]?_0x39bd0c[_0x93ad('0x1a')]['limit']||null:null,'include':_0x39bd0c[_0x93ad('0x1a')]?_0x39bd0c[_0x93ad('0x1a')][_0x93ad('0x1d')]?_[_0x93ad('0x1e')](_0x39bd0c[_0x93ad('0x1a')]['include'],function(_0x4793c0){return{'model':db[_0x4793c0[_0x93ad('0x1f')]],'as':_0x4793c0['as'],'attributes':_0x4793c0['attributes'],'include':_0x4793c0[_0x93ad('0x1d')]?_[_0x93ad('0x1e')](_0x4793c0['include'],function(_0x295a1e){return{'model':db[_0x295a1e[_0x93ad('0x1f')]],'as':_0x295a1e['as'],'attributes':_0x295a1e[_0x93ad('0x1c')],'include':_0x295a1e[_0x93ad('0x1d')]?_[_0x93ad('0x1e')](_0x295a1e['include'],function(_0x9f369d){return{'model':db[_0x9f369d[_0x93ad('0x1f')]],'as':_0x9f369d['as'],'attributes':_0x9f369d[_0x93ad('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4dff07){logger[_0x93ad('0x14')](_0x93ad('0x17'),_0x39bd0c);logger[_0x93ad('0x20')](_0x93ad('0x17'),_0x39bd0c,JSON[_0x93ad('0x10')](_0x4dff07));_0x275630(_0x4dff07);})[_0x93ad('0x16')](function(_0x26f9c9){logger[_0x93ad('0x12')](_0x93ad('0x17'),_0x26f9c9[_0x93ad('0x13')],_0x39bd0c);_0x3c2033(_0x35bf83[_0x93ad('0x12')](0x1f4,_0x26f9c9[_0x93ad('0x13')]));});});};exports[_0x93ad('0x21')]=function(_0x52c695){var _0x1e7675=this;return new Promise(function(_0x5e0c55,_0x349a35){return db[_0x93ad('0x18')]['find']({'raw':_0x52c695[_0x93ad('0x1a')]?_0x52c695[_0x93ad('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x52c695[_0x93ad('0x1a')]?_0x52c695[_0x93ad('0x1a')]['where']||null:null,'attributes':_0x52c695[_0x93ad('0x1a')]?_0x52c695[_0x93ad('0x1a')][_0x93ad('0x1c')]||null:null,'include':_0x52c695[_0x93ad('0x1a')]?_0x52c695['options'][_0x93ad('0x1d')]?_[_0x93ad('0x1e')](_0x52c695[_0x93ad('0x1a')][_0x93ad('0x1d')],function(_0x3bc8bc){return{'model':db[_0x3bc8bc[_0x93ad('0x1f')]],'as':_0x3bc8bc['as'],'attributes':_0x3bc8bc[_0x93ad('0x1c')],'include':_0x3bc8bc[_0x93ad('0x1d')]?_[_0x93ad('0x1e')](_0x3bc8bc[_0x93ad('0x1d')],function(_0x5738c6){return{'model':db[_0x5738c6[_0x93ad('0x1f')]],'as':_0x5738c6['as'],'attributes':_0x5738c6[_0x93ad('0x1c')],'include':_0x5738c6[_0x93ad('0x1d')]?_[_0x93ad('0x1e')](_0x5738c6[_0x93ad('0x1d')],function(_0x234bd5){return{'model':db[_0x234bd5[_0x93ad('0x1f')]],'as':_0x234bd5['as'],'attributes':_0x234bd5['attributes']};}):[]};}):[]};}):[]:[]})[_0x93ad('0xc')](function(_0x313e5f){logger[_0x93ad('0x14')](_0x93ad('0x21'),_0x52c695);logger['debug'](_0x93ad('0x21'),_0x52c695,JSON['stringify'](_0x313e5f));_0x5e0c55(_0x313e5f);})[_0x93ad('0x16')](function(_0x13b738){logger[_0x93ad('0x12')]('ShowServicenowAccount',_0x13b738['message'],_0x52c695);_0x349a35(_0x1e7675[_0x93ad('0x12')](0x1f4,_0x13b738['message']));});});};
\ No newline at end of file