TASK:AiDA workshop活动;

This commit is contained in:
shahaibo
2024-10-08 13:17:55 +08:00
parent c27ca77717
commit d9118aaf93
2 changed files with 69 additions and 16 deletions

View File

@@ -719,8 +719,8 @@ public class SendEmailUtil {
}
}
private final static Long HALFPRICEPROMOTION_CN_ID = 128556L;
private final static Long HALFPRICEPROMOTION_EN_ID = 128557L;
private final static Long HALFPRICEPROMOTION_CN_ID = 128582L;
private final static Long HALFPRICEPROMOTION_EN_ID = 128583L;
public static void halfPricePromotion(Account account, String senderAddress, int type) {
try {
// 实例化一个认证对象
@@ -748,10 +748,10 @@ public class SendEmailUtil {
// template.setTemplateID(UPGRADE_NOTIFICATION_ID_CHINESE);
// }
if (type == 1) {
subject = "AiDA Limited Time Offer";
subject = "AiDA workshop - Win a trip to Hong Kong";
template.setTemplateID(HALFPRICEPROMOTION_EN_ID);
}else {
subject = "AiDA国庆优惠活动";
subject = "AiDA workshop - 赢取香港之旅";
template.setTemplateID(HALFPRICEPROMOTION_CN_ID);
}
template.setTemplateData(buildAccountData(account));

View File

@@ -1044,28 +1044,81 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
// 所有试用用户 不管过没过期 所有转为游客的正式用户以及试用用户
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Account::getSystemUser, 3);
queryWrapper.lambda().ne(Account::getSystemUser, 0);
queryWrapper.lambda().isNotNull(Account::getUserEmail);
List<Account> accountList = accountMapper.selectList(queryWrapper);
List<Account> halfPricePromotionList = new ArrayList<>(accountList);
// queryWrapper.lambda().eq(Account::getSystemUser, 3);
// List<Account> accountList = accountMapper.selectList(queryWrapper);
//
// List<Account> halfPricePromotionList = new ArrayList<>(accountList);
//
// QueryWrapper<Account> queryWrapper1 = new QueryWrapper<>();
// queryWrapper1.lambda().eq(Account::getSystemUser, 0);
// queryWrapper1.lambda().isNotNull(Account::getValidStartTime);
// List<Account> accountList1 = accountMapper.selectList(queryWrapper1);
// halfPricePromotionList.addAll(accountList1);
QueryWrapper<Account> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().eq(Account::getSystemUser, 0);
queryWrapper1.lambda().isNotNull(Account::getValidStartTime);
List<Account> accountList1 = accountMapper.selectList(queryWrapper1);
halfPricePromotionList.addAll(accountList1);
log.info("十月优惠邮件名单:" + JSON.toJSONString(halfPricePromotionList));
// List<String> sendUserEmail = halfPricePromotionList.stream().map(Account::getUserEmail).collect(Collectors.toList());
// log.info(JSON.toJSONString(sendUserEmail));
List<String> emailList = Arrays.asList(
"xingxingzou@aidlab.hk", "kaicpang.pang@connect.polyu.hk", "21122693r@connect.polyu.hk",
"fangjianliao@aidlab.hk", "kimwong@code-create.com.hk", "aixfashion@aidlab.hk",
"cobracreation@netvigator.com", "dongmei.mo@connect.polyu.hk", "Angel@angelchen.com",
"carlovolpi@upwhk.com", "houdeyumail@gmail.com", "luluwangwk@gmail.com", "Kuochitkuo@gmail.com",
"mgl220053@gmail.com", "lamheimanwendy@gmail.com", "millamhy@hotmail.com",
"cshirleyshirley3@gmail.com", "puipui07130713@gmail.com", "19054532d@connect.polyu.hk",
"20064811d@connect.polyu.hk", "20061894D@connect.polyu.hk", "20051773d@connect.polyu.hk",
"nlourens@truworths.co.za", "mandychan@aidlab.hk", "calvinwong@aidlab.hk", "mkt.gp@aidlab.hk",
"winniechan@aidlab.hk", "Avis.chung@viviennetam.com.hk", "teresa@viviennetam.com.hk",
"X1627315083@163.com", "Sharon.Tsui@hongkong.messefrankfurt.com", "xupei3360@163.com",
"shahaibodd99@gmail.com", "zchengrong@yeah.net", "mavistse@vtc.edu.hk",
"fashionxai.demo@gmail.com", "savus@konkuk.ac.kr", "arthur.chan@vtc.edu.hk", "Ankh.yiu@tienhu.com",
"tvicente@ripleyhk.com", "aida@hkfda.org", "mark.thompson@leverstyle.com",
"julianapiccininim@gmail.com", "siriusace38@gmail.com", "kittingchoi@aidlab.hk", "cnewhj@126.com",
"youis14@sina.com", "mandyyyuk@gmail.com", "JadePoon@frontline.com.hk", "ritachen@csc-groups.com",
"derrickcheng@ygmtrading.com", "karen11066827@gmail.com", "cathy.wong@alvanon.com",
"maggie.guo@xxhtech.com", "morris.mamiye@mambro.com", "sky@taihill.vc", "lokchun.com@gmail.com",
"t-mavistse@stu.vtc.edu.hk", "CFLAIDA@cflhk.com", "kim_wong_99@yahoo.com", "dltnwls6061@gmail.com",
"jsj000904@naver.com", "leelokyin@naver.com", "rin2.200088@gmail.com", "setinares@gmail.com",
"ysy6016@gmail.com", "ziniko104@gmail.com", "soooo8404@gmail.com", "hanbinna0613@nate.com",
"leeapparel71@gmail.com", "miriammiraekim@gmail.com", "coffeeling@icloud.com",
"klilb13997@gmail.com", "badriyah.alharthi@gmail.com", "laurenrawbone@woolworths.co.za",
"georgeashcroft@yahoo.co.uk", "salahraghadddaaa@gmail.com", "wuhengchee@gmail.com",
"gigiwu33@hotmail.com", "wuhengchee@yahoo.com.hk", "willis@zavvy-ave.com", "102561143@qq.com",
"3352798788@qq.com", "3428163743@qq.com", "1933674928@qq.com", "fengjie980923@163.com",
"502565733@qq.com", "3506556587@qq.com", "964664177@qq.com", "3123416129@qq.com",
"1627315082@qq.com", "ra129364@uem.br", "kristytsang623@gmail.com", "2122413626@qq.com",
"kongxinliaobiao@163.com", "1916606467@qq.com", "suhang2001411@gmail.com",
"2048374531@qq.com", "2257158028@qq.com", "1290989834@qq.com", "3315547200@qq.com",
"1011544060@qq.com", "1512170380@qq.com", "newagegoodyouth@gmail.com",
"isadorasilva2106@gmail.com", "3276879691@qq.com", "dsl@rasl.net", "2693383459@qq.com",
"zaiven@gmail.com", "2990670940@qq.com", "3057762191@qq.com", "3265315306@qq.com",
"2571543589@qq.com", "871210016@qq.com", "wwtwzx@live.cn", "1248609518@qq.com",
"1309757247@qq.com", "15920129936@163.com", "48485720@qq.com", "1372397040@qq.com",
"130320126@qq.com", "soomeiqi@gmail.com", "3305671192@qq.com", "2859439611@qq.com",
"1604753494@qq.com", "2979519992@qq.com", "2787394282@qq.com", "nfzy0215@126.com",
"2323278768@qq.com"
);
log.info("AiDA workshop 活动通知名单:" + JSON.toJSONString(halfPricePromotionList));
int i = 0;
for (Account account : halfPricePromotionList) {
if (i > 53) {
try {
if (account.getLanguage().equals(Language.CHINESE_SIMPLIFIED.name())) {
SendEmailUtil.halfPricePromotion(account, null, 0);
}else {
SendEmailUtil.halfPricePromotion(account, null, 1);
if (i >= 0) {
if (!emailList.contains(account.getUserEmail())) {
try {
if (account.getLanguage().equals(Language.CHINESE_SIMPLIFIED.name())) {
SendEmailUtil.halfPricePromotion(account, null, 0);
}else {
SendEmailUtil.halfPricePromotion(account, null, 1);
}
}catch (Exception e) {
log.info(e.getMessage());
}
}catch (Exception e) {
log.info(e.getMessage());
}
}
i ++;