Browse Source

Merge remote-tracking branch 'origin/master'

master
21819 2 years ago
parent
commit
78ba6837c2
  1. 82
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/controller/MailEtlController.java
  2. 14
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/dto/MailEtlFormData.java
  3. 11
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/dto/MailEtlFormPage.java
  4. 13
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/dto/Mail_EvaEtlPageInfo.java
  5. 15
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/dto/Mail_etlPageInfo.java
  6. 23
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/entity/Mail_etl.java
  7. 22
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/entity/Mail_evaluate_etl.java
  8. 10
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/mapper/Mail_EtlMapper.java
  9. 10
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/mapper/Mail_Eva_EtlMapper.java
  10. 11
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/service/MailEtlService.java
  11. 13
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/service/MailEvaEtlService.java

82
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/controller/MailEtlController.java

@ -0,0 +1,82 @@
package com.biutag.outeradmin.controller;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.outeradmin.dto.*;
import com.biutag.outeradmin.entity.Mail;
import com.biutag.outeradmin.entity.Mail_etl;
import com.biutag.outeradmin.entity.Mail_evaluate_etl;
import com.biutag.outeradmin.mapper.Mail_EtlMapper;
import com.biutag.outeradmin.mapper.Mail_Eva_EtlMapper;
import com.biutag.outeradmin.service.MailEtlService;
import com.biutag.outeradmin.util.DesensitizedUtil;
import com.biutag.util.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/mailetl")
@RestController
public class MailEtlController {
private final MailEtlService mailEtlService;
private final Mail_EtlMapper mail_EtlMapper;
private final Mail_Eva_EtlMapper mail_eva_etlMapper;
@RequestMapping("/list-submit")
public Mail_etlPageInfo siftList(@RequestBody String form) {
MailEtlFormPage mailetlFormPage = JSON.parseObject(form, MailEtlFormPage.class);
MailEtlFormData mailetlFormData = mailetlFormPage.getFormData();
if (mailetlFormPage.getSelectData().equals("mail_etl")){
QueryWrapper<Mail_etl> queryWrapper = new QueryWrapper<>();
if (mailetlFormData.getMailId()!=null){
queryWrapper.lambda().like(Mail_etl::getMailId, mailetlFormData.getMailId());
}
if (mailetlFormData.getSuccess()!=null){
queryWrapper.lambda().eq(Mail_etl::getSuccess, mailetlFormData.getSuccess());
}
if (mailetlFormData.getId()!=null){
queryWrapper.lambda().eq(Mail_etl::getId, mailetlFormData.getId());
}
PageSet pageSet = mailetlFormPage.getPageData();
Page<Mail_etl> page = new Page<>(pageSet.getCurrentPage(), pageSet.getPageSize());
List<Mail_etl> mailetlPage = mail_EtlMapper.selectPage(page, queryWrapper).getRecords();
pageSet.setTotalSize((int) page.getTotal());
Mail_etlPageInfo result = new Mail_etlPageInfo();
result.setMails(mailetlPage);
result.setPageSet(pageSet);
return result;
}else{
QueryWrapper<Mail_evaluate_etl> queryWrapper = new QueryWrapper<>();
if (mailetlFormData.getMailId()!=null){
queryWrapper.lambda().like(Mail_evaluate_etl::getMailId, mailetlFormData.getMailId());
}
if (mailetlFormData.getSuccess()!=null){
queryWrapper.lambda().eq(Mail_evaluate_etl::getSuccess, mailetlFormData.getSuccess());
}
if (mailetlFormData.getId()!=null){
queryWrapper.lambda().eq(Mail_evaluate_etl::getId, mailetlFormData.getId());
}
PageSet pageSet = mailetlFormPage.getPageData();
Page<Mail_evaluate_etl> page = new Page<>(pageSet.getCurrentPage(), pageSet.getPageSize());
List<Mail_evaluate_etl> mailetlPage = mail_eva_etlMapper.selectPage(page, queryWrapper).getRecords();
pageSet.setTotalSize((int) page.getTotal());
Mail_etlPageInfo result = new Mail_etlPageInfo();
result.setEvaMails(mailetlPage);
result.setPageSet(pageSet);
return result;
}
}
}

14
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/dto/MailEtlFormData.java

@ -0,0 +1,14 @@
package com.biutag.outeradmin.dto;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class MailEtlFormData {
private Integer id;
private String mailId;
private Boolean success;
}

11
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/dto/MailEtlFormPage.java

@ -0,0 +1,11 @@
package com.biutag.outeradmin.dto;
import lombok.Data;
@Data
public class MailEtlFormPage {
private MailEtlFormData formData;
private String selectData;
private PageSet pageData;
}

13
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/dto/Mail_EvaEtlPageInfo.java

@ -0,0 +1,13 @@
package com.biutag.outeradmin.dto;
import com.biutag.outeradmin.entity.Mail_etl;
import com.biutag.outeradmin.entity.Mail_evaluate_etl;
import lombok.Data;
import java.util.List;
@Data
public class Mail_EvaEtlPageInfo {
private List<Mail_evaluate_etl> mails;
private PageSet pageSet;
}

15
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/dto/Mail_etlPageInfo.java

@ -0,0 +1,15 @@
package com.biutag.outeradmin.dto;
import com.biutag.outeradmin.entity.Mail;
import com.biutag.outeradmin.entity.Mail_etl;
import com.biutag.outeradmin.entity.Mail_evaluate_etl;
import lombok.Data;
import java.util.List;
@Data
public class Mail_etlPageInfo {
private List<Mail_etl> mails;
private List<Mail_evaluate_etl> evaMails;
private PageSet pageSet;
}

23
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/entity/Mail_etl.java

@ -0,0 +1,23 @@
package com.biutag.outeradmin.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.sql.Timestamp;
import java.util.Date;
@Data
@TableName("mail_etl")
public class Mail_etl {
@TableId
private Integer id;
private String mailId;
private Boolean success;
private Date createTime;
private String errMsg;
}

22
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/entity/Mail_evaluate_etl.java

@ -0,0 +1,22 @@
package com.biutag.outeradmin.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName("mail_evaluate_etl")
public class Mail_evaluate_etl {
@TableId
private Integer id;
private String mailId;
private Boolean success;
private Date createTime;
private String errMsg;
}

10
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/mapper/Mail_EtlMapper.java

@ -0,0 +1,10 @@
package com.biutag.outeradmin.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.outeradmin.entity.Mail;
import com.biutag.outeradmin.entity.Mail_etl;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface Mail_EtlMapper extends BaseMapper<Mail_etl> {
}

10
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/mapper/Mail_Eva_EtlMapper.java

@ -0,0 +1,10 @@
package com.biutag.outeradmin.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.outeradmin.entity.Mail_etl;
import com.biutag.outeradmin.entity.Mail_evaluate_etl;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface Mail_Eva_EtlMapper extends BaseMapper<Mail_evaluate_etl> {
}

11
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/service/MailEtlService.java

@ -0,0 +1,11 @@
package com.biutag.outeradmin.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.outeradmin.entity.Mail_etl;
import com.biutag.outeradmin.mapper.Mail_EtlMapper;
import org.springframework.stereotype.Service;
@Service
public class MailEtlService extends ServiceImpl<Mail_EtlMapper, Mail_etl> {
}

13
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/service/MailEvaEtlService.java

@ -0,0 +1,13 @@
package com.biutag.outeradmin.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.outeradmin.entity.Mail_etl;
import com.biutag.outeradmin.entity.Mail_evaluate_etl;
import com.biutag.outeradmin.mapper.Mail_EtlMapper;
import com.biutag.outeradmin.mapper.Mail_Eva_EtlMapper;
import org.springframework.stereotype.Service;
@Service
public class MailEvaEtlService extends ServiceImpl<Mail_Eva_EtlMapper, Mail_evaluate_etl> {
}
Loading…
Cancel
Save