Built motion from commit 5b761a7b.|2.5.36
[motion2.git] / server / api / chatQueueReport / chatQueueReport.rpc.js
index 32847d1..c4a0cff 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x503b=['update','where','limit','UpdateChatQueueReport','stringify','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','request','info','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s','error','ChatQueueReport,\x20%s,\x20%s','message','result','catch','CreateChatQueueReport','ChatQueueReport','create','body','options','raw','then','debug'];(function(_0x444d83,_0x54c255){var _0x20574b=function(_0x44a2dc){while(--_0x44a2dc){_0x444d83['push'](_0x444d83['shift']());}};_0x20574b(++_0x54c255);}(_0x503b,0xe5));var _0xb503=function(_0x23d056,_0x5a38e1){_0x23d056=_0x23d056-0x0;var _0x5c3395=_0x503b[_0x23d056];return _0x5c3395;};'use strict';var _=require(_0xb503('0x0'));var util=require(_0xb503('0x1'));var moment=require(_0xb503('0x2'));var BPromise=require(_0xb503('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb503('0x4'));var db=require(_0xb503('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xb503('0x6'))('rpc');var config=require(_0xb503('0x7'));var jayson=require(_0xb503('0x8'));var client=jayson['client'][_0xb503('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x930060,_0xe9f9d2,_0x2fcce7){return new BPromise(function(_0x2ba461,_0x32cf7b){return client[_0xb503('0xa')](_0x930060,_0x2fcce7)['then'](function(_0x1338dc){logger[_0xb503('0xb')]('ChatQueueReport,\x20%s,\x20%s',_0xe9f9d2,_0xb503('0xc'));logger['debug'](_0xb503('0xd'),_0xe9f9d2,_0xb503('0xc'),JSON['stringify'](_0x1338dc));if(_0x1338dc['error']){if(_0x1338dc[_0xb503('0xe')]['code']===0x1f4){logger['error'](_0xb503('0xf'),_0xe9f9d2,_0x1338dc[_0xb503('0xe')][_0xb503('0x10')]);return _0x32cf7b(_0x1338dc['error'][_0xb503('0x10')]);}logger[_0xb503('0xe')](_0xb503('0xf'),_0xe9f9d2,_0x1338dc[_0xb503('0xe')][_0xb503('0x10')]);return _0x2ba461(_0x1338dc['error'][_0xb503('0x10')]);}else{logger[_0xb503('0xb')](_0xb503('0xf'),_0xe9f9d2,_0xb503('0xc'));_0x2ba461(_0x1338dc[_0xb503('0x11')][_0xb503('0x10')]);}})[_0xb503('0x12')](function(_0x32c57c){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0xe9f9d2,_0x32c57c);_0x32cf7b(_0x32c57c);});});}exports[_0xb503('0x13')]=function(_0x25293f){var _0x19e798=this;return new Promise(function(_0x3c2dca,_0x36f006){return db[_0xb503('0x14')][_0xb503('0x15')](_0x25293f[_0xb503('0x16')],{'raw':_0x25293f[_0xb503('0x17')]?_0x25293f[_0xb503('0x17')][_0xb503('0x18')]===undefined?!![]:![]:!![]})[_0xb503('0x19')](function(_0x5d5aab){logger[_0xb503('0xb')](_0xb503('0x13'),_0x25293f);logger[_0xb503('0x1a')](_0xb503('0x13'),_0x25293f,JSON['stringify'](_0x5d5aab));_0x3c2dca(_0x5d5aab);})['catch'](function(_0x53cbbe){logger[_0xb503('0xe')]('CreateChatQueueReport',_0x53cbbe['message'],_0x25293f);_0x36f006(_0x19e798[_0xb503('0xe')](0x1f4,_0x53cbbe[_0xb503('0x10')]));});});};exports['UpdateChatQueueReport']=function(_0x2bf559){var _0x5c3f77=this;return new Promise(function(_0x2cc978,_0x594531){return db[_0xb503('0x14')][_0xb503('0x1b')](_0x2bf559[_0xb503('0x16')],{'raw':_0x2bf559[_0xb503('0x17')]?_0x2bf559[_0xb503('0x17')][_0xb503('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2bf559['options']?_0x2bf559[_0xb503('0x17')][_0xb503('0x1c')]||null:null,'attributes':_0x2bf559[_0xb503('0x17')]?_0x2bf559[_0xb503('0x17')]['attributes']||null:null,'limit':_0x2bf559[_0xb503('0x17')]?_0x2bf559['options'][_0xb503('0x1d')]||null:null})[_0xb503('0x19')](function(_0x3a839e){logger['info']('UpdateChatQueueReport',_0x2bf559);logger['debug'](_0xb503('0x1e'),_0x2bf559,JSON[_0xb503('0x1f')](_0x3a839e));_0x2cc978(_0x3a839e);})[_0xb503('0x12')](function(_0x5256b7){logger['error'](_0xb503('0x1e'),_0x5256b7[_0xb503('0x10')],_0x2bf559);_0x594531(_0x5c3f77['error'](0x1f4,_0x5256b7[_0xb503('0x10')]));});});};
\ No newline at end of file
+var _0x20a7=['where','attributes','limit','UpdateChatQueueReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','ChatQueueReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','CreateChatQueueReport','ChatQueueReport','body','options','raw','debug','catch'];(function(_0x5466ab,_0x227b13){var _0x40751a=function(_0x477f9e){while(--_0x477f9e){_0x5466ab['push'](_0x5466ab['shift']());}};_0x40751a(++_0x227b13);}(_0x20a7,0x185));var _0x720a=function(_0xb2ca6e,_0x34795e){_0xb2ca6e=_0xb2ca6e-0x0;var _0x5b6fcb=_0x20a7[_0xb2ca6e];return _0x5b6fcb;};'use strict';var _=require(_0x720a('0x0'));var util=require(_0x720a('0x1'));var moment=require(_0x720a('0x2'));var BPromise=require(_0x720a('0x3'));var rs=require(_0x720a('0x4'));var fs=require('fs');var Redis=require(_0x720a('0x5'));var db=require(_0x720a('0x6'))['db'];var utils=require(_0x720a('0x7'));var logger=require(_0x720a('0x8'))(_0x720a('0x9'));var config=require(_0x720a('0xa'));var jayson=require(_0x720a('0xb'));var client=jayson[_0x720a('0xc')][_0x720a('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x3a65be,_0x4ab5f9,_0x37f2a1){return new BPromise(function(_0x52c56e,_0x2c24bd){return client[_0x720a('0xe')](_0x3a65be,_0x37f2a1)[_0x720a('0xf')](function(_0x14b114){logger['info'](_0x720a('0x10'),_0x4ab5f9,_0x720a('0x11'));logger['debug']('ChatQueueReport,\x20%s,\x20%s,\x20%s',_0x4ab5f9,_0x720a('0x11'),JSON[_0x720a('0x12')](_0x14b114));if(_0x14b114['error']){if(_0x14b114[_0x720a('0x13')][_0x720a('0x14')]===0x1f4){logger[_0x720a('0x13')](_0x720a('0x10'),_0x4ab5f9,_0x14b114[_0x720a('0x13')]['message']);return _0x2c24bd(_0x14b114['error'][_0x720a('0x15')]);}logger['error'](_0x720a('0x10'),_0x4ab5f9,_0x14b114[_0x720a('0x13')]['message']);return _0x52c56e(_0x14b114['error']['message']);}else{logger[_0x720a('0x16')](_0x720a('0x10'),_0x4ab5f9,_0x720a('0x11'));_0x52c56e(_0x14b114[_0x720a('0x17')][_0x720a('0x15')]);}})['catch'](function(_0x47cd2d){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x4ab5f9,_0x47cd2d);_0x2c24bd(_0x47cd2d);});});}exports[_0x720a('0x18')]=function(_0x7b9e6a){var _0x27b68c=this;return new Promise(function(_0x52cd21,_0x2b5420){return db[_0x720a('0x19')]['create'](_0x7b9e6a[_0x720a('0x1a')],{'raw':_0x7b9e6a[_0x720a('0x1b')]?_0x7b9e6a['options'][_0x720a('0x1c')]===undefined?!![]:![]:!![]})[_0x720a('0xf')](function(_0x5262e5){logger['info'](_0x720a('0x18'),_0x7b9e6a);logger[_0x720a('0x1d')](_0x720a('0x18'),_0x7b9e6a,JSON[_0x720a('0x12')](_0x5262e5));_0x52cd21(_0x5262e5);})[_0x720a('0x1e')](function(_0x17563e){logger['error'](_0x720a('0x18'),_0x17563e[_0x720a('0x15')],_0x7b9e6a);_0x2b5420(_0x27b68c[_0x720a('0x13')](0x1f4,_0x17563e[_0x720a('0x15')]));});});};exports['UpdateChatQueueReport']=function(_0x3d6fcd){var _0x13759d=this;return new Promise(function(_0x23dd16,_0x58b52a){return db[_0x720a('0x19')]['update'](_0x3d6fcd[_0x720a('0x1a')],{'raw':_0x3d6fcd[_0x720a('0x1b')]?_0x3d6fcd[_0x720a('0x1b')][_0x720a('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3d6fcd['options']?_0x3d6fcd[_0x720a('0x1b')][_0x720a('0x1f')]||null:null,'attributes':_0x3d6fcd[_0x720a('0x1b')]?_0x3d6fcd[_0x720a('0x1b')][_0x720a('0x20')]||null:null,'limit':_0x3d6fcd[_0x720a('0x1b')]?_0x3d6fcd['options'][_0x720a('0x21')]||null:null})[_0x720a('0xf')](function(_0x5816df){logger[_0x720a('0x16')](_0x720a('0x22'),_0x3d6fcd);logger[_0x720a('0x1d')]('UpdateChatQueueReport',_0x3d6fcd,JSON['stringify'](_0x5816df));_0x23dd16(_0x5816df);})[_0x720a('0x1e')](function(_0x1fff64){logger['error'](_0x720a('0x22'),_0x1fff64[_0x720a('0x15')],_0x3d6fcd);_0x58b52a(_0x13759d[_0x720a('0x13')](0x1f4,_0x1fff64[_0x720a('0x15')]));});});};
\ No newline at end of file