TASK:十月优惠邮件发送接口;
This commit is contained in:
@@ -1039,6 +1039,40 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void halfPricePromotion() {
|
||||||
|
|
||||||
|
// 所有试用用户 不管过没过期 所有转为游客的正式用户以及试用用户
|
||||||
|
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
|
||||||
|
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);
|
||||||
|
log.info("十月优惠邮件名单:" + 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);
|
||||||
|
}
|
||||||
|
}catch (Exception e) {
|
||||||
|
log.info(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i ++;
|
||||||
|
log.info("十月优惠邮件成功发送第" + i + "条");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void moveLibraryDate() {
|
public void moveLibraryDate() {
|
||||||
// 查询生产全部library数据,遍历数据,根据用户id和md5查询是否已经迁移过
|
// 查询生产全部library数据,遍历数据,根据用户id和md5查询是否已经迁移过
|
||||||
|
|||||||
Reference in New Issue
Block a user