Built motion from commit efa66e19.|2.6.22
[motion2.git] / server / api / chatQueueReport / chatQueueReport.rpc.js
index 5919962..c5295d5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xba4e=['attributes','limit','info','lodash','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','ChatQueueReport,\x20%s,\x20%s','message','result','catch','CreateChatQueueReport','ChatQueueReport','create','body','options','raw','then','UpdateChatQueueReport','update'];(function(_0x3a8c7f,_0x3491aa){var _0x20ca81=function(_0x42642f){while(--_0x42642f){_0x3a8c7f['push'](_0x3a8c7f['shift']());}};_0x20ca81(++_0x3491aa);}(_0xba4e,0x99));var _0xeba4=function(_0x1c5adf,_0x12a026){_0x1c5adf=_0x1c5adf-0x0;var _0x3dd9c2=_0xba4e[_0x1c5adf];return _0x3dd9c2;};'use strict';var _=require(_0xeba4('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xeba4('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xeba4('0x2'))['db'];var utils=require(_0xeba4('0x3'));var logger=require('../../config/logger')(_0xeba4('0x4'));var config=require(_0xeba4('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xeba4('0x6')][_0xeba4('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x288d65,_0x12b8b4,_0x2d88cf){return new BPromise(function(_0x399bb6,_0x43946f){return client[_0xeba4('0x8')](_0x288d65,_0x2d88cf)['then'](function(_0x2a0c07){logger['info']('ChatQueueReport,\x20%s,\x20%s',_0x12b8b4,_0xeba4('0x9'));logger[_0xeba4('0xa')](_0xeba4('0xb'),_0x12b8b4,_0xeba4('0x9'),JSON[_0xeba4('0xc')](_0x2a0c07));if(_0x2a0c07[_0xeba4('0xd')]){if(_0x2a0c07['error']['code']===0x1f4){logger[_0xeba4('0xd')](_0xeba4('0xe'),_0x12b8b4,_0x2a0c07[_0xeba4('0xd')]['message']);return _0x43946f(_0x2a0c07['error']['message']);}logger[_0xeba4('0xd')](_0xeba4('0xe'),_0x12b8b4,_0x2a0c07[_0xeba4('0xd')][_0xeba4('0xf')]);return _0x399bb6(_0x2a0c07[_0xeba4('0xd')][_0xeba4('0xf')]);}else{logger['info'](_0xeba4('0xe'),_0x12b8b4,_0xeba4('0x9'));_0x399bb6(_0x2a0c07[_0xeba4('0x10')][_0xeba4('0xf')]);}})[_0xeba4('0x11')](function(_0x5380e8){logger['error'](_0xeba4('0xe'),_0x12b8b4,_0x5380e8);_0x43946f(_0x5380e8);});});}exports[_0xeba4('0x12')]=function(_0x32611a){var _0xb2147a=this;return new Promise(function(_0x5b85b0,_0x45c759){return db[_0xeba4('0x13')][_0xeba4('0x14')](_0x32611a[_0xeba4('0x15')],{'raw':_0x32611a[_0xeba4('0x16')]?_0x32611a[_0xeba4('0x16')][_0xeba4('0x17')]===undefined?!![]:![]:!![]})[_0xeba4('0x18')](function(_0x8a957e){logger['info'](_0xeba4('0x12'),_0x32611a);logger['debug'](_0xeba4('0x12'),_0x32611a,JSON[_0xeba4('0xc')](_0x8a957e));_0x5b85b0(_0x8a957e);})[_0xeba4('0x11')](function(_0x41e16a){logger['error'](_0xeba4('0x12'),_0x41e16a[_0xeba4('0xf')],_0x32611a);_0x45c759(_0xb2147a[_0xeba4('0xd')](0x1f4,_0x41e16a[_0xeba4('0xf')]));});});};exports[_0xeba4('0x19')]=function(_0x52e2a4){var _0x119fb5=this;return new Promise(function(_0x4151a3,_0x37e80c){return db[_0xeba4('0x13')][_0xeba4('0x1a')](_0x52e2a4[_0xeba4('0x15')],{'raw':_0x52e2a4[_0xeba4('0x16')]?_0x52e2a4['options'][_0xeba4('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x52e2a4[_0xeba4('0x16')]?_0x52e2a4[_0xeba4('0x16')]['where']||null:null,'attributes':_0x52e2a4[_0xeba4('0x16')]?_0x52e2a4[_0xeba4('0x16')][_0xeba4('0x1b')]||null:null,'limit':_0x52e2a4['options']?_0x52e2a4[_0xeba4('0x16')][_0xeba4('0x1c')]||null:null})['then'](function(_0x178399){logger[_0xeba4('0x1d')](_0xeba4('0x19'),_0x52e2a4);logger[_0xeba4('0xa')](_0xeba4('0x19'),_0x52e2a4,JSON[_0xeba4('0xc')](_0x178399));_0x4151a3(_0x178399);})['catch'](function(_0x5765f8){logger[_0xeba4('0xd')]('UpdateChatQueueReport',_0x5765f8[_0xeba4('0xf')],_0x52e2a4);_0x37e80c(_0x119fb5[_0xeba4('0xd')](0x1f4,_0x5765f8[_0xeba4('0xf')]));});});};
\ No newline at end of file
+var _0x6741=['jayson/promise','client','http','request','then','ChatQueueReport,\x20%s,\x20%s','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','CreateChatQueueReport','ChatQueueReport','options','catch','update','body','raw','where','attributes','limit','UpdateChatQueueReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x1c4797,_0x30e7fa){var _0x5db0a5=function(_0x482945){while(--_0x482945){_0x1c4797['push'](_0x1c4797['shift']());}};_0x5db0a5(++_0x30e7fa);}(_0x6741,0x1d6));var _0x1674=function(_0x4dfd90,_0x4bc9ad){_0x4dfd90=_0x4dfd90-0x0;var _0x46e27f=_0x6741[_0x4dfd90];return _0x46e27f;};'use strict';var _=require(_0x1674('0x0'));var util=require(_0x1674('0x1'));var moment=require(_0x1674('0x2'));var BPromise=require(_0x1674('0x3'));var rs=require(_0x1674('0x4'));var fs=require('fs');var Redis=require(_0x1674('0x5'));var db=require(_0x1674('0x6'))['db'];var utils=require(_0x1674('0x7'));var logger=require(_0x1674('0x8'))(_0x1674('0x9'));var config=require(_0x1674('0xa'));var jayson=require(_0x1674('0xb'));var client=jayson[_0x1674('0xc')][_0x1674('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x2ad0f5,_0x119c3f,_0x38a7f6){return new BPromise(function(_0x49b2ad,_0x36a1c7){return client[_0x1674('0xe')](_0x2ad0f5,_0x38a7f6)[_0x1674('0xf')](function(_0x1fa115){logger['info'](_0x1674('0x10'),_0x119c3f,_0x1674('0x11'));logger[_0x1674('0x12')](_0x1674('0x13'),_0x119c3f,_0x1674('0x11'),JSON[_0x1674('0x14')](_0x1fa115));if(_0x1fa115['error']){if(_0x1fa115[_0x1674('0x15')][_0x1674('0x16')]===0x1f4){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x119c3f,_0x1fa115[_0x1674('0x15')][_0x1674('0x17')]);return _0x36a1c7(_0x1fa115[_0x1674('0x15')][_0x1674('0x17')]);}logger[_0x1674('0x15')]('ChatQueueReport,\x20%s,\x20%s',_0x119c3f,_0x1fa115[_0x1674('0x15')][_0x1674('0x17')]);return _0x49b2ad(_0x1fa115[_0x1674('0x15')]['message']);}else{logger[_0x1674('0x18')](_0x1674('0x10'),_0x119c3f,_0x1674('0x11'));_0x49b2ad(_0x1fa115[_0x1674('0x19')]['message']);}})['catch'](function(_0x22d34e){logger[_0x1674('0x15')](_0x1674('0x10'),_0x119c3f,_0x22d34e);_0x36a1c7(_0x22d34e);});});}exports[_0x1674('0x1a')]=function(_0x2c7415){var _0x5d391f=this;return new Promise(function(_0x27a090,_0x2eab47){return db[_0x1674('0x1b')]['create'](_0x2c7415['body'],{'raw':_0x2c7415[_0x1674('0x1c')]?_0x2c7415[_0x1674('0x1c')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x2667ac){logger[_0x1674('0x18')]('CreateChatQueueReport',_0x2c7415);logger[_0x1674('0x12')](_0x1674('0x1a'),_0x2c7415,JSON[_0x1674('0x14')](_0x2667ac));_0x27a090(_0x2667ac);})[_0x1674('0x1d')](function(_0xc81b77){logger['error'](_0x1674('0x1a'),_0xc81b77['message'],_0x2c7415);_0x2eab47(_0x5d391f[_0x1674('0x15')](0x1f4,_0xc81b77[_0x1674('0x17')]));});});};exports['UpdateChatQueueReport']=function(_0x7d4246){var _0x25f4ce=this;return new Promise(function(_0x1f3d82,_0x1a2e48){return db['ChatQueueReport'][_0x1674('0x1e')](_0x7d4246[_0x1674('0x1f')],{'raw':_0x7d4246[_0x1674('0x1c')]?_0x7d4246[_0x1674('0x1c')][_0x1674('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x7d4246['options']?_0x7d4246['options'][_0x1674('0x21')]||null:null,'attributes':_0x7d4246[_0x1674('0x1c')]?_0x7d4246[_0x1674('0x1c')][_0x1674('0x22')]||null:null,'limit':_0x7d4246[_0x1674('0x1c')]?_0x7d4246[_0x1674('0x1c')][_0x1674('0x23')]||null:null})[_0x1674('0xf')](function(_0x1a476b){logger['info'](_0x1674('0x24'),_0x7d4246);logger[_0x1674('0x12')]('UpdateChatQueueReport',_0x7d4246,JSON[_0x1674('0x14')](_0x1a476b));_0x1f3d82(_0x1a476b);})[_0x1674('0x1d')](function(_0xb9047e){logger[_0x1674('0x15')](_0x1674('0x24'),_0xb9047e[_0x1674('0x17')],_0x7d4246);_0x1a2e48(_0x25f4ce[_0x1674('0x15')](0x1f4,_0xb9047e[_0x1674('0x17')]));});});};
\ No newline at end of file