Built motion from commit 36b8e3b.|0.0.111
[motion.git] / server / api / report_sms_room / report_sms_room.controller.js
index 465a491..dc10c7d 100644 (file)
@@ -1 +1 @@
-var _0xb56a=["\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"];_0xb56a[0];var _=require(_0xb56a[1]);var Util=require(_0xb56a[2]);var ReportSmsRoom=require(_0xb56a[4])[_0xb56a[3]];var ReportSmsRoomHistory=require(_0xb56a[4])[_0xb56a[6]][_0xb56a[5]];var User=require(_0xb56a[4])[_0xb56a[7]];var SmsQueue=require(_0xb56a[4])[_0xb56a[8]];function handleError(_0xc81fx8,_0xc81fx9){_0xc81fx9=_0xc81fx9||500;return function(_0xc81fxa){_0xc81fx8[_0xb56a[10]](_0xc81fx9)[_0xb56a[9]](_0xc81fxa)}}function responseWithResult(_0xc81fx8,_0xc81fx9){_0xc81fx9=_0xc81fx9||200;return function(_0xc81fxc){if(_0xc81fxc){_0xc81fx8[_0xb56a[10]](_0xc81fx9)[_0xb56a[11]](_0xc81fxc)}}}function responseWithoutResult(_0xc81fx8,_0xc81fx9){_0xc81fx9=_0xc81fx9||204;return function(){_0xc81fx8[_0xb56a[12]](_0xc81fx9)}}function handleEntityNotFound(_0xc81fx8){return function(_0xc81fxc){if(!_0xc81fxc){_0xc81fx8[_0xb56a[10]](404)[_0xb56a[13]]();return null};return _0xc81fxc}}function saveUpdates(_0xc81fx10){return function(_0xc81fxc){return _0xc81fxc[_0xb56a[15]](_0xc81fx10)[_0xb56a[14]](function(_0xc81fx11){return _0xc81fx11})}}function removeEntity(_0xc81fx8){return function(_0xc81fxc){if(_0xc81fxc){return _0xc81fxc[_0xb56a[16]]()[_0xb56a[14]](function(){_0xc81fx8[_0xb56a[10]](204)[_0xb56a[13]]()})}}}function getSmsQueues(_0xc81fx14){return function(){switch(_0xc81fx14[_0xb56a[25]]){case _0xb56a[24]:return User[_0xb56a[23]](_0xc81fx14[_0xb56a[17]],{attributes:[_0xb56a[17]]})[_0xb56a[14]](Util[_0xb56a[22]]({},{attributes:[_0xb56a[17]],include:[{raw:true,model:User,attributes:[_0xb56a[17]]}]}))[_0xb56a[14]](function(_0xc81fx15){var _0xc81fx16=[];_0xc81fx15[_0xb56a[21]][_0xb56a[20]](function(_0xc81fx17){_0xc81fx16=_[_0xb56a[19]](_0xc81fx16,_[_0xb56a[18]](_0xc81fx17.Users,_0xb56a[17]))});return {where:{$or:{queue:_[_0xb56a[18]](_0xc81fx15[_0xb56a[21]],_0xb56a[17]),memberid:_0xc81fx16}}}});default:return {}}}}exports[_0xb56a[26]]=function(_0xc81fx18,_0xc81fx8){return Promise[_0xb56a[31]]([])[_0xb56a[14]](getSmsQueues(_0xc81fx18[_0xb56a[24]]))[_0xb56a[14]](function(_0xc81fx1a){return ReportSmsRoom[_0xb56a[30]](_[_0xb56a[29]]({where:{status:_0xb56a[28]}},_0xc81fx1a))})[_0xb56a[14]](function(_0xc81fx19){return _0xc81fx8[_0xb56a[10]](200)[_0xb56a[9]]({value:_0xc81fx19})})[_0xb56a[27]](handleError(_0xc81fx8))};exports[_0xb56a[32]]=function(_0xc81fx18,_0xc81fx8){return Promise[_0xb56a[31]]([])[_0xb56a[14]](getSmsQueues(_0xc81fx18[_0xb56a[24]]))[_0xb56a[14]](function(_0xc81fx1a){return ReportSmsRoom[_0xb56a[30]](_[_0xb56a[29]]({where:{status:_0xb56a[33]}},_0xc81fx1a))})[_0xb56a[14]](function(_0xc81fx19){return _0xc81fx8[_0xb56a[10]](200)[_0xb56a[9]]({value:_0xc81fx19})})[_0xb56a[27]](handleError(_0xc81fx8))};exports[_0xb56a[34]]=function(_0xc81fx18,_0xc81fx8){return Promise[_0xb56a[31]]([])[_0xb56a[14]](getSmsQueues(_0xc81fx18[_0xb56a[24]]))[_0xb56a[14]](function(_0xc81fx1a){return ReportSmsRoom[_0xb56a[30]](_[_0xb56a[29]]({where:{status:_0xb56a[35]}},_0xc81fx1a))})[_0xb56a[14]](function(_0xc81fx19){return _0xc81fx8[_0xb56a[10]](200)[_0xb56a[9]]({value:_0xc81fx19})})[_0xb56a[27]](handleError(_0xc81fx8))};exports[_0xb56a[36]]=function(_0xc81fx18,_0xc81fx8){return Promise[_0xb56a[31]]([])[_0xb56a[14]](getSmsQueues(_0xc81fx18[_0xb56a[24]]))[_0xb56a[14]](function(_0xc81fx1a){return ReportSmsRoom[_0xb56a[30]](_[_0xb56a[29]]({where:{status:_0xb56a[37]}},_0xc81fx1a))})[_0xb56a[14]](function(_0xc81fx19){return _0xc81fx8[_0xb56a[10]](200)[_0xb56a[9]]({value:_0xc81fx19})})[_0xb56a[27]](handleError(_0xc81fx8))};exports[_0xb56a[38]]=function(_0xc81fx18,_0xc81fx8,_0xc81fx1b){return ReportSmsRoom[_0xb56a[41]](Util[_0xb56a[40]](_0xc81fx18[_0xb56a[39]]))[_0xb56a[14]](function(_0xc81fx1c){return _0xc81fx8[_0xb56a[10]](200)[_0xb56a[9]](_0xc81fx1c)})[_0xb56a[27]](handleError(_0xc81fx8))};exports[_0xb56a[42]]=function(_0xc81fx18,_0xc81fx8){return ReportSmsRoomHistory[_0xb56a[42]]()[_0xb56a[14]](responseWithResult(_0xc81fx8))[_0xb56a[27]](handleError(_0xc81fx8))}
\ 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