|
@@ -75,15 +75,9 @@ public class CompanyEmailSendHistoryController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("delete-company-email")
|
|
|
- public ResultVo deleteEmail(@RequestBody IdVO comyanyEmailIdVO){
|
|
|
- ResultVo vo = new ResultVo(ResultCode.DELETE_SUCCESS);
|
|
|
- try{
|
|
|
- companyEmailSendHistoryService.deleteEmail(comyanyEmailIdVO.getCompanyId());
|
|
|
- }catch (Exception e){
|
|
|
- vo = new ResultVo(ResultCode.SAVE_FAILED);
|
|
|
- logger.error(e.getMessage(),e);
|
|
|
- }
|
|
|
- return vo;
|
|
|
+ public boolean deleteEmail(@RequestBody IdVO comyanyEmailIdVO){
|
|
|
+ companyEmailSendHistoryService.deleteEmail(comyanyEmailIdVO.getCompanyId());
|
|
|
+ return true;
|
|
|
}
|
|
|
/**
|
|
|
* 根据ID批量删除邮箱发送历史数据
|
|
@@ -91,10 +85,9 @@ public class CompanyEmailSendHistoryController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("delete-email-history")
|
|
|
- public ResultVo deleteEmailHistory(@RequestBody IdVO comyanyEmailIdVO){
|
|
|
- ResultVo vo = new ResultVo(ResultCode.DELETE_SUCCESS);
|
|
|
+ public boolean deleteEmailHistory(@RequestBody IdVO comyanyEmailIdVO){
|
|
|
companyEmailSendHistoryService.deleteEmailHistory(comyanyEmailIdVO.getIdList());
|
|
|
- return vo;
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -103,15 +96,9 @@ public class CompanyEmailSendHistoryController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("save-email-config")
|
|
|
- public ResultVo saveCompanyEmailConfig(@RequestBody List<CompanyEmailConfigVO> companyEmailConfigVOList){
|
|
|
- ResultVo vo = new ResultVo(ResultCode.SAVE_SUCCESS);
|
|
|
- try{
|
|
|
- companyEmailConfigService.saveCompanyEmailConfig(companyEmailConfigVOList);
|
|
|
- }catch (Exception e){
|
|
|
- vo = new ResultVo(ResultCode.SAVE_FAILED);
|
|
|
- logger.error(e.getMessage(),e);
|
|
|
- }
|
|
|
- return vo;
|
|
|
+ public boolean saveCompanyEmailConfig(@RequestBody List<CompanyEmailConfigVO> companyEmailConfigVOList){
|
|
|
+ companyEmailConfigService.saveCompanyEmailConfig(companyEmailConfigVOList);
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -120,15 +107,9 @@ public class CompanyEmailSendHistoryController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("update-email-config")
|
|
|
- public ResultVo updateCompanyEmailConfig(@RequestBody CompanyEmailConfigVO companyEmailConfigVO){
|
|
|
- ResultVo vo = new ResultVo(ResultCode.SAVE_SUCCESS);
|
|
|
- try{
|
|
|
- companyEmailConfigService.updateCompanyEmailConfig(companyEmailConfigVO);
|
|
|
- }catch (Exception e){
|
|
|
- vo = new ResultVo(ResultCode.SAVE_FAILED);
|
|
|
- logger.error(e.getMessage(),e);
|
|
|
- }
|
|
|
- return vo;
|
|
|
+ public boolean updateCompanyEmailConfig(@RequestBody CompanyEmailConfigVO companyEmailConfigVO){
|
|
|
+ companyEmailConfigService.updateCompanyEmailConfig(companyEmailConfigVO);
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -137,16 +118,9 @@ public class CompanyEmailSendHistoryController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("delete-email-config")
|
|
|
- public ResultVo deleteCompanyEmailConfig(@RequestBody IdVO comyanyEmailIdVO){
|
|
|
- ResultVo vo = new ResultVo(ResultCode.DELETE_SUCCESS);
|
|
|
- try{
|
|
|
- companyEmailConfigService.deleteCompanyEmailConfig(comyanyEmailIdVO.getId());
|
|
|
- }catch (Exception e){
|
|
|
- vo = new ResultVo(ResultCode.DELETE_FAILED);
|
|
|
- logger.error(e.getMessage(),e);
|
|
|
- vo.setMsg(e.getMessage());
|
|
|
- }
|
|
|
- return vo;
|
|
|
+ public boolean deleteCompanyEmailConfig(@RequestBody IdVO comyanyEmailIdVO){
|
|
|
+ companyEmailConfigService.deleteCompanyEmailConfig(comyanyEmailIdVO.getId());
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -156,15 +130,8 @@ public class CompanyEmailSendHistoryController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("send-company-email")
|
|
|
- public ResultVo sendCompanyEmail(@RequestBody IdVO comyanyEmailIdVO){
|
|
|
- ResultVo vo = new ResultVo(ResultCode.SUCCESS);
|
|
|
- try{
|
|
|
- companyEmailConfigService.sendCompanyEmail(comyanyEmailIdVO.getCompanyIdList());
|
|
|
- }catch (Exception e){
|
|
|
- vo = new ResultVo(ResultCode.SUBMIT_FAILED);
|
|
|
- vo.setMsg(e.getMessage());
|
|
|
- logger.error(e.getMessage(),e);
|
|
|
- }
|
|
|
- return vo;
|
|
|
+ public boolean sendCompanyEmail(@RequestBody IdVO comyanyEmailIdVO){
|
|
|
+ companyEmailConfigService.sendCompanyEmail(comyanyEmailIdVO.getCompanyIdList());
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|