Built motion from commit a679711e.|2.6.15
[motion2.git] / server / api / intServicenowAccount / intServicenowAccount.rpc.js
index 246084c..14e5d32 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6974=['rpc','jayson/promise','http','then','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','ServicenowAccount','findAll','raw','options','where','attributes','include','map','GetServicenowAccount','stringify','find','model','ShowServicenowAccount','lodash','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x6974,0x157));var _0x4697=function(_0x27b702,_0x14ce1f){_0x27b702=_0x27b702-0x0;var _0x5c0ac3=_0x6974[_0x27b702];return _0x5c0ac3;};'use strict';var _=require(_0x4697('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4697('0x1'));var db=require(_0x4697('0x2'))['db'];var utils=require(_0x4697('0x3'));var logger=require(_0x4697('0x4'))(_0x4697('0x5'));var config=require('../../config/environment');var jayson=require(_0x4697('0x6'));var client=jayson['client'][_0x4697('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x212b73,_0x382599,_0x49f70e){return new BPromise(function(_0x5cc8b9,_0x35fb8e){return client['request'](_0x212b73,_0x49f70e)[_0x4697('0x8')](function(_0x2f190b){logger['info'](_0x4697('0x9'),_0x382599,_0x4697('0xa'));logger[_0x4697('0xb')]('ServicenowAccount,\x20%s,\x20%s,\x20%s',_0x382599,_0x4697('0xa'),JSON['stringify'](_0x2f190b));if(_0x2f190b['error']){if(_0x2f190b[_0x4697('0xc')][_0x4697('0xd')]===0x1f4){logger[_0x4697('0xc')](_0x4697('0x9'),_0x382599,_0x2f190b[_0x4697('0xc')][_0x4697('0xe')]);return _0x35fb8e(_0x2f190b['error'][_0x4697('0xe')]);}logger[_0x4697('0xc')]('ServicenowAccount,\x20%s,\x20%s',_0x382599,_0x2f190b[_0x4697('0xc')]['message']);return _0x5cc8b9(_0x2f190b[_0x4697('0xc')][_0x4697('0xe')]);}else{logger['info']('ServicenowAccount,\x20%s,\x20%s',_0x382599,_0x4697('0xa'));_0x5cc8b9(_0x2f190b['result']['message']);}})[_0x4697('0xf')](function(_0x527beb){logger[_0x4697('0xc')](_0x4697('0x9'),_0x382599,_0x527beb);_0x35fb8e(_0x527beb);});});}exports['GetServicenowAccount']=function(_0x572f1c){var _0x3e3510=this;return new Promise(function(_0x3896d4,_0x238720){return db[_0x4697('0x10')][_0x4697('0x11')]({'raw':_0x572f1c['options']?_0x572f1c['options'][_0x4697('0x12')]===undefined?!![]:![]:!![],'where':_0x572f1c[_0x4697('0x13')]?_0x572f1c[_0x4697('0x13')][_0x4697('0x14')]||null:null,'attributes':_0x572f1c[_0x4697('0x13')]?_0x572f1c[_0x4697('0x13')][_0x4697('0x15')]||null:null,'limit':_0x572f1c[_0x4697('0x13')]?_0x572f1c[_0x4697('0x13')]['limit']||null:null,'include':_0x572f1c[_0x4697('0x13')]?_0x572f1c[_0x4697('0x13')][_0x4697('0x16')]?_[_0x4697('0x17')](_0x572f1c['options'][_0x4697('0x16')],function(_0x297625){return{'model':db[_0x297625['model']],'as':_0x297625['as'],'attributes':_0x297625[_0x4697('0x15')],'include':_0x297625[_0x4697('0x16')]?_['map'](_0x297625[_0x4697('0x16')],function(_0x80a6a2){return{'model':db[_0x80a6a2['model']],'as':_0x80a6a2['as'],'attributes':_0x80a6a2[_0x4697('0x15')],'include':_0x80a6a2[_0x4697('0x16')]?_[_0x4697('0x17')](_0x80a6a2[_0x4697('0x16')],function(_0xf7d6cc){return{'model':db[_0xf7d6cc['model']],'as':_0xf7d6cc['as'],'attributes':_0xf7d6cc[_0x4697('0x15')]};}):[]};}):[]};}):[]:[]})[_0x4697('0x8')](function(_0x1e64f3){logger['info'](_0x4697('0x18'),_0x572f1c);logger[_0x4697('0xb')](_0x4697('0x18'),_0x572f1c,JSON[_0x4697('0x19')](_0x1e64f3));_0x3896d4(_0x1e64f3);})[_0x4697('0xf')](function(_0x463a81){logger[_0x4697('0xc')]('GetServicenowAccount',_0x463a81[_0x4697('0xe')],_0x572f1c);_0x238720(_0x3e3510[_0x4697('0xc')](0x1f4,_0x463a81[_0x4697('0xe')]));});});};exports['ShowServicenowAccount']=function(_0x357987){var _0x5b0343=this;return new Promise(function(_0x2722e7,_0x1d10df){return db[_0x4697('0x10')][_0x4697('0x1a')]({'raw':_0x357987[_0x4697('0x13')]?_0x357987[_0x4697('0x13')][_0x4697('0x12')]===undefined?!![]:![]:!![],'where':_0x357987[_0x4697('0x13')]?_0x357987[_0x4697('0x13')][_0x4697('0x14')]||null:null,'attributes':_0x357987['options']?_0x357987[_0x4697('0x13')]['attributes']||null:null,'include':_0x357987[_0x4697('0x13')]?_0x357987[_0x4697('0x13')][_0x4697('0x16')]?_[_0x4697('0x17')](_0x357987[_0x4697('0x13')][_0x4697('0x16')],function(_0x586814){return{'model':db[_0x586814['model']],'as':_0x586814['as'],'attributes':_0x586814[_0x4697('0x15')],'include':_0x586814[_0x4697('0x16')]?_['map'](_0x586814['include'],function(_0x4956e0){return{'model':db[_0x4956e0[_0x4697('0x1b')]],'as':_0x4956e0['as'],'attributes':_0x4956e0[_0x4697('0x15')],'include':_0x4956e0['include']?_[_0x4697('0x17')](_0x4956e0['include'],function(_0x557ff0){return{'model':db[_0x557ff0[_0x4697('0x1b')]],'as':_0x557ff0['as'],'attributes':_0x557ff0[_0x4697('0x15')]};}):[]};}):[]};}):[]:[]})[_0x4697('0x8')](function(_0x44a8fe){logger['info'](_0x4697('0x1c'),_0x357987);logger['debug'](_0x4697('0x1c'),_0x357987,JSON[_0x4697('0x19')](_0x44a8fe));_0x2722e7(_0x44a8fe);})['catch'](function(_0x3a3baf){logger['error'](_0x4697('0x1c'),_0x3a3baf[_0x4697('0xe')],_0x357987);_0x1d10df(_0x5b0343[_0x4697('0xc')](0x1f4,_0x3a3baf['message']));});});};
\ No newline at end of file
+var _0x52c1=['error','message','catch','options','raw','where','attributes','limit','include','model','map','GetServicenowAccount','find','ShowServicenowAccount','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','debug','code','ServicenowAccount,\x20%s,\x20%s'];(function(_0x49a70c,_0x23f76b){var _0x254a31=function(_0x1a9fc7){while(--_0x1a9fc7){_0x49a70c['push'](_0x49a70c['shift']());}};_0x254a31(++_0x23f76b);}(_0x52c1,0xce));var _0x152c=function(_0x36ddc1,_0x1f0eaa){_0x36ddc1=_0x36ddc1-0x0;var _0x160ec4=_0x52c1[_0x36ddc1];return _0x160ec4;};'use strict';var _=require(_0x152c('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x152c('0x1'));var rs=require(_0x152c('0x2'));var fs=require('fs');var Redis=require(_0x152c('0x3'));var db=require(_0x152c('0x4'))['db'];var utils=require(_0x152c('0x5'));var logger=require(_0x152c('0x6'))(_0x152c('0x7'));var config=require(_0x152c('0x8'));var jayson=require(_0x152c('0x9'));var client=jayson[_0x152c('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x507c6f,_0x11a673,_0x43217b){return new BPromise(function(_0x4f032e,_0x255a67){return client[_0x152c('0xb')](_0x507c6f,_0x43217b)[_0x152c('0xc')](function(_0x395099){logger[_0x152c('0xd')]('ServicenowAccount,\x20%s,\x20%s',_0x11a673,_0x152c('0xe'));logger[_0x152c('0xf')]('ServicenowAccount,\x20%s,\x20%s,\x20%s',_0x11a673,_0x152c('0xe'),JSON['stringify'](_0x395099));if(_0x395099['error']){if(_0x395099['error'][_0x152c('0x10')]===0x1f4){logger['error'](_0x152c('0x11'),_0x11a673,_0x395099[_0x152c('0x12')][_0x152c('0x13')]);return _0x255a67(_0x395099[_0x152c('0x12')][_0x152c('0x13')]);}logger[_0x152c('0x12')]('ServicenowAccount,\x20%s,\x20%s',_0x11a673,_0x395099[_0x152c('0x12')][_0x152c('0x13')]);return _0x4f032e(_0x395099[_0x152c('0x12')]['message']);}else{logger[_0x152c('0xd')](_0x152c('0x11'),_0x11a673,_0x152c('0xe'));_0x4f032e(_0x395099['result']['message']);}})[_0x152c('0x14')](function(_0x1dfbe4){logger[_0x152c('0x12')]('ServicenowAccount,\x20%s,\x20%s',_0x11a673,_0x1dfbe4);_0x255a67(_0x1dfbe4);});});}exports['GetServicenowAccount']=function(_0x2d2216){var _0x2cd0bb=this;return new Promise(function(_0x2a8c33,_0x563be4){return db['ServicenowAccount']['findAll']({'raw':_0x2d2216[_0x152c('0x15')]?_0x2d2216['options'][_0x152c('0x16')]===undefined?!![]:![]:!![],'where':_0x2d2216[_0x152c('0x15')]?_0x2d2216['options'][_0x152c('0x17')]||null:null,'attributes':_0x2d2216['options']?_0x2d2216[_0x152c('0x15')][_0x152c('0x18')]||null:null,'limit':_0x2d2216[_0x152c('0x15')]?_0x2d2216[_0x152c('0x15')][_0x152c('0x19')]||null:null,'include':_0x2d2216[_0x152c('0x15')]?_0x2d2216[_0x152c('0x15')][_0x152c('0x1a')]?_['map'](_0x2d2216[_0x152c('0x15')][_0x152c('0x1a')],function(_0x47406e){return{'model':db[_0x47406e[_0x152c('0x1b')]],'as':_0x47406e['as'],'attributes':_0x47406e[_0x152c('0x18')],'include':_0x47406e[_0x152c('0x1a')]?_[_0x152c('0x1c')](_0x47406e['include'],function(_0x1dac80){return{'model':db[_0x1dac80[_0x152c('0x1b')]],'as':_0x1dac80['as'],'attributes':_0x1dac80[_0x152c('0x18')],'include':_0x1dac80[_0x152c('0x1a')]?_[_0x152c('0x1c')](_0x1dac80[_0x152c('0x1a')],function(_0x59b635){return{'model':db[_0x59b635[_0x152c('0x1b')]],'as':_0x59b635['as'],'attributes':_0x59b635[_0x152c('0x18')]};}):[]};}):[]};}):[]:[]})[_0x152c('0xc')](function(_0x2c6976){logger[_0x152c('0xd')](_0x152c('0x1d'),_0x2d2216);logger[_0x152c('0xf')](_0x152c('0x1d'),_0x2d2216,JSON['stringify'](_0x2c6976));_0x2a8c33(_0x2c6976);})[_0x152c('0x14')](function(_0x2456b6){logger[_0x152c('0x12')](_0x152c('0x1d'),_0x2456b6[_0x152c('0x13')],_0x2d2216);_0x563be4(_0x2cd0bb['error'](0x1f4,_0x2456b6[_0x152c('0x13')]));});});};exports['ShowServicenowAccount']=function(_0x1c8200){var _0x1ef8a7=this;return new Promise(function(_0x3edf83,_0x3cf7f1){return db['ServicenowAccount'][_0x152c('0x1e')]({'raw':_0x1c8200['options']?_0x1c8200[_0x152c('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x1c8200[_0x152c('0x15')]?_0x1c8200[_0x152c('0x15')][_0x152c('0x17')]||null:null,'attributes':_0x1c8200[_0x152c('0x15')]?_0x1c8200[_0x152c('0x15')][_0x152c('0x18')]||null:null,'include':_0x1c8200[_0x152c('0x15')]?_0x1c8200[_0x152c('0x15')][_0x152c('0x1a')]?_[_0x152c('0x1c')](_0x1c8200[_0x152c('0x15')][_0x152c('0x1a')],function(_0x5c2a58){return{'model':db[_0x5c2a58[_0x152c('0x1b')]],'as':_0x5c2a58['as'],'attributes':_0x5c2a58[_0x152c('0x18')],'include':_0x5c2a58['include']?_['map'](_0x5c2a58[_0x152c('0x1a')],function(_0x1f694c){return{'model':db[_0x1f694c[_0x152c('0x1b')]],'as':_0x1f694c['as'],'attributes':_0x1f694c['attributes'],'include':_0x1f694c[_0x152c('0x1a')]?_[_0x152c('0x1c')](_0x1f694c[_0x152c('0x1a')],function(_0x5320e3){return{'model':db[_0x5320e3[_0x152c('0x1b')]],'as':_0x5320e3['as'],'attributes':_0x5320e3[_0x152c('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xa6c0bd){logger[_0x152c('0xd')](_0x152c('0x1f'),_0x1c8200);logger[_0x152c('0xf')](_0x152c('0x1f'),_0x1c8200,JSON['stringify'](_0xa6c0bd));_0x3edf83(_0xa6c0bd);})['catch'](function(_0x20723d){logger[_0x152c('0x12')](_0x152c('0x1f'),_0x20723d[_0x152c('0x13')],_0x1c8200);_0x3cf7f1(_0x1ef8a7['error'](0x1f4,_0x20723d['message']));});});};
\ No newline at end of file