Built motion from commit 038bc69.|0.0.119
[motion.git] / server / api / report_mail / report_mail.controller.js
index e8ce8b8..cd040ec 100644 (file)
@@ -1 +1 @@
-var _0x36f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\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","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x43\x4C\x4F\x53\x45\x44","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x73","\x75\x73\x65\x72","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x72\x65\x6A\x65\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x36f3[0];var _=require(_0x36f3[1]);var moment=require(_0x36f3[2]);var ReportMail=require(_0x36f3[4])[_0x36f3[3]];var sequelize=require(_0x36f3[4])[_0x36f3[5]];var Agent=require(_0x36f3[4])[_0x36f3[6]];var Util=require(_0x36f3[7]);exports[_0x36f3[8]]=function(_0x368cx7,_0x368cx8,_0x368cx9){return ReportMail[_0x36f3[15]](Util[_0x36f3[14]](_0x368cx7[_0x36f3[13]]))[_0x36f3[12]](function(_0x368cxb){_0x368cx8[_0x36f3[11]](200)[_0x36f3[10]](_0x368cxb)})[_0x36f3[9]](function(_0x368cxa){return handleError(_0x368cx8,_0x368cxa)})};exports[_0x36f3[16]]=function(_0x368cx7,_0x368cx8){return ReportMail[_0x36f3[20]](_0x368cx7[_0x36f3[19]][_0x36f3[18]])[_0x36f3[12]](function(_0x368cxc){if(!_0x368cxc){return _0x368cx8[_0x36f3[17]](404)};return _0x368cx8[_0x36f3[10]](_0x368cxc)})[_0x36f3[9]](function(_0x368cxa){return handleError(_0x368cx8,_0x368cxa)})};exports[_0x36f3[21]]=function(_0x368cx7,_0x368cx8){var _0x368cxd;var _0x368cxe=_0x368cx7[_0x36f3[19]][_0x36f3[24]][_0x36f3[23]](_0x36f3[22])[1];return Agent[_0x36f3[20]](_0x368cx7[_0x36f3[29]][_0x36f3[18]],{attributes:[_0x36f3[18],_0x36f3[30]]})[_0x36f3[12]](function(_0x368cx11){_0x368cxd=_0x368cx11;return _0x368cx11[_0x36f3[28]]({where:{status:{$ne:_0x36f3[27]},id:{$ne:_0x368cxe}},attributes:[_0x36f3[18]]})})[_0x36f3[12]](function(_0x368cx10){return ReportMail[_0x36f3[20]](_0x368cx7[_0x36f3[19]][_0x36f3[18]])})[_0x36f3[12]](function(_0x368cxc){if(!_0x368cxc){return _0x368cx8[_0x36f3[17]](404)};var _0x368cxf=_[_0x36f3[25]](_0x368cxc,{connectid:_0x368cx7[_0x36f3[19]][_0x36f3[24]]});return _0x368cxf[_0x36f3[26]]()})[_0x36f3[12]](function(){return _0x368cx8[_0x36f3[17]](200)})[_0x36f3[9]](function(_0x368cxa){return handleError(_0x368cx8,_0x368cxa)})};exports[_0x36f3[31]]=function(_0x368cx7,_0x368cx8){return ReportMail[_0x36f3[20]](_0x368cx7[_0x36f3[19]][_0x36f3[18]])[_0x36f3[12]](function(_0x368cxc){if(!_0x368cxc){return _0x368cx8[_0x36f3[17]](404)};var _0x368cxf=_[_0x36f3[25]](_0x368cxc,{rejectedAt:moment()[_0x36f3[33]](_0x36f3[32])});return _0x368cxf[_0x36f3[26]]()})[_0x36f3[12]](function(){return _0x368cx8[_0x36f3[17]](200)})[_0x36f3[9]](function(_0x368cxa){return handleError(_0x368cx8,_0x368cxa)})};exports[_0x36f3[34]]=function(_0x368cx7,_0x368cx8){return ReportMail[_0x36f3[34]](_0x368cx7[_0x36f3[35]])[_0x36f3[12]](function(_0x368cxc){return _0x368cx8[_0x36f3[11]](201)[_0x36f3[10]](_0x368cxc)})[_0x36f3[9]](function(_0x368cxa){return handleError(_0x368cx8,_0x368cxa)})};exports[_0x36f3[36]]=function(_0x368cx7,_0x368cx8){if(_0x368cx7[_0x36f3[35]][_0x36f3[18]]){delete _0x368cx7[_0x36f3[35]][_0x36f3[18]]};return ReportMail[_0x36f3[20]](_0x368cx7[_0x36f3[19]][_0x36f3[18]])[_0x36f3[12]](function(_0x368cxc){if(!_0x368cxc){return _0x368cx8[_0x36f3[17]](404)};var _0x368cxf=_[_0x36f3[25]](_0x368cxc,_0x368cx7[_0x36f3[35]]);return _0x368cxf[_0x36f3[26]]()})[_0x36f3[12]](function(_0x368cxc){return _0x368cx8[_0x36f3[11]](200)[_0x36f3[10]](_0x368cxc)})[_0x36f3[9]](function(_0x368cxa){return handleError(_0x368cx8,_0x368cxa)})};exports[_0x36f3[37]]=function(_0x368cx7,_0x368cx8){return ReportMail[_0x36f3[20]](_0x368cx7[_0x36f3[19]][_0x36f3[18]])[_0x36f3[12]](function(_0x368cxc){if(!_0x368cxc){return _0x368cx8[_0x36f3[17]](404)};return _0x368cxc[_0x36f3[37]]()})[_0x36f3[12]](function(){return _0x368cx8[_0x36f3[17]](204)})[_0x36f3[9]](function(_0x368cxa){return handleError(_0x368cx8,_0x368cxa)})};function handleError(_0x368cx8,_0x368cxa){return _0x368cx8[_0x36f3[11]](500)[_0x36f3[10]](_0x368cxa)}
\ No newline at end of file
+var _0x7f1a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\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","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x69\x64","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x6A\x65\x63\x74","\x52\x45\x4A\x45\x43\x54","\x72\x6F\x6F\x6D\x69\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67"];_0x7f1a[0];var _=require(_0x7f1a[1]);var moment=require(_0x7f1a[2]);var Report=require(_0x7f1a[4])[_0x7f1a[3]];var Room=require(_0x7f1a[4])[_0x7f1a[5]];var Status=require(_0x7f1a[4])[_0x7f1a[6]];var sequelize=require(_0x7f1a[4])[_0x7f1a[7]];var Util=require(_0x7f1a[8]);exports[_0x7f1a[9]]= function(_0xa744x8,_0xa744x9,_0xa744xa){var _0xa744xb={};if(_0xa744x8[_0x7f1a[11]][_0x7f1a[10]]=== _0x7f1a[12]){_0xa744xb[_0x7f1a[13]]= _0xa744x8[_0x7f1a[11]][_0x7f1a[14]]};return Report[_0x7f1a[21]](Util[_0x7f1a[20]](_0xa744x8[_0x7f1a[19]],_0xa744xb))[_0x7f1a[18]](function(_0xa744xd){_0xa744x9[_0x7f1a[17]](200)[_0x7f1a[16]](_0xa744xd)})[_0x7f1a[15]](function(_0xa744xc){return handleError(_0xa744x9,_0xa744xc)})};exports[_0x7f1a[22]]= function(_0xa744x8,_0xa744x9){var _0xa744xe=_0xa744x8[_0x7f1a[26]][_0x7f1a[25]][_0x7f1a[24]](_0x7f1a[23])[1];return Report[_0x7f1a[35]](_0xa744x8[_0x7f1a[26]][_0x7f1a[29]])[_0x7f1a[18]](function(_0xa744xf){if(!_0xa744xf){return _0xa744x9[_0x7f1a[27]](404)};var _0xa744x10=_[_0x7f1a[33]](_0xa744xf,{connectid:_0xa744x8[_0x7f1a[26]][_0x7f1a[25]]});return _0xa744x10[_0x7f1a[34]]()})[_0x7f1a[18]](function(){return Room[_0x7f1a[32]]({status:_0x7f1a[28]},{where:{id:_0xa744xe}})})[_0x7f1a[18]](function(){return Status[_0x7f1a[31]]({status:_0x7f1a[28],UserId:_0xa744x8[_0x7f1a[11]][_0x7f1a[29]],data1:_0xa744x8[_0x7f1a[11]][_0x7f1a[14]],data2:_0xa744x8[_0x7f1a[11]][_0x7f1a[30]],MailRoomId:_0xa744xe})})[_0x7f1a[18]](function(){return _0xa744x9[_0x7f1a[27]](200)})[_0x7f1a[15]](sequelize.UniqueConstraintError,function(_0xa744xc){return _0xa744x9[_0x7f1a[27]](504)})[_0x7f1a[15]](function(_0xa744xc){return handleError(_0xa744x9,_0xa744xc)})};exports[_0x7f1a[36]]= function(_0xa744x8,_0xa744x9){var _0xa744x11;return Report[_0x7f1a[35]](_0xa744x8[_0x7f1a[26]][_0x7f1a[29]])[_0x7f1a[18]](function(_0xa744x12){_0xa744x11= _0xa744x12;if(!_0xa744x11){return _0xa744x9[_0x7f1a[27]](404)};var _0xa744x10=_[_0x7f1a[33]](_0xa744x12,{rejectedAt:moment()[_0x7f1a[40]](_0x7f1a[39])});return _0xa744x10[_0x7f1a[34]]()})[_0x7f1a[18]](function(){return Status[_0x7f1a[31]]({status:_0x7f1a[37],data1:_0xa744x8[_0x7f1a[11]][_0x7f1a[14]],data2:_0xa744x8[_0x7f1a[11]][_0x7f1a[30]],UserId:_0xa744x8[_0x7f1a[11]][_0x7f1a[29]],MailRoomId:_0xa744x11[_0x7f1a[38]]})})[_0x7f1a[18]](function(){return _0xa744x9[_0x7f1a[27]](200)})[_0x7f1a[15]](function(_0xa744xc){return handleError(_0xa744x9,_0xa744xc)})};function handleError(_0xa744x9,_0xa744xc){console[_0x7f1a[41]](_0xa744xc);return _0xa744x9[_0x7f1a[17]](500)[_0x7f1a[16]](_0xa744xc)}
\ No newline at end of file