Merge branch 'release/3.0' into dev/dev_xp
This commit is contained in:
@@ -86,7 +86,7 @@ public class MyTaskScheduler {
|
|||||||
@Scheduled(cron = "0 0 8 * * ?")
|
@Scheduled(cron = "0 0 8 * * ?")
|
||||||
public void sendTrialOrderExcelToManagements() {
|
public void sendTrialOrderExcelToManagements() {
|
||||||
// 获取前一天日期
|
// 获取前一天日期
|
||||||
LocalDate yesterday = LocalDate.now().minusDays(3);
|
LocalDate yesterday = LocalDate.now().minusDays(1);
|
||||||
|
|
||||||
// 查询前一天的试用订单
|
// 查询前一天的试用订单
|
||||||
QueryWrapper<TrialOrder> qw = new QueryWrapper<>();
|
QueryWrapper<TrialOrder> qw = new QueryWrapper<>();
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class AuthenticationFilter extends OncePerRequestFilter {
|
|||||||
protected void doFilterInternal(HttpServletRequest httpServletRequest, @NonNull HttpServletResponse httpServletResponse, @NonNull FilterChain filterChain) throws ServletException, IOException {
|
protected void doFilterInternal(HttpServletRequest httpServletRequest, @NonNull HttpServletResponse httpServletResponse, @NonNull FilterChain filterChain) throws ServletException, IOException {
|
||||||
String requestURI = httpServletRequest.getRequestURI();
|
String requestURI = httpServletRequest.getRequestURI();
|
||||||
|
|
||||||
if (calculateUrl(requestURI)) {
|
if (calculateUrl(requestURI) || hasAuthorizationToken(httpServletRequest)) {
|
||||||
StopWatch stopWatch = new StopWatch();
|
StopWatch stopWatch = new StopWatch();
|
||||||
HttpServletRequest wrappedRequest = httpServletRequest;
|
HttpServletRequest wrappedRequest = httpServletRequest;
|
||||||
HttpServletResponse wrappedResponse = httpServletResponse;
|
HttpServletResponse wrappedResponse = httpServletResponse;
|
||||||
@@ -88,6 +88,11 @@ public class AuthenticationFilter extends OncePerRequestFilter {
|
|||||||
return null == filterUrl ? Boolean.TRUE : Boolean.FALSE;
|
return null == filterUrl ? Boolean.TRUE : Boolean.FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean hasAuthorizationToken(HttpServletRequest request) {
|
||||||
|
String authorizationHeader = request.getHeader("Authorization");
|
||||||
|
return authorizationHeader != null && authorizationHeader.startsWith("Bearer");
|
||||||
|
}
|
||||||
|
|
||||||
private void extracted(HttpServletRequest request) throws AuthenticationException {
|
private void extracted(HttpServletRequest request) throws AuthenticationException {
|
||||||
String jwtToken = request.getHeader(properties.getJwtTokenHeader());
|
String jwtToken = request.getHeader(properties.getJwtTokenHeader());
|
||||||
// log.debug("后台检查令牌:{}", jwtToken);
|
// log.debug("后台检查令牌:{}", jwtToken);
|
||||||
|
|||||||
@@ -716,6 +716,17 @@ public class PythonService {
|
|||||||
if (CollectionUtil.isEmpty(attributeRetrievalList)) {
|
if (CollectionUtil.isEmpty(attributeRetrievalList)) {
|
||||||
System.out.println(attributeRetrievalAttrDict);
|
System.out.println(attributeRetrievalAttrDict);
|
||||||
System.out.println(tableName);
|
System.out.println(tableName);
|
||||||
|
if (!StringUtils.isEmpty(style)) {
|
||||||
|
attributeRetrievalAttrDict.setType(null);
|
||||||
|
attributeRetrievalAttrDict.setOpeningType(null);
|
||||||
|
attributeRetrievalAttrDict.setSubtype(null);
|
||||||
|
attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style);
|
||||||
|
}else {
|
||||||
|
attributeRetrievalAttrDict.setType(null);
|
||||||
|
attributeRetrievalAttrDict.setOpeningType(null);
|
||||||
|
attributeRetrievalAttrDict.setSubtype(null);
|
||||||
|
attributeRetrievalList = attributeRetrievalMapper.getSystemSketchPoolBySameCategory(attributeRetrievalAttrDict, tableName, style);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return toColoectionElementList(attributeRetrievalList, styleCategory, modelSex);
|
return toColoectionElementList(attributeRetrievalList, styleCategory, modelSex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -560,7 +560,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
account.setCreateDate(new Date());
|
account.setCreateDate(new Date());
|
||||||
account.setIsTrial(1);
|
account.setIsTrial(1);
|
||||||
account.setIsBeginner(1);
|
account.setIsBeginner(1);
|
||||||
account.setSystemUser(1);
|
account.setSystemUser(3);
|
||||||
|
account.setCredits(BigDecimal.valueOf(100));
|
||||||
accountMapper.insert(account);
|
accountMapper.insert(account);
|
||||||
}
|
}
|
||||||
// 发送邮件提醒用户试用用户已创建
|
// 发送邮件提醒用户试用用户已创建
|
||||||
@@ -928,18 +929,23 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void upgradeNotification() {
|
public void upgradeNotification() {
|
||||||
|
// QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
|
||||||
|
//// queryWrapper.eq("id", 88L);
|
||||||
|
// queryWrapper.and(wrapper ->
|
||||||
|
// wrapper.gt("valid_end_time", 1720540799000L)
|
||||||
|
// .or().isNull("valid_end_time"))
|
||||||
|
// .isNotNull("user_email");
|
||||||
|
|
||||||
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<Account> queryWrapper = new QueryWrapper<>();
|
||||||
// queryWrapper.eq("id", 88L);
|
queryWrapper.lt("valid_end_time", 1720540799000L);
|
||||||
queryWrapper.and(wrapper ->
|
|
||||||
wrapper.gt("valid_end_time", 1720540799000L)
|
|
||||||
.or().isNull("valid_end_time"))
|
|
||||||
.isNotNull("user_email");
|
|
||||||
|
|
||||||
List<Account> accountList = accountMapper.selectList(queryWrapper);
|
List<Account> accountList = accountMapper.selectList(queryWrapper);
|
||||||
System.out.println(accountList);
|
System.out.println(accountList);
|
||||||
|
int i = 0;
|
||||||
for (Account account : accountList) {
|
for (Account account : accountList) {
|
||||||
// SendEmailUtil.sendUpgradeNotification(account, null, 0);
|
// SendEmailUtil.sendUpgradeNotification(account, null, 0);
|
||||||
// SendEmailUtil.sendUpgradeNotification(account, null, 1);
|
// SendEmailUtil.sendUpgradeNotification(account, null, 1);
|
||||||
|
if (i > 6) {
|
||||||
if (account.getLanguage().equals(Language.CHINESE_SIMPLIFIED.name())) {
|
if (account.getLanguage().equals(Language.CHINESE_SIMPLIFIED.name())) {
|
||||||
SendEmailUtil.sendUpgradeNotification(account, null, 0);
|
SendEmailUtil.sendUpgradeNotification(account, null, 0);
|
||||||
} else {
|
} else {
|
||||||
@@ -947,6 +953,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
SendEmailUtil.sendUpgradeNotification(account, null, 1);
|
SendEmailUtil.sendUpgradeNotification(account, null, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
i ++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user