|
@@ -4,14 +4,13 @@ import cn.hutool.core.lang.TypeReference;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.gree.mall.manager.annotation.ZfireList;
|
|
|
-import com.gree.mall.manager.bean.policy.AgreementAddUp;
|
|
|
-import com.gree.mall.manager.bean.policy.AgreementDetail;
|
|
|
-import com.gree.mall.manager.bean.policy.AgreementVo;
|
|
|
-import com.gree.mall.manager.bean.policy.PolicyVo;
|
|
|
+import com.gree.mall.manager.bean.policy.*;
|
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
import com.gree.mall.manager.logic.policy.AgreementLogic;
|
|
|
import com.gree.mall.manager.plus.entity.Mailbox;
|
|
|
+import com.gree.mall.manager.plus.entity.MailboxSendRecord;
|
|
|
+import com.gree.mall.manager.plus.entity.MailboxSendRecordPolicy;
|
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -27,7 +26,7 @@ import java.text.ParseException;
|
|
|
|
|
|
@Slf4j
|
|
|
@RestController
|
|
|
-@Api(value = "邮箱配置", tags = {"邮箱配置"})
|
|
|
+@Api(value = "邮箱配置和邮箱记录", tags = {"邮箱配置和邮箱记录"})
|
|
|
@RequestMapping(value = "/mailbox", produces = "application/json; charset=utf-8")
|
|
|
public class MailboxController {
|
|
|
|
|
@@ -55,5 +54,67 @@ public class MailboxController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "已发邮箱记录列表")
|
|
|
+ public ResponseHelper<IPage<MailBoxSendRecordVo>> list(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) throws RemoteServiceException {
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ IPage<MailBoxSendRecordVo> increVOIPage = agreementLogic.listMailBoxRecord(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ return ResponseHelper.success(increVOIPage, new TypeReference<MailBoxSendRecordVo>() {});
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/list/export")
|
|
|
+ @ApiOperation(value = "已发邮箱记录列表导出")
|
|
|
+ public void listExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ //1.组装查询条件
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ //2.查询要导出的内容
|
|
|
+ IPage<MailBoxSendRecordVo> increVOIPage = agreementLogic.listMailBoxRecord(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ //3.导出
|
|
|
+ FieldUtils.exportData(increVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/detailRecord")
|
|
|
+ @ApiOperation("保险方案管理详情")
|
|
|
+ public ResponseHelper<MailboxSendRecord> detail(
|
|
|
+ @ApiParam(value = "id", required = true) @RequestParam String id,
|
|
|
+ HttpServletRequest request
|
|
|
+ ) throws ParseException {
|
|
|
+ MailboxSendRecord mailboxSendRecord = agreementLogic.detailRecord(id);
|
|
|
+ return ResponseHelper.success(mailboxSendRecord);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/listPolicy")
|
|
|
+ @ApiOperation(value = "保单信息列表")
|
|
|
+ public ResponseHelper<IPage<MailboxSendRecordPolicyVo>> listPolicy(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) throws RemoteServiceException {
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ IPage<MailboxSendRecordPolicyVo> increVOIPage = agreementLogic.listPolicy(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ return ResponseHelper.success(increVOIPage, new TypeReference<MailboxSendRecordPolicyVo>() {});
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/listPolicy/export")
|
|
|
+ @ApiOperation(value = "保单信息列表导出")
|
|
|
+ public void listPolicyExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ //1.组装查询条件
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ //2.查询要导出的内容
|
|
|
+ IPage<MailboxSendRecordPolicyVo> increVOIPage = agreementLogic.listPolicy(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ //3.导出
|
|
|
+ FieldUtils.exportData(increVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
|
|
|
+ }
|
|
|
|
|
|
}
|