Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / chatQueueReport / chatQueueReport.rpc.js
index d13119a..046b59d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb19e=['limit','lodash','util','moment','bluebird','ioredis','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','CreateChatQueueReport','ChatQueueReport','create','body','options','debug','UpdateChatQueueReport','update','raw','where','attributes'];(function(_0x507962,_0x2e50db){var _0x3d4660=function(_0x110332){while(--_0x110332){_0x507962['push'](_0x507962['shift']());}};_0x3d4660(++_0x2e50db);}(_0xb19e,0x187));var _0xeb19=function(_0x29d2d2,_0x3344){_0x29d2d2=_0x29d2d2-0x0;var _0x3f6476=_0xb19e[_0x29d2d2];return _0x3f6476;};'use strict';var _=require(_0xeb19('0x0'));var util=require(_0xeb19('0x1'));var moment=require(_0xeb19('0x2'));var BPromise=require(_0xeb19('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xeb19('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xeb19('0x5'))('rpc');var config=require(_0xeb19('0x6'));var jayson=require(_0xeb19('0x7'));var client=jayson[_0xeb19('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x508507,_0x3a65bb,_0x5ec428){return new BPromise(function(_0x2ea12c,_0x5bd778){return client[_0xeb19('0x9')](_0x508507,_0x5ec428)[_0xeb19('0xa')](function(_0x41efa1){logger[_0xeb19('0xb')](_0xeb19('0xc'),_0x3a65bb,'request\x20sent');logger['debug']('ChatQueueReport,\x20%s,\x20%s,\x20%s',_0x3a65bb,_0xeb19('0xd'),JSON[_0xeb19('0xe')](_0x41efa1));if(_0x41efa1[_0xeb19('0xf')]){if(_0x41efa1[_0xeb19('0xf')]['code']===0x1f4){logger[_0xeb19('0xf')](_0xeb19('0xc'),_0x3a65bb,_0x41efa1[_0xeb19('0xf')][_0xeb19('0x10')]);return _0x5bd778(_0x41efa1[_0xeb19('0xf')][_0xeb19('0x10')]);}logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x3a65bb,_0x41efa1[_0xeb19('0xf')][_0xeb19('0x10')]);return _0x2ea12c(_0x41efa1[_0xeb19('0xf')][_0xeb19('0x10')]);}else{logger[_0xeb19('0xb')]('ChatQueueReport,\x20%s,\x20%s',_0x3a65bb,_0xeb19('0xd'));_0x2ea12c(_0x41efa1['result'][_0xeb19('0x10')]);}})[_0xeb19('0x11')](function(_0x57a9bb){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x3a65bb,_0x57a9bb);_0x5bd778(_0x57a9bb);});});}exports[_0xeb19('0x12')]=function(_0x1eb305){var _0x2ab088=this;return new Promise(function(_0x27ab78,_0x16f703){return db[_0xeb19('0x13')][_0xeb19('0x14')](_0x1eb305[_0xeb19('0x15')],{'raw':_0x1eb305[_0xeb19('0x16')]?_0x1eb305[_0xeb19('0x16')]['raw']===undefined?!![]:![]:!![]})[_0xeb19('0xa')](function(_0x1290b3){logger[_0xeb19('0xb')](_0xeb19('0x12'),_0x1eb305);logger[_0xeb19('0x17')](_0xeb19('0x12'),_0x1eb305,JSON[_0xeb19('0xe')](_0x1290b3));_0x27ab78(_0x1290b3);})[_0xeb19('0x11')](function(_0x170010){logger[_0xeb19('0xf')](_0xeb19('0x12'),_0x170010['message'],_0x1eb305);_0x16f703(_0x2ab088[_0xeb19('0xf')](0x1f4,_0x170010[_0xeb19('0x10')]));});});};exports[_0xeb19('0x18')]=function(_0x8ea878){var _0x4a0d40=this;return new Promise(function(_0x239456,_0x269438){return db['ChatQueueReport'][_0xeb19('0x19')](_0x8ea878[_0xeb19('0x15')],{'raw':_0x8ea878[_0xeb19('0x16')]?_0x8ea878['options'][_0xeb19('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x8ea878['options']?_0x8ea878['options'][_0xeb19('0x1b')]||null:null,'attributes':_0x8ea878['options']?_0x8ea878[_0xeb19('0x16')][_0xeb19('0x1c')]||null:null,'limit':_0x8ea878[_0xeb19('0x16')]?_0x8ea878[_0xeb19('0x16')][_0xeb19('0x1d')]||null:null})[_0xeb19('0xa')](function(_0x33f114){logger['info'](_0xeb19('0x18'),_0x8ea878);logger['debug'](_0xeb19('0x18'),_0x8ea878,JSON[_0xeb19('0xe')](_0x33f114));_0x239456(_0x33f114);})[_0xeb19('0x11')](function(_0x2dce16){logger[_0xeb19('0xf')]('UpdateChatQueueReport',_0x2dce16[_0xeb19('0x10')],_0x8ea878);_0x269438(_0x4a0d40[_0xeb19('0xf')](0x1f4,_0x2dce16[_0xeb19('0x10')]));});});};
\ No newline at end of file
+var _0xafdc=['ChatQueueReport,\x20%s,\x20%s','message','create','options','raw','CreateChatQueueReport','stringify','catch','UpdateChatQueueReport','ChatQueueReport','update','body','where','attributes','limit','lodash','util','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','error','code'];(function(_0x2cf2e9,_0xd58ea1){var _0xd3670d=function(_0x272868){while(--_0x272868){_0x2cf2e9['push'](_0x2cf2e9['shift']());}};_0xd3670d(++_0xd58ea1);}(_0xafdc,0x1af));var _0xcafd=function(_0x2ac608,_0x4ffc74){_0x2ac608=_0x2ac608-0x0;var _0x1e9151=_0xafdc[_0x2ac608];return _0x1e9151;};'use strict';var _=require(_0xcafd('0x0'));var util=require(_0xcafd('0x1'));var moment=require('moment');var BPromise=require(_0xcafd('0x2'));var rs=require(_0xcafd('0x3'));var fs=require('fs');var Redis=require(_0xcafd('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xcafd('0x5'));var logger=require('../../config/logger')(_0xcafd('0x6'));var config=require(_0xcafd('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xcafd('0x8')][_0xcafd('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x33710e,_0x26ebe6,_0x1568ca){return new BPromise(function(_0x186ce0,_0x175f56){return client[_0xcafd('0xa')](_0x33710e,_0x1568ca)[_0xcafd('0xb')](function(_0x37d151){logger[_0xcafd('0xc')]('ChatQueueReport,\x20%s,\x20%s',_0x26ebe6,_0xcafd('0xd'));logger[_0xcafd('0xe')]('ChatQueueReport,\x20%s,\x20%s,\x20%s',_0x26ebe6,_0xcafd('0xd'),JSON['stringify'](_0x37d151));if(_0x37d151[_0xcafd('0xf')]){if(_0x37d151[_0xcafd('0xf')][_0xcafd('0x10')]===0x1f4){logger[_0xcafd('0xf')](_0xcafd('0x11'),_0x26ebe6,_0x37d151['error'][_0xcafd('0x12')]);return _0x175f56(_0x37d151['error'][_0xcafd('0x12')]);}logger[_0xcafd('0xf')]('ChatQueueReport,\x20%s,\x20%s',_0x26ebe6,_0x37d151['error'][_0xcafd('0x12')]);return _0x186ce0(_0x37d151[_0xcafd('0xf')][_0xcafd('0x12')]);}else{logger[_0xcafd('0xc')]('ChatQueueReport,\x20%s,\x20%s',_0x26ebe6,'request\x20sent');_0x186ce0(_0x37d151['result'][_0xcafd('0x12')]);}})['catch'](function(_0x382551){logger[_0xcafd('0xf')](_0xcafd('0x11'),_0x26ebe6,_0x382551);_0x175f56(_0x382551);});});}exports['CreateChatQueueReport']=function(_0xe67922){var _0x5040af=this;return new Promise(function(_0x47f55a,_0x1abc43){return db['ChatQueueReport'][_0xcafd('0x13')](_0xe67922['body'],{'raw':_0xe67922[_0xcafd('0x14')]?_0xe67922[_0xcafd('0x14')][_0xcafd('0x15')]===undefined?!![]:![]:!![]})[_0xcafd('0xb')](function(_0xc28bcc){logger['info'](_0xcafd('0x16'),_0xe67922);logger[_0xcafd('0xe')](_0xcafd('0x16'),_0xe67922,JSON[_0xcafd('0x17')](_0xc28bcc));_0x47f55a(_0xc28bcc);})[_0xcafd('0x18')](function(_0x146f13){logger['error'](_0xcafd('0x16'),_0x146f13[_0xcafd('0x12')],_0xe67922);_0x1abc43(_0x5040af[_0xcafd('0xf')](0x1f4,_0x146f13[_0xcafd('0x12')]));});});};exports[_0xcafd('0x19')]=function(_0x59bb96){var _0x314b01=this;return new Promise(function(_0x343b35,_0x3ba3b1){return db[_0xcafd('0x1a')][_0xcafd('0x1b')](_0x59bb96[_0xcafd('0x1c')],{'raw':_0x59bb96[_0xcafd('0x14')]?_0x59bb96[_0xcafd('0x14')][_0xcafd('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59bb96[_0xcafd('0x14')]?_0x59bb96[_0xcafd('0x14')][_0xcafd('0x1d')]||null:null,'attributes':_0x59bb96[_0xcafd('0x14')]?_0x59bb96['options'][_0xcafd('0x1e')]||null:null,'limit':_0x59bb96['options']?_0x59bb96['options'][_0xcafd('0x1f')]||null:null})[_0xcafd('0xb')](function(_0x5b5cf3){logger[_0xcafd('0xc')](_0xcafd('0x19'),_0x59bb96);logger['debug']('UpdateChatQueueReport',_0x59bb96,JSON[_0xcafd('0x17')](_0x5b5cf3));_0x343b35(_0x5b5cf3);})['catch'](function(_0x5be84a){logger['error'](_0xcafd('0x19'),_0x5be84a[_0xcafd('0x12')],_0x59bb96);_0x3ba3b1(_0x314b01[_0xcafd('0xf')](0x1f4,_0x5be84a[_0xcafd('0x12')]));});});};
\ No newline at end of file