|
|
@@ -7,7 +7,6 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
import cn.hutool.http.HttpResponse;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
-import com.cyksj.common.constant.Constant;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.common.util.Jsons;
|
|
|
import com.cyksj.common.util.StringUtil;
|
|
|
@@ -27,7 +26,6 @@ import javax.annotation.PostConstruct;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 项目名: yhlxj2
|
|
|
@@ -79,7 +77,7 @@ public class CuiQiuMailServiceImpl implements CuiQiuMailService {
|
|
|
params.put("mail_id", mailId);
|
|
|
params.put("start_time", DateUtil.offsetDay(now, -1).toDateStr());
|
|
|
params.put("end_time", DateUtil.offsetDay(now, 1).toDateStr());
|
|
|
-// params.put("to", email);
|
|
|
+ params.put("to", email);
|
|
|
params.put("limit", 10);
|
|
|
|
|
|
HttpRequest post = HttpUtil.createPost(url);
|
|
|
@@ -91,29 +89,29 @@ public class CuiQiuMailServiceImpl implements CuiQiuMailService {
|
|
|
}
|
|
|
List<CuiQiuEmailDto> list = resultDto.getData().getList();
|
|
|
//获取邮箱对应的邮件
|
|
|
- list = list.stream().filter(emailInfo -> {
|
|
|
- CuiQiuEmailDto.CuiQiuUser from = emailInfo.getFrom().get(0);
|
|
|
- CuiQiuEmailDto.CuiQiuUser to = emailInfo.getTo().get(0);
|
|
|
- CuiQiuEmailDto.CuiQiuUser cuiQiuUser = emailInfo.getTo().get(0);
|
|
|
- if (StrUtil.equalsIgnoreCase(cuiQiuUser.getAddress(), email)) {
|
|
|
- String toEmail = to.getAddress();
|
|
|
- //通过直达邮件判断
|
|
|
- if (StrUtil.equals(toEmail, email) || StrUtil.equals(toEmail, relateEmail)) {
|
|
|
- //PS
|
|
|
- if (Constant.PS_GIDS.contains(goodsId) && from.getName().contains(Constant.PS_ADOBE)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- //Disney
|
|
|
- if (goodsId == Constant.DISNEY_GID && from.getName().contains(Constant.DISNEY)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- if (goodsId == Constant.NETFLIX_GID && from.getName().contains(Constant.NETFLIX)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- }).collect(Collectors.toList());
|
|
|
+// list = list.stream().filter(emailInfo -> {
|
|
|
+// CuiQiuEmailDto.CuiQiuUser from = emailInfo.getFrom().get(0);
|
|
|
+// CuiQiuEmailDto.CuiQiuUser to = emailInfo.getTo().get(0);
|
|
|
+// CuiQiuEmailDto.CuiQiuUser cuiQiuUser = emailInfo.getTo().get(0);
|
|
|
+// if (StrUtil.equalsIgnoreCase(cuiQiuUser.getAddress(), email)) {
|
|
|
+// String toEmail = to.getAddress();
|
|
|
+// //通过直达邮件判断
|
|
|
+// if (StrUtil.equals(toEmail, email) || StrUtil.equals(toEmail, relateEmail)) {
|
|
|
+// //PS
|
|
|
+// if (Constant.PS_GIDS.contains(goodsId) && from.getName().contains(Constant.PS_ADOBE)) {
|
|
|
+// return true;
|
|
|
+// }
|
|
|
+// //Disney
|
|
|
+// if (goodsId == Constant.DISNEY_GID && from.getName().contains(Constant.DISNEY)) {
|
|
|
+// return true;
|
|
|
+// }
|
|
|
+// if (goodsId == Constant.NETFLIX_GID && from.getName().contains(Constant.NETFLIX)) {
|
|
|
+// return true;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// return false;
|
|
|
+// }).collect(Collectors.toList());
|
|
|
|
|
|
if (CollUtil.isNotEmpty(list)) {
|
|
|
for (CuiQiuEmailDto CuiQiuEmailDto : list) {
|