Built motion from commit 36b8e3b.|0.0.111
[motion.git] / server / api / report_sms_room / report_sms_room.controller.js
index 8738f38..dc10c7d 100644 (file)
@@ -1 +1 @@
-var _0x59af=["\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","\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"];_0x59af[0];var _=require(_0x59af[1]);var Util=require(_0x59af[2]);var ReportSmsRoom=require(_0x59af[4])[_0x59af[3]];var ReportSmsRoomHistory=require(_0x59af[4])[_0x59af[6]][_0x59af[5]];var User=require(_0x59af[4])[_0x59af[7]];var SmsQueue=require(_0x59af[4])[_0x59af[8]];function handleError(_0x586fx8,_0x586fx9){_0x586fx9=_0x586fx9||500;return function(_0x586fxa){_0x586fx8[_0x59af[10]](_0x586fx9)[_0x59af[9]](_0x586fxa)}}function responseWithResult(_0x586fx8,_0x586fx9){_0x586fx9=_0x586fx9||200;return function(_0x586fxc){if(_0x586fxc){_0x586fx8[_0x59af[10]](_0x586fx9)[_0x59af[11]](_0x586fxc)}}}function responseWithoutResult(_0x586fx8,_0x586fx9){_0x586fx9=_0x586fx9||204;return function(){_0x586fx8[_0x59af[12]](_0x586fx9)}}function handleEntityNotFound(_0x586fx8){return function(_0x586fxc){if(!_0x586fxc){_0x586fx8[_0x59af[10]](404)[_0x59af[13]]();return null};return _0x586fxc}}function saveUpdates(_0x586fx10){return function(_0x586fxc){return _0x586fxc[_0x59af[15]](_0x586fx10)[_0x59af[14]](function(_0x586fx11){return _0x586fx11})}}function removeEntity(_0x586fx8){return function(_0x586fxc){if(_0x586fxc){return _0x586fxc[_0x59af[16]]()[_0x59af[14]](function(){_0x586fx8[_0x59af[10]](204)[_0x59af[13]]()})}}}function getSmsQueues(_0x586fx14){return function(){switch(_0x586fx14[_0x59af[25]]){case _0x59af[24]:return User[_0x59af[23]](_0x586fx14[_0x59af[17]],{attributes:[_0x59af[17]]})[_0x59af[14]](Util[_0x59af[22]]({},{attributes:[_0x59af[17]],include:[{raw:true,model:User,attributes:[_0x59af[17]]}]}))[_0x59af[14]](function(_0x586fx15){var _0x586fx16=[];_0x586fx15[_0x59af[21]][_0x59af[20]](function(_0x586fx17){_0x586fx16=_[_0x59af[19]](_0x586fx16,_[_0x59af[18]](_0x586fx17.Users,_0x59af[17]))});return {where:{$or:{queue:_[_0x59af[18]](_0x586fx15[_0x59af[21]],_0x59af[17]),memberid:_0x586fx16}}}});default:return {}}}}exports[_0x59af[26]]=function(_0x586fx18,_0x586fx8){return Promise[_0x59af[31]]([])[_0x59af[14]](getSmsQueues(_0x586fx18[_0x59af[24]]))[_0x59af[14]](function(_0x586fx1a){return ReportSmsRoom[_0x59af[30]](_[_0x59af[29]]({where:{status:_0x59af[28]}},_0x586fx1a))})[_0x59af[14]](function(_0x586fx19){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]]({value:_0x586fx19})})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[32]]=function(_0x586fx18,_0x586fx8){return Promise[_0x59af[31]]([])[_0x59af[14]](getSmsQueues(_0x586fx18[_0x59af[24]]))[_0x59af[14]](function(_0x586fx1a){return ReportSmsRoom[_0x59af[30]](_[_0x59af[29]]({where:{status:_0x59af[33]}},_0x586fx1a))})[_0x59af[14]](function(_0x586fx19){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]]({value:_0x586fx19})})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[34]]=function(_0x586fx18,_0x586fx8){return Promise[_0x59af[31]]([])[_0x59af[14]](getSmsQueues(_0x586fx18[_0x59af[24]]))[_0x59af[14]](function(_0x586fx1a){return ReportSmsRoom[_0x59af[30]](_[_0x59af[29]]({where:{status:_0x59af[35]}},_0x586fx1a))})[_0x59af[14]](function(_0x586fx19){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]]({value:_0x586fx19})})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[36]]=function(_0x586fx18,_0x586fx8){return Promise[_0x59af[31]]([])[_0x59af[14]](getSmsQueues(_0x586fx18[_0x59af[24]]))[_0x59af[14]](function(_0x586fx1a){return ReportSmsRoom[_0x59af[30]](_[_0x59af[29]]({where:{status:_0x59af[37]}},_0x586fx1a))})[_0x59af[14]](function(_0x586fx19){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]]({value:_0x586fx19})})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[38]]=function(_0x586fx18,_0x586fx8,_0x586fx1b){return ReportSmsRoom[_0x59af[41]](Util[_0x59af[40]](_0x586fx18[_0x59af[39]]))[_0x59af[14]](function(_0x586fx1c){return _0x586fx8[_0x59af[10]](200)[_0x59af[9]](_0x586fx1c)})[_0x59af[27]](handleError(_0x586fx8))};exports[_0x59af[42]]=function(_0x586fx18,_0x586fx8){return ReportSmsRoomHistory[_0x59af[42]]()[_0x59af[14]](responseWithResult(_0x586fx8))[_0x59af[27]](handleError(_0x586fx8))}
\ 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