|
@@ -3,14 +3,14 @@ package com.simuwang.manage.api.template;
|
|
|
import com.simuwang.base.common.support.MybatisPage;
|
|
|
import com.simuwang.base.pojo.dto.query.EmailTemplateInfoPageQuery;
|
|
|
import com.simuwang.base.pojo.dto.query.EmailTemplateSettingPageQuery;
|
|
|
-import com.simuwang.base.pojo.vo.EmailTemplateInfoVO;
|
|
|
-import com.simuwang.base.pojo.vo.EmailTemplateMappingVO;
|
|
|
-import com.simuwang.base.pojo.vo.IdListVO;
|
|
|
-import com.simuwang.base.pojo.vo.SaveTemplateInfoVO;
|
|
|
+import com.simuwang.base.pojo.vo.*;
|
|
|
import com.simuwang.logging.SystemLog;
|
|
|
import com.simuwang.manage.service.EmailTemplateInfoService;
|
|
|
import com.simuwang.manage.service.EmailTemplateMappingService;
|
|
|
+import com.smppw.common.pojo.ResultVo;
|
|
|
+import com.smppw.common.pojo.enums.status.ResultCode;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -66,4 +66,23 @@ public class TemplateSettingController {
|
|
|
emailTemplateMappingService.saveTemplateSetting(emailTemplateMappingVO);
|
|
|
return true;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 开启关闭状态
|
|
|
+ * @param statusVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @SystemLog(value = "开启关闭状态", type = SystemLog.Type.UPDATE)
|
|
|
+ @PostMapping("control-template-status")
|
|
|
+ public ResultVo controlTemplateSetting(@RequestBody StatusVO statusVO){
|
|
|
+ ResultVo vo = new ResultVo(ResultCode.SAVE_SUCCESS.getCode());
|
|
|
+ try{
|
|
|
+ emailTemplateMappingService.controlTemplateConfig(statusVO);
|
|
|
+ vo.setData(true);
|
|
|
+ }catch (Exception e){
|
|
|
+ vo.setCode(ResultCode.SAVE_FAILED.getCode());
|
|
|
+ vo.setData(false);
|
|
|
+ }
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
}
|