Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / intServicenowAccount / intServicenowAccount.rpc.js
index 3791c26..bc711a3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe0dd=['model','GetServicenowAccount','ShowServicenowAccount','find','lodash','util','moment','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','debug','stringify','error','code','ServicenowAccount,\x20%s,\x20%s','message','info','request\x20sent','result','catch','ServicenowAccount','findAll','options','raw','where','attributes','limit','include','map'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe0dd,0x1ee));var _0xde0d=function(_0x13b02f,_0x462a53){_0x13b02f=_0x13b02f-0x0;var _0x12e9a6=_0xe0dd[_0x13b02f];return _0x12e9a6;};'use strict';var _=require(_0xde0d('0x0'));var util=require(_0xde0d('0x1'));var moment=require(_0xde0d('0x2'));var BPromise=require('bluebird');var rs=require(_0xde0d('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xde0d('0x4'));var logger=require(_0xde0d('0x5'))(_0xde0d('0x6'));var config=require(_0xde0d('0x7'));var jayson=require(_0xde0d('0x8'));var client=jayson['client'][_0xde0d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1c6457,_0x4e718d,_0x3915bd){return new BPromise(function(_0x26e6eb,_0x2cf755){return client[_0xde0d('0xa')](_0x1c6457,_0x3915bd)[_0xde0d('0xb')](function(_0x3091a2){logger['info']('ServicenowAccount,\x20%s,\x20%s',_0x4e718d,'request\x20sent');logger[_0xde0d('0xc')]('ServicenowAccount,\x20%s,\x20%s,\x20%s',_0x4e718d,'request\x20sent',JSON[_0xde0d('0xd')](_0x3091a2));if(_0x3091a2[_0xde0d('0xe')]){if(_0x3091a2['error'][_0xde0d('0xf')]===0x1f4){logger[_0xde0d('0xe')](_0xde0d('0x10'),_0x4e718d,_0x3091a2['error'][_0xde0d('0x11')]);return _0x2cf755(_0x3091a2[_0xde0d('0xe')]['message']);}logger[_0xde0d('0xe')](_0xde0d('0x10'),_0x4e718d,_0x3091a2[_0xde0d('0xe')][_0xde0d('0x11')]);return _0x26e6eb(_0x3091a2[_0xde0d('0xe')][_0xde0d('0x11')]);}else{logger[_0xde0d('0x12')](_0xde0d('0x10'),_0x4e718d,_0xde0d('0x13'));_0x26e6eb(_0x3091a2[_0xde0d('0x14')][_0xde0d('0x11')]);}})[_0xde0d('0x15')](function(_0x1a3efa){logger['error'](_0xde0d('0x10'),_0x4e718d,_0x1a3efa);_0x2cf755(_0x1a3efa);});});}exports['GetServicenowAccount']=function(_0x35b5b1){var _0x3ae5b5=this;return new Promise(function(_0x5bc3d0,_0x289e7c){return db[_0xde0d('0x16')][_0xde0d('0x17')]({'raw':_0x35b5b1[_0xde0d('0x18')]?_0x35b5b1[_0xde0d('0x18')][_0xde0d('0x19')]===undefined?!![]:![]:!![],'where':_0x35b5b1['options']?_0x35b5b1[_0xde0d('0x18')][_0xde0d('0x1a')]||null:null,'attributes':_0x35b5b1[_0xde0d('0x18')]?_0x35b5b1[_0xde0d('0x18')][_0xde0d('0x1b')]||null:null,'limit':_0x35b5b1[_0xde0d('0x18')]?_0x35b5b1[_0xde0d('0x18')][_0xde0d('0x1c')]||null:null,'include':_0x35b5b1[_0xde0d('0x18')]?_0x35b5b1[_0xde0d('0x18')][_0xde0d('0x1d')]?_[_0xde0d('0x1e')](_0x35b5b1[_0xde0d('0x18')][_0xde0d('0x1d')],function(_0x103c12){return{'model':db[_0x103c12[_0xde0d('0x1f')]],'as':_0x103c12['as'],'attributes':_0x103c12['attributes'],'include':_0x103c12['include']?_['map'](_0x103c12[_0xde0d('0x1d')],function(_0x89891d){return{'model':db[_0x89891d['model']],'as':_0x89891d['as'],'attributes':_0x89891d[_0xde0d('0x1b')],'include':_0x89891d[_0xde0d('0x1d')]?_[_0xde0d('0x1e')](_0x89891d[_0xde0d('0x1d')],function(_0x218551){return{'model':db[_0x218551[_0xde0d('0x1f')]],'as':_0x218551['as'],'attributes':_0x218551['attributes']};}):[]};}):[]};}):[]:[]})[_0xde0d('0xb')](function(_0x2f23a3){logger[_0xde0d('0x12')]('GetServicenowAccount',_0x35b5b1);logger[_0xde0d('0xc')](_0xde0d('0x20'),_0x35b5b1,JSON[_0xde0d('0xd')](_0x2f23a3));_0x5bc3d0(_0x2f23a3);})['catch'](function(_0x4b98a0){logger['error'](_0xde0d('0x20'),_0x4b98a0[_0xde0d('0x11')],_0x35b5b1);_0x289e7c(_0x3ae5b5[_0xde0d('0xe')](0x1f4,_0x4b98a0['message']));});});};exports[_0xde0d('0x21')]=function(_0xa2bcca){var _0x5d534b=this;return new Promise(function(_0x3200de,_0x41d4cd){return db[_0xde0d('0x16')][_0xde0d('0x22')]({'raw':_0xa2bcca[_0xde0d('0x18')]?_0xa2bcca[_0xde0d('0x18')][_0xde0d('0x19')]===undefined?!![]:![]:!![],'where':_0xa2bcca[_0xde0d('0x18')]?_0xa2bcca[_0xde0d('0x18')][_0xde0d('0x1a')]||null:null,'attributes':_0xa2bcca[_0xde0d('0x18')]?_0xa2bcca[_0xde0d('0x18')][_0xde0d('0x1b')]||null:null,'include':_0xa2bcca[_0xde0d('0x18')]?_0xa2bcca['options'][_0xde0d('0x1d')]?_['map'](_0xa2bcca[_0xde0d('0x18')]['include'],function(_0x3380f0){return{'model':db[_0x3380f0[_0xde0d('0x1f')]],'as':_0x3380f0['as'],'attributes':_0x3380f0[_0xde0d('0x1b')],'include':_0x3380f0[_0xde0d('0x1d')]?_[_0xde0d('0x1e')](_0x3380f0[_0xde0d('0x1d')],function(_0x3cc3b2){return{'model':db[_0x3cc3b2[_0xde0d('0x1f')]],'as':_0x3cc3b2['as'],'attributes':_0x3cc3b2[_0xde0d('0x1b')],'include':_0x3cc3b2[_0xde0d('0x1d')]?_[_0xde0d('0x1e')](_0x3cc3b2[_0xde0d('0x1d')],function(_0x39b3ad){return{'model':db[_0x39b3ad[_0xde0d('0x1f')]],'as':_0x39b3ad['as'],'attributes':_0x39b3ad[_0xde0d('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x30d37f){logger[_0xde0d('0x12')](_0xde0d('0x21'),_0xa2bcca);logger['debug']('ShowServicenowAccount',_0xa2bcca,JSON[_0xde0d('0xd')](_0x30d37f));_0x3200de(_0x30d37f);})[_0xde0d('0x15')](function(_0x480843){logger[_0xde0d('0xe')](_0xde0d('0x21'),_0x480843[_0xde0d('0x11')],_0xa2bcca);_0x41d4cd(_0x5d534b[_0xde0d('0xe')](0x1f4,_0x480843[_0xde0d('0x11')]));});});};
\ No newline at end of file
+var _0xd893=['ShowServicenowAccount','ServicenowAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','ServicenowAccount,\x20%s,\x20%s','message','info','GetServicenowAccount','findAll','options','raw','where','attributes','include','map','model'];(function(_0x57ff0d,_0x1e9fb1){var _0x1ad30b=function(_0x3d2fdb){while(--_0x3d2fdb){_0x57ff0d['push'](_0x57ff0d['shift']());}};_0x1ad30b(++_0x1e9fb1);}(_0xd893,0x123));var _0x3d89=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xd893[_0x3947c9];return _0x2e7871;};'use strict';var _=require(_0x3d89('0x0'));var util=require(_0x3d89('0x1'));var moment=require(_0x3d89('0x2'));var BPromise=require(_0x3d89('0x3'));var rs=require(_0x3d89('0x4'));var fs=require('fs');var Redis=require(_0x3d89('0x5'));var db=require(_0x3d89('0x6'))['db'];var utils=require(_0x3d89('0x7'));var logger=require(_0x3d89('0x8'))(_0x3d89('0x9'));var config=require(_0x3d89('0xa'));var jayson=require(_0x3d89('0xb'));var client=jayson[_0x3d89('0xc')][_0x3d89('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x4460b8,_0x47be19,_0x574d5a){return new BPromise(function(_0x23ae0a,_0x53b2b7){return client[_0x3d89('0xe')](_0x4460b8,_0x574d5a)[_0x3d89('0xf')](function(_0x50a94a){logger['info']('ServicenowAccount,\x20%s,\x20%s',_0x47be19,_0x3d89('0x10'));logger[_0x3d89('0x11')](_0x3d89('0x12'),_0x47be19,_0x3d89('0x10'),JSON[_0x3d89('0x13')](_0x50a94a));if(_0x50a94a[_0x3d89('0x14')]){if(_0x50a94a[_0x3d89('0x14')]['code']===0x1f4){logger['error'](_0x3d89('0x15'),_0x47be19,_0x50a94a['error'][_0x3d89('0x16')]);return _0x53b2b7(_0x50a94a[_0x3d89('0x14')]['message']);}logger[_0x3d89('0x14')](_0x3d89('0x15'),_0x47be19,_0x50a94a[_0x3d89('0x14')][_0x3d89('0x16')]);return _0x23ae0a(_0x50a94a[_0x3d89('0x14')][_0x3d89('0x16')]);}else{logger[_0x3d89('0x17')](_0x3d89('0x15'),_0x47be19,_0x3d89('0x10'));_0x23ae0a(_0x50a94a['result']['message']);}})['catch'](function(_0x12a79e){logger[_0x3d89('0x14')](_0x3d89('0x15'),_0x47be19,_0x12a79e);_0x53b2b7(_0x12a79e);});});}exports[_0x3d89('0x18')]=function(_0x8f54c1){var _0x81cfe3=this;return new Promise(function(_0x5b985a,_0x126cf4){return db['ServicenowAccount'][_0x3d89('0x19')]({'raw':_0x8f54c1[_0x3d89('0x1a')]?_0x8f54c1['options'][_0x3d89('0x1b')]===undefined?!![]:![]:!![],'where':_0x8f54c1['options']?_0x8f54c1[_0x3d89('0x1a')][_0x3d89('0x1c')]||null:null,'attributes':_0x8f54c1[_0x3d89('0x1a')]?_0x8f54c1[_0x3d89('0x1a')][_0x3d89('0x1d')]||null:null,'limit':_0x8f54c1[_0x3d89('0x1a')]?_0x8f54c1[_0x3d89('0x1a')]['limit']||null:null,'include':_0x8f54c1['options']?_0x8f54c1[_0x3d89('0x1a')][_0x3d89('0x1e')]?_[_0x3d89('0x1f')](_0x8f54c1[_0x3d89('0x1a')][_0x3d89('0x1e')],function(_0x35e32a){return{'model':db[_0x35e32a[_0x3d89('0x20')]],'as':_0x35e32a['as'],'attributes':_0x35e32a['attributes'],'include':_0x35e32a['include']?_[_0x3d89('0x1f')](_0x35e32a[_0x3d89('0x1e')],function(_0x1a4f75){return{'model':db[_0x1a4f75[_0x3d89('0x20')]],'as':_0x1a4f75['as'],'attributes':_0x1a4f75[_0x3d89('0x1d')],'include':_0x1a4f75['include']?_[_0x3d89('0x1f')](_0x1a4f75['include'],function(_0xd5d182){return{'model':db[_0xd5d182[_0x3d89('0x20')]],'as':_0xd5d182['as'],'attributes':_0xd5d182[_0x3d89('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x3d89('0xf')](function(_0x5b96f5){logger[_0x3d89('0x17')](_0x3d89('0x18'),_0x8f54c1);logger['debug'](_0x3d89('0x18'),_0x8f54c1,JSON[_0x3d89('0x13')](_0x5b96f5));_0x5b985a(_0x5b96f5);})['catch'](function(_0x4c5abf){logger[_0x3d89('0x14')](_0x3d89('0x18'),_0x4c5abf[_0x3d89('0x16')],_0x8f54c1);_0x126cf4(_0x81cfe3[_0x3d89('0x14')](0x1f4,_0x4c5abf[_0x3d89('0x16')]));});});};exports[_0x3d89('0x21')]=function(_0x1c785e){var _0x13297d=this;return new Promise(function(_0x3f69a4,_0x597fa4){return db[_0x3d89('0x22')][_0x3d89('0x23')]({'raw':_0x1c785e[_0x3d89('0x1a')]?_0x1c785e[_0x3d89('0x1a')][_0x3d89('0x1b')]===undefined?!![]:![]:!![],'where':_0x1c785e[_0x3d89('0x1a')]?_0x1c785e[_0x3d89('0x1a')][_0x3d89('0x1c')]||null:null,'attributes':_0x1c785e[_0x3d89('0x1a')]?_0x1c785e[_0x3d89('0x1a')][_0x3d89('0x1d')]||null:null,'include':_0x1c785e[_0x3d89('0x1a')]?_0x1c785e[_0x3d89('0x1a')]['include']?_[_0x3d89('0x1f')](_0x1c785e[_0x3d89('0x1a')][_0x3d89('0x1e')],function(_0x2bb882){return{'model':db[_0x2bb882[_0x3d89('0x20')]],'as':_0x2bb882['as'],'attributes':_0x2bb882[_0x3d89('0x1d')],'include':_0x2bb882[_0x3d89('0x1e')]?_[_0x3d89('0x1f')](_0x2bb882['include'],function(_0x17fae3){return{'model':db[_0x17fae3[_0x3d89('0x20')]],'as':_0x17fae3['as'],'attributes':_0x17fae3[_0x3d89('0x1d')],'include':_0x17fae3['include']?_[_0x3d89('0x1f')](_0x17fae3['include'],function(_0x506392){return{'model':db[_0x506392[_0x3d89('0x20')]],'as':_0x506392['as'],'attributes':_0x506392[_0x3d89('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x3d89('0xf')](function(_0x8ea2b2){logger['info']('ShowServicenowAccount',_0x1c785e);logger[_0x3d89('0x11')](_0x3d89('0x21'),_0x1c785e,JSON[_0x3d89('0x13')](_0x8ea2b2));_0x3f69a4(_0x8ea2b2);})['catch'](function(_0x14044b){logger['error'](_0x3d89('0x21'),_0x14044b['message'],_0x1c785e);_0x597fa4(_0x13297d[_0x3d89('0x14')](0x1f4,_0x14044b['message']));});});};
\ No newline at end of file