Built motion from commit 36b8e3b.|0.0.111
[motion.git] / server / api / report_sms_room / report_sms_room.controller.js
index 9791222..dc10c7d 100644 (file)
@@ -1 +1 @@
-var _0x578f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x55\x73\x65\x72","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x6F\x70\x65\x6E","\x63\x61\x74\x63\x68","\x4F\x50\x45\x4E","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x6E\x65\x77","\x4E\x45\x57","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x69\x6E\x64\x65\x78","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x578f[0];var _=require(_0x578f[1]);var Util=require(_0x578f[2]);var ReportSmsRoom=require(_0x578f[4])[_0x578f[3]];var SmsRoom=require(_0x578f[4])[_0x578f[5]];var ReportSmsRoomHistory=require(_0x578f[4])[_0x578f[7]][_0x578f[6]];var User=require(_0x578f[4])[_0x578f[8]];var SmsQueue=require(_0x578f[4])[_0x578f[9]];function handleError(_0x2615x9,_0x2615xa){_0x2615xa=_0x2615xa||500;return function(_0x2615xb){_0x2615x9[_0x578f[11]](_0x2615xa)[_0x578f[10]](_0x2615xb)}}function responseWithResult(_0x2615x9,_0x2615xa){_0x2615xa=_0x2615xa||200;return function(_0x2615xd){if(_0x2615xd){_0x2615x9[_0x578f[11]](_0x2615xa)[_0x578f[12]](_0x2615xd)}}}function responseWithoutResult(_0x2615x9,_0x2615xa){_0x2615xa=_0x2615xa||204;return function(){_0x2615x9[_0x578f[13]](_0x2615xa)}}function handleEntityNotFound(_0x2615x9){return function(_0x2615xd){if(!_0x2615xd){_0x2615x9[_0x578f[11]](404)[_0x578f[14]]();return null};return _0x2615xd}}function saveUpdates(_0x2615x11){return function(_0x2615xd){return _0x2615xd[_0x578f[16]](_0x2615x11)[_0x578f[15]](function(_0x2615x12){return _0x2615x12})}}function removeEntity(_0x2615x9){return function(_0x2615xd){if(_0x2615xd){return _0x2615xd[_0x578f[17]]()[_0x578f[15]](function(){_0x2615x9[_0x578f[11]](204)[_0x578f[14]]()})}}}function getSmsQueues(_0x2615x15){return function(){switch(_0x2615x15[_0x578f[26]]){case _0x578f[25]:return User[_0x578f[24]](_0x2615x15[_0x578f[18]],{attributes:[_0x578f[18]]})[_0x578f[15]](Util[_0x578f[23]]({},{attributes:[_0x578f[18]],include:[{raw:true,model:User,attributes:[_0x578f[18]]}]}))[_0x578f[15]](function(_0x2615x16){var _0x2615x17=[];_0x2615x16[_0x578f[22]][_0x578f[21]](function(_0x2615x18){_0x2615x17=_[_0x578f[20]](_0x2615x17,_[_0x578f[19]](_0x2615x18.Users,_0x578f[18]))});return {where:{$or:{queue:_[_0x578f[19]](_0x2615x16[_0x578f[22]],_0x578f[18]),memberid:_0x2615x17}}}});default:return {}}}}exports[_0x578f[27]]=function(_0x2615x19,_0x2615x9){return Promise[_0x578f[32]]([])[_0x578f[15]](getSmsQueues(_0x2615x19[_0x578f[25]]))[_0x578f[15]](function(_0x2615x1b){return SmsRoom[_0x578f[31]](_[_0x578f[30]]({where:{status:_0x578f[29]}},_0x2615x1b))})[_0x578f[15]](function(_0x2615x1a){return _0x2615x9[_0x578f[11]](200)[_0x578f[10]]({value:_0x2615x1a})})[_0x578f[28]](handleError(_0x2615x9))};exports[_0x578f[33]]=function(_0x2615x19,_0x2615x9){return Promise[_0x578f[32]]([])[_0x578f[15]](getSmsQueues(_0x2615x19[_0x578f[25]]))[_0x578f[15]](function(_0x2615x1b){return SmsRoom[_0x578f[31]](_[_0x578f[30]]({where:{status:_0x578f[34]}},_0x2615x1b))})[_0x578f[15]](function(_0x2615x1a){return _0x2615x9[_0x578f[11]](200)[_0x578f[10]]({value:_0x2615x1a})})[_0x578f[28]](handleError(_0x2615x9))};exports[_0x578f[35]]=function(_0x2615x19,_0x2615x9){return Promise[_0x578f[32]]([])[_0x578f[15]](getSmsQueues(_0x2615x19[_0x578f[25]]))[_0x578f[15]](function(_0x2615x1b){return SmsRoom[_0x578f[31]](_[_0x578f[30]]({where:{status:_0x578f[36]}},_0x2615x1b))})[_0x578f[15]](function(_0x2615x1a){return _0x2615x9[_0x578f[11]](200)[_0x578f[10]]({value:_0x2615x1a})})[_0x578f[28]](handleError(_0x2615x9))};exports[_0x578f[37]]=function(_0x2615x19,_0x2615x9){return Promise[_0x578f[32]]([])[_0x578f[15]](getSmsQueues(_0x2615x19[_0x578f[25]]))[_0x578f[15]](function(_0x2615x1b){return SmsRoom[_0x578f[31]](_[_0x578f[30]]({where:{status:_0x578f[38]}},_0x2615x1b))})[_0x578f[15]](function(_0x2615x1a){return _0x2615x9[_0x578f[11]](200)[_0x578f[10]]({value:_0x2615x1a})})[_0x578f[28]](handleError(_0x2615x9))};exports[_0x578f[39]]=function(_0x2615x19,_0x2615x9,_0x2615x1c){return ReportSmsRoom[_0x578f[42]](Util[_0x578f[41]](_0x2615x19[_0x578f[40]]))[_0x578f[15]](function(_0x2615x1d){return _0x2615x9[_0x578f[11]](200)[_0x578f[10]](_0x2615x1d)})[_0x578f[28]](handleError(_0x2615x9))};exports[_0x578f[43]]=function(_0x2615x19,_0x2615x9){return ReportSmsRoomHistory[_0x578f[43]]()[_0x578f[15]](responseWithResult(_0x2615x9))[_0x578f[28]](handleError(_0x2615x9))}
\ No newline at end of file
+var _0xc9f4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x55\x73\x65\x72","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x6F\x70\x65\x6E","\x63\x61\x74\x63\x68","\x4F\x50\x45\x4E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x6E\x65\x77","\x4E\x45\x57","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x69\x6E\x64\x65\x78","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xc9f4[0];var _=require(_0xc9f4[1]);var moment=require(_0xc9f4[2]);var Util=require(_0xc9f4[3]);var ReportSmsRoom=require(_0xc9f4[5])[_0xc9f4[4]];var SmsRoom=require(_0xc9f4[5])[_0xc9f4[6]];var ReportSmsRoomHistory=require(_0xc9f4[5])[_0xc9f4[8]][_0xc9f4[7]];var User=require(_0xc9f4[5])[_0xc9f4[9]];var SmsQueue=require(_0xc9f4[5])[_0xc9f4[10]];function handleError(_0xf83dxa,_0xf83dxb){_0xf83dxb=_0xf83dxb||500;return function(_0xf83dxc){_0xf83dxa[_0xc9f4[12]](_0xf83dxb)[_0xc9f4[11]](_0xf83dxc)}}function responseWithResult(_0xf83dxa,_0xf83dxb){_0xf83dxb=_0xf83dxb||200;return function(_0xf83dxe){if(_0xf83dxe){_0xf83dxa[_0xc9f4[12]](_0xf83dxb)[_0xc9f4[13]](_0xf83dxe)}}}function responseWithoutResult(_0xf83dxa,_0xf83dxb){_0xf83dxb=_0xf83dxb||204;return function(){_0xf83dxa[_0xc9f4[14]](_0xf83dxb)}}function handleEntityNotFound(_0xf83dxa){return function(_0xf83dxe){if(!_0xf83dxe){_0xf83dxa[_0xc9f4[12]](404)[_0xc9f4[15]]();return null};return _0xf83dxe}}function saveUpdates(_0xf83dx12){return function(_0xf83dxe){return _0xf83dxe[_0xc9f4[17]](_0xf83dx12)[_0xc9f4[16]](function(_0xf83dx13){return _0xf83dx13})}}function removeEntity(_0xf83dxa){return function(_0xf83dxe){if(_0xf83dxe){return _0xf83dxe[_0xc9f4[18]]()[_0xc9f4[16]](function(){_0xf83dxa[_0xc9f4[12]](204)[_0xc9f4[15]]()})}}}function getSmsQueues(_0xf83dx16){return function(){switch(_0xf83dx16[_0xc9f4[27]]){case _0xc9f4[26]:return User[_0xc9f4[25]](_0xf83dx16[_0xc9f4[19]],{attributes:[_0xc9f4[19]]})[_0xc9f4[16]](Util[_0xc9f4[24]]({},{attributes:[_0xc9f4[19]],include:[{raw:true,model:User,attributes:[_0xc9f4[19]]}]}))[_0xc9f4[16]](function(_0xf83dx17){var _0xf83dx18=[];_0xf83dx17[_0xc9f4[23]][_0xc9f4[22]](function(_0xf83dx19){_0xf83dx18=_[_0xc9f4[21]](_0xf83dx18,_[_0xc9f4[20]](_0xf83dx19.Users,_0xc9f4[19]))});return {where:{$or:{queue:_[_0xc9f4[20]](_0xf83dx17[_0xc9f4[23]],_0xc9f4[19]),memberid:_0xf83dx18}}}});default:return {}}}}exports[_0xc9f4[28]]=function(_0xf83dx1a,_0xf83dxa){return Promise[_0xc9f4[35]]([])[_0xc9f4[16]](getSmsQueues(_0xf83dx1a[_0xc9f4[26]]))[_0xc9f4[16]](function(_0xf83dx1c){return SmsRoom[_0xc9f4[34]](_[_0xc9f4[33]]({where:{status:_0xc9f4[30],createdAt:{$gte:moment()[_0xc9f4[32]](_0xc9f4[31])}}},_0xf83dx1c))})[_0xc9f4[16]](function(_0xf83dx1b){return _0xf83dxa[_0xc9f4[12]](200)[_0xc9f4[11]]({value:_0xf83dx1b})})[_0xc9f4[29]](handleError(_0xf83dxa))};exports[_0xc9f4[36]]=function(_0xf83dx1a,_0xf83dxa){return Promise[_0xc9f4[35]]([])[_0xc9f4[16]](getSmsQueues(_0xf83dx1a[_0xc9f4[26]]))[_0xc9f4[16]](function(_0xf83dx1c){return SmsRoom[_0xc9f4[34]](_[_0xc9f4[33]]({where:{status:_0xc9f4[37],createdAt:{$gte:moment()[_0xc9f4[32]](_0xc9f4[31])}}},_0xf83dx1c))})[_0xc9f4[16]](function(_0xf83dx1b){return _0xf83dxa[_0xc9f4[12]](200)[_0xc9f4[11]]({value:_0xf83dx1b})})[_0xc9f4[29]](handleError(_0xf83dxa))};exports[_0xc9f4[38]]=function(_0xf83dx1a,_0xf83dxa){return Promise[_0xc9f4[35]]([])[_0xc9f4[16]](getSmsQueues(_0xf83dx1a[_0xc9f4[26]]))[_0xc9f4[16]](function(_0xf83dx1c){return SmsRoom[_0xc9f4[34]](_[_0xc9f4[33]]({where:{status:_0xc9f4[39],createdAt:{$gte:moment()[_0xc9f4[32]](_0xc9f4[31])}}},_0xf83dx1c))})[_0xc9f4[16]](function(_0xf83dx1b){return _0xf83dxa[_0xc9f4[12]](200)[_0xc9f4[11]]({value:_0xf83dx1b})})[_0xc9f4[29]](handleError(_0xf83dxa))};exports[_0xc9f4[40]]=function(_0xf83dx1a,_0xf83dxa){return Promise[_0xc9f4[35]]([])[_0xc9f4[16]](getSmsQueues(_0xf83dx1a[_0xc9f4[26]]))[_0xc9f4[16]](function(_0xf83dx1c){return SmsRoom[_0xc9f4[34]](_[_0xc9f4[33]]({where:{status:_0xc9f4[41],createdAt:{$gte:moment()[_0xc9f4[32]](_0xc9f4[31])}}},_0xf83dx1c))})[_0xc9f4[16]](function(_0xf83dx1b){return _0xf83dxa[_0xc9f4[12]](200)[_0xc9f4[11]]({value:_0xf83dx1b})})[_0xc9f4[29]](handleError(_0xf83dxa))};exports[_0xc9f4[42]]=function(_0xf83dx1a,_0xf83dxa,_0xf83dx1d){return ReportSmsRoom[_0xc9f4[45]](Util[_0xc9f4[44]](_0xf83dx1a[_0xc9f4[43]]))[_0xc9f4[16]](function(_0xf83dx1e){return _0xf83dxa[_0xc9f4[12]](200)[_0xc9f4[11]](_0xf83dx1e)})[_0xc9f4[29]](handleError(_0xf83dxa))};exports[_0xc9f4[46]]=function(_0xf83dx1a,_0xf83dxa){return ReportSmsRoomHistory[_0xc9f4[46]]()[_0xc9f4[16]](responseWithResult(_0xf83dxa))[_0xc9f4[29]](handleError(_0xf83dxa))}
\ No newline at end of file