TASK:AiDA workshop活动;
This commit is contained in:
@@ -719,8 +719,8 @@ public class SendEmailUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static Long HALFPRICEPROMOTION_CN_ID = 128556L;
|
private final static Long HALFPRICEPROMOTION_CN_ID = 128582L;
|
||||||
private final static Long HALFPRICEPROMOTION_EN_ID = 128557L;
|
private final static Long HALFPRICEPROMOTION_EN_ID = 128583L;
|
||||||
public static void halfPricePromotion(Account account, String senderAddress, int type) {
|
public static void halfPricePromotion(Account account, String senderAddress, int type) {
|
||||||
try {
|
try {
|
||||||
// 实例化一个认证对象
|
// 实例化一个认证对象
|
||||||
@@ -748,10 +748,10 @@ public class SendEmailUtil {
|
|||||||
// template.setTemplateID(UPGRADE_NOTIFICATION_ID_CHINESE);
|
// template.setTemplateID(UPGRADE_NOTIFICATION_ID_CHINESE);
|
||||||
// }
|
// }
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
subject = "AiDA Limited Time Offer";
|
subject = "AiDA workshop - Win a trip to Hong Kong!";
|
||||||
template.setTemplateID(HALFPRICEPROMOTION_EN_ID);
|
template.setTemplateID(HALFPRICEPROMOTION_EN_ID);
|
||||||
}else {
|
}else {
|
||||||
subject = "AiDA国庆优惠活动";
|
subject = "AiDA workshop - 赢取香港之旅";
|
||||||
template.setTemplateID(HALFPRICEPROMOTION_CN_ID);
|
template.setTemplateID(HALFPRICEPROMOTION_CN_ID);
|
||||||
}
|
}
|
||||||
template.setTemplateData(buildAccountData(account));
|
template.setTemplateData(buildAccountData(account));
|
||||||
|
|||||||
@@ -1044,20 +1044,72 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
|
|
||||||
// 所有试用用户 不管过没过期 所有转为游客的正式用户以及试用用户
|
// 所有试用用户 不管过没过期 所有转为游客的正式用户以及试用用户
|
||||||
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
|
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> accountList = accountMapper.selectList(queryWrapper);
|
||||||
|
|
||||||
List<Account> halfPricePromotionList = new ArrayList<>(accountList);
|
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<>();
|
QueryWrapper<Account> queryWrapper1 = new QueryWrapper<>();
|
||||||
queryWrapper1.lambda().eq(Account::getSystemUser, 0);
|
queryWrapper1.lambda().eq(Account::getSystemUser, 0);
|
||||||
queryWrapper1.lambda().isNotNull(Account::getValidStartTime);
|
queryWrapper1.lambda().isNotNull(Account::getValidStartTime);
|
||||||
List<Account> accountList1 = accountMapper.selectList(queryWrapper1);
|
List<Account> accountList1 = accountMapper.selectList(queryWrapper1);
|
||||||
halfPricePromotionList.addAll(accountList1);
|
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;
|
int i = 0;
|
||||||
for (Account account : halfPricePromotionList) {
|
for (Account account : halfPricePromotionList) {
|
||||||
if (i > 53) {
|
if (i >= 0) {
|
||||||
|
if (!emailList.contains(account.getUserEmail())) {
|
||||||
try {
|
try {
|
||||||
if (account.getLanguage().equals(Language.CHINESE_SIMPLIFIED.name())) {
|
if (account.getLanguage().equals(Language.CHINESE_SIMPLIFIED.name())) {
|
||||||
SendEmailUtil.halfPricePromotion(account, null, 0);
|
SendEmailUtil.halfPricePromotion(account, null, 0);
|
||||||
@@ -1068,6 +1120,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
log.info(e.getMessage());
|
log.info(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
i ++;
|
i ++;
|
||||||
log.info("十月优惠邮件成功发送第" + i + "条");
|
log.info("十月优惠邮件成功发送第" + i + "条");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user