Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / intServicenowAccount / intServicenowAccount.rpc.js
index 246084c..1d17aa9 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 _0x1c5d=['error','ServicenowAccount,\x20%s,\x20%s','message','result','GetServicenowAccount','options','raw','where','attributes','limit','include','map','model','then','catch','ShowServicenowAccount','find','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','info','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code'];(function(_0x5a6c35,_0x115202){var _0x2ad02d=function(_0x424481){while(--_0x424481){_0x5a6c35['push'](_0x5a6c35['shift']());}};_0x2ad02d(++_0x115202);}(_0x1c5d,0xd7));var _0xd1c5=function(_0x4b9f8c,_0x29ee48){_0x4b9f8c=_0x4b9f8c-0x0;var _0x3fb25d=_0x1c5d[_0x4b9f8c];return _0x3fb25d;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xd1c5('0x0'));var BPromise=require(_0xd1c5('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd1c5('0x2'));var db=require(_0xd1c5('0x3'))['db'];var utils=require(_0xd1c5('0x4'));var logger=require(_0xd1c5('0x5'))(_0xd1c5('0x6'));var config=require('../../config/environment');var jayson=require(_0xd1c5('0x7'));var client=jayson[_0xd1c5('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x40d5e8,_0x719482,_0x33f32a){return new BPromise(function(_0x47a2c6,_0x25db80){return client[_0xd1c5('0x9')](_0x40d5e8,_0x33f32a)['then'](function(_0xf848ee){logger[_0xd1c5('0xa')]('ServicenowAccount,\x20%s,\x20%s',_0x719482,'request\x20sent');logger[_0xd1c5('0xb')](_0xd1c5('0xc'),_0x719482,_0xd1c5('0xd'),JSON[_0xd1c5('0xe')](_0xf848ee));if(_0xf848ee['error']){if(_0xf848ee['error'][_0xd1c5('0xf')]===0x1f4){logger[_0xd1c5('0x10')](_0xd1c5('0x11'),_0x719482,_0xf848ee[_0xd1c5('0x10')][_0xd1c5('0x12')]);return _0x25db80(_0xf848ee[_0xd1c5('0x10')][_0xd1c5('0x12')]);}logger[_0xd1c5('0x10')]('ServicenowAccount,\x20%s,\x20%s',_0x719482,_0xf848ee[_0xd1c5('0x10')][_0xd1c5('0x12')]);return _0x47a2c6(_0xf848ee['error'][_0xd1c5('0x12')]);}else{logger[_0xd1c5('0xa')](_0xd1c5('0x11'),_0x719482,_0xd1c5('0xd'));_0x47a2c6(_0xf848ee[_0xd1c5('0x13')]['message']);}})['catch'](function(_0x1badc2){logger['error'](_0xd1c5('0x11'),_0x719482,_0x1badc2);_0x25db80(_0x1badc2);});});}exports[_0xd1c5('0x14')]=function(_0x2273d0){var _0x26610a=this;return new Promise(function(_0x49048c,_0x250f86){return db['ServicenowAccount']['findAll']({'raw':_0x2273d0['options']?_0x2273d0[_0xd1c5('0x15')][_0xd1c5('0x16')]===undefined?!![]:![]:!![],'where':_0x2273d0[_0xd1c5('0x15')]?_0x2273d0[_0xd1c5('0x15')][_0xd1c5('0x17')]||null:null,'attributes':_0x2273d0[_0xd1c5('0x15')]?_0x2273d0[_0xd1c5('0x15')][_0xd1c5('0x18')]||null:null,'limit':_0x2273d0[_0xd1c5('0x15')]?_0x2273d0[_0xd1c5('0x15')][_0xd1c5('0x19')]||null:null,'include':_0x2273d0[_0xd1c5('0x15')]?_0x2273d0[_0xd1c5('0x15')]['include']?_['map'](_0x2273d0['options'][_0xd1c5('0x1a')],function(_0x2755c4){return{'model':db[_0x2755c4['model']],'as':_0x2755c4['as'],'attributes':_0x2755c4['attributes'],'include':_0x2755c4[_0xd1c5('0x1a')]?_[_0xd1c5('0x1b')](_0x2755c4[_0xd1c5('0x1a')],function(_0x447896){return{'model':db[_0x447896[_0xd1c5('0x1c')]],'as':_0x447896['as'],'attributes':_0x447896[_0xd1c5('0x18')],'include':_0x447896[_0xd1c5('0x1a')]?_[_0xd1c5('0x1b')](_0x447896[_0xd1c5('0x1a')],function(_0x2b86c3){return{'model':db[_0x2b86c3[_0xd1c5('0x1c')]],'as':_0x2b86c3['as'],'attributes':_0x2b86c3['attributes']};}):[]};}):[]};}):[]:[]})[_0xd1c5('0x1d')](function(_0x3b2f81){logger[_0xd1c5('0xa')]('GetServicenowAccount',_0x2273d0);logger[_0xd1c5('0xb')](_0xd1c5('0x14'),_0x2273d0,JSON['stringify'](_0x3b2f81));_0x49048c(_0x3b2f81);})[_0xd1c5('0x1e')](function(_0x5eadf7){logger[_0xd1c5('0x10')]('GetServicenowAccount',_0x5eadf7[_0xd1c5('0x12')],_0x2273d0);_0x250f86(_0x26610a['error'](0x1f4,_0x5eadf7['message']));});});};exports[_0xd1c5('0x1f')]=function(_0xd1473b){var _0x5697cb=this;return new Promise(function(_0x123bad,_0x25a70c){return db['ServicenowAccount'][_0xd1c5('0x20')]({'raw':_0xd1473b[_0xd1c5('0x15')]?_0xd1473b[_0xd1c5('0x15')][_0xd1c5('0x16')]===undefined?!![]:![]:!![],'where':_0xd1473b[_0xd1c5('0x15')]?_0xd1473b['options'][_0xd1c5('0x17')]||null:null,'attributes':_0xd1473b['options']?_0xd1473b[_0xd1c5('0x15')][_0xd1c5('0x18')]||null:null,'include':_0xd1473b[_0xd1c5('0x15')]?_0xd1473b[_0xd1c5('0x15')]['include']?_['map'](_0xd1473b[_0xd1c5('0x15')][_0xd1c5('0x1a')],function(_0x2ddb57){return{'model':db[_0x2ddb57[_0xd1c5('0x1c')]],'as':_0x2ddb57['as'],'attributes':_0x2ddb57[_0xd1c5('0x18')],'include':_0x2ddb57[_0xd1c5('0x1a')]?_[_0xd1c5('0x1b')](_0x2ddb57[_0xd1c5('0x1a')],function(_0x646604){return{'model':db[_0x646604[_0xd1c5('0x1c')]],'as':_0x646604['as'],'attributes':_0x646604[_0xd1c5('0x18')],'include':_0x646604['include']?_[_0xd1c5('0x1b')](_0x646604['include'],function(_0x5880be){return{'model':db[_0x5880be['model']],'as':_0x5880be['as'],'attributes':_0x5880be['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x4d0824){logger[_0xd1c5('0xa')](_0xd1c5('0x1f'),_0xd1473b);logger[_0xd1c5('0xb')](_0xd1c5('0x1f'),_0xd1473b,JSON[_0xd1c5('0xe')](_0x4d0824));_0x123bad(_0x4d0824);})[_0xd1c5('0x1e')](function(_0x23afd2){logger[_0xd1c5('0x10')]('ShowServicenowAccount',_0x23afd2['message'],_0xd1473b);_0x25a70c(_0x5697cb[_0xd1c5('0x10')](0x1f4,_0x23afd2[_0xd1c5('0x12')]));});});};
\ No newline at end of file