Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / api / chatQueueReport / chatQueueReport.rpc.js
index 86d8454..20a6a6a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0bf1=['../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','ChatQueueReport,\x20%s,\x20%s','ChatQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','create','body','options','raw','CreateChatQueueReport','UpdateChatQueueReport','update','debug','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x13b8f3,_0x442821){var _0x1a6d06=function(_0x5126f2){while(--_0x5126f2){_0x13b8f3['push'](_0x13b8f3['shift']());}};_0x1a6d06(++_0x442821);}(_0x0bf1,0xb4));var _0x10bf=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x0bf1[_0x397e5f];return _0x5302b8;};'use strict';var _=require(_0x10bf('0x0'));var util=require(_0x10bf('0x1'));var moment=require(_0x10bf('0x2'));var BPromise=require(_0x10bf('0x3'));var rs=require(_0x10bf('0x4'));var fs=require('fs');var Redis=require(_0x10bf('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x10bf('0x6'));var logger=require(_0x10bf('0x7'))(_0x10bf('0x8'));var config=require(_0x10bf('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x10bf('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x16f15e,_0x288220,_0xb131da){return new BPromise(function(_0x42fe70,_0x4bde7e){return client[_0x10bf('0xb')](_0x16f15e,_0xb131da)[_0x10bf('0xc')](function(_0x3819ac){logger[_0x10bf('0xd')](_0x10bf('0xe'),_0x288220,'request\x20sent');logger['debug'](_0x10bf('0xf'),_0x288220,_0x10bf('0x10'),JSON[_0x10bf('0x11')](_0x3819ac));if(_0x3819ac[_0x10bf('0x12')]){if(_0x3819ac[_0x10bf('0x12')][_0x10bf('0x13')]===0x1f4){logger[_0x10bf('0x12')](_0x10bf('0xe'),_0x288220,_0x3819ac[_0x10bf('0x12')]['message']);return _0x4bde7e(_0x3819ac[_0x10bf('0x12')]['message']);}logger[_0x10bf('0x12')](_0x10bf('0xe'),_0x288220,_0x3819ac[_0x10bf('0x12')]['message']);return _0x42fe70(_0x3819ac['error'][_0x10bf('0x14')]);}else{logger['info'](_0x10bf('0xe'),_0x288220,'request\x20sent');_0x42fe70(_0x3819ac[_0x10bf('0x15')][_0x10bf('0x14')]);}})[_0x10bf('0x16')](function(_0x38bb51){logger['error'](_0x10bf('0xe'),_0x288220,_0x38bb51);_0x4bde7e(_0x38bb51);});});}exports['CreateChatQueueReport']=function(_0x2402f3){var _0x4f4093=this;return new Promise(function(_0xe26256,_0x4118a5){return db['ChatQueueReport'][_0x10bf('0x17')](_0x2402f3[_0x10bf('0x18')],{'raw':_0x2402f3[_0x10bf('0x19')]?_0x2402f3[_0x10bf('0x19')][_0x10bf('0x1a')]===undefined?!![]:![]:!![]})[_0x10bf('0xc')](function(_0xc2a8fb){logger[_0x10bf('0xd')](_0x10bf('0x1b'),_0x2402f3);logger['debug'](_0x10bf('0x1b'),_0x2402f3,JSON['stringify'](_0xc2a8fb));_0xe26256(_0xc2a8fb);})['catch'](function(_0x306db8){logger[_0x10bf('0x12')](_0x10bf('0x1b'),_0x306db8[_0x10bf('0x14')],_0x2402f3);_0x4118a5(_0x4f4093['error'](0x1f4,_0x306db8[_0x10bf('0x14')]));});});};exports[_0x10bf('0x1c')]=function(_0x43c14d){var _0x199ad0=this;return new Promise(function(_0x5349de,_0x39e853){return db['ChatQueueReport'][_0x10bf('0x1d')](_0x43c14d['body'],{'raw':_0x43c14d[_0x10bf('0x19')]?_0x43c14d[_0x10bf('0x19')][_0x10bf('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x43c14d[_0x10bf('0x19')]?_0x43c14d[_0x10bf('0x19')]['where']||null:null,'attributes':_0x43c14d[_0x10bf('0x19')]?_0x43c14d[_0x10bf('0x19')]['attributes']||null:null,'limit':_0x43c14d[_0x10bf('0x19')]?_0x43c14d['options']['limit']||null:null})[_0x10bf('0xc')](function(_0x2221bb){logger[_0x10bf('0xd')](_0x10bf('0x1c'),_0x43c14d);logger[_0x10bf('0x1e')](_0x10bf('0x1c'),_0x43c14d,JSON[_0x10bf('0x11')](_0x2221bb));_0x5349de(_0x2221bb);})['catch'](function(_0x3bffcd){logger[_0x10bf('0x12')](_0x10bf('0x1c'),_0x3bffcd[_0x10bf('0x14')],_0x43c14d);_0x39e853(_0x199ad0[_0x10bf('0x12')](0x1f4,_0x3bffcd['message']));});});};
\ No newline at end of file
+var _0x1776=['CreateChatQueueReport','ChatQueueReport','options','UpdateChatQueueReport','body','raw','where','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch'];(function(_0x28f866,_0x478f52){var _0x36b21f=function(_0x5727e6){while(--_0x5727e6){_0x28f866['push'](_0x28f866['shift']());}};_0x36b21f(++_0x478f52);}(_0x1776,0xff));var _0x6177=function(_0x37e91f,_0x3e025c){_0x37e91f=_0x37e91f-0x0;var _0x1babb9=_0x1776[_0x37e91f];return _0x1babb9;};'use strict';var _=require(_0x6177('0x0'));var util=require(_0x6177('0x1'));var moment=require(_0x6177('0x2'));var BPromise=require(_0x6177('0x3'));var rs=require(_0x6177('0x4'));var fs=require('fs');var Redis=require(_0x6177('0x5'));var db=require(_0x6177('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x6177('0x7'))(_0x6177('0x8'));var config=require('../../config/environment');var jayson=require(_0x6177('0x9'));var client=jayson[_0x6177('0xa')][_0x6177('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x24be45,_0xc1e3db,_0x365ee9){return new BPromise(function(_0x249081,_0x48a810){return client[_0x6177('0xc')](_0x24be45,_0x365ee9)[_0x6177('0xd')](function(_0x2cf916){logger[_0x6177('0xe')](_0x6177('0xf'),_0xc1e3db,_0x6177('0x10'));logger[_0x6177('0x11')]('ChatQueueReport,\x20%s,\x20%s,\x20%s',_0xc1e3db,_0x6177('0x10'),JSON[_0x6177('0x12')](_0x2cf916));if(_0x2cf916[_0x6177('0x13')]){if(_0x2cf916['error'][_0x6177('0x14')]===0x1f4){logger[_0x6177('0x13')](_0x6177('0xf'),_0xc1e3db,_0x2cf916[_0x6177('0x13')][_0x6177('0x15')]);return _0x48a810(_0x2cf916[_0x6177('0x13')]['message']);}logger['error'](_0x6177('0xf'),_0xc1e3db,_0x2cf916['error'][_0x6177('0x15')]);return _0x249081(_0x2cf916[_0x6177('0x13')][_0x6177('0x15')]);}else{logger['info']('ChatQueueReport,\x20%s,\x20%s',_0xc1e3db,'request\x20sent');_0x249081(_0x2cf916[_0x6177('0x16')][_0x6177('0x15')]);}})[_0x6177('0x17')](function(_0x41e978){logger['error'](_0x6177('0xf'),_0xc1e3db,_0x41e978);_0x48a810(_0x41e978);});});}exports[_0x6177('0x18')]=function(_0x45d799){var _0x5a976f=this;return new Promise(function(_0x3f415c,_0x41f86d){return db[_0x6177('0x19')]['create'](_0x45d799['body'],{'raw':_0x45d799[_0x6177('0x1a')]?_0x45d799[_0x6177('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0x6177('0xd')](function(_0x38f5f2){logger[_0x6177('0xe')](_0x6177('0x18'),_0x45d799);logger['debug']('CreateChatQueueReport',_0x45d799,JSON['stringify'](_0x38f5f2));_0x3f415c(_0x38f5f2);})[_0x6177('0x17')](function(_0x53e12a){logger[_0x6177('0x13')](_0x6177('0x18'),_0x53e12a['message'],_0x45d799);_0x41f86d(_0x5a976f[_0x6177('0x13')](0x1f4,_0x53e12a[_0x6177('0x15')]));});});};exports[_0x6177('0x1b')]=function(_0x12fb09){var _0x29b327=this;return new Promise(function(_0x7c1d30,_0x3867e7){return db[_0x6177('0x19')]['update'](_0x12fb09[_0x6177('0x1c')],{'raw':_0x12fb09[_0x6177('0x1a')]?_0x12fb09[_0x6177('0x1a')][_0x6177('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x12fb09[_0x6177('0x1a')]?_0x12fb09[_0x6177('0x1a')][_0x6177('0x1e')]||null:null,'attributes':_0x12fb09[_0x6177('0x1a')]?_0x12fb09[_0x6177('0x1a')]['attributes']||null:null,'limit':_0x12fb09[_0x6177('0x1a')]?_0x12fb09['options']['limit']||null:null})['then'](function(_0x2291a4){logger[_0x6177('0xe')](_0x6177('0x1b'),_0x12fb09);logger[_0x6177('0x11')](_0x6177('0x1b'),_0x12fb09,JSON[_0x6177('0x12')](_0x2291a4));_0x7c1d30(_0x2291a4);})[_0x6177('0x17')](function(_0xce6ae8){logger['error']('UpdateChatQueueReport',_0xce6ae8[_0x6177('0x15')],_0x12fb09);_0x3867e7(_0x29b327[_0x6177('0x13')](0x1f4,_0xce6ae8[_0x6177('0x15')]));});});};
\ No newline at end of file