升级JDK到21
This commit is contained in:
@@ -13,9 +13,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.ai.da.service;
|
||||
|
||||
import com.ai.da.model.dto.ProductPurchaseDTO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
public interface AliPayService {
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.ai.da.service;
|
||||
import com.ai.da.model.dto.AlipayHKCallbackDTO;
|
||||
import com.ai.da.model.dto.ProductPurchaseDTO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
public interface AlipayHKService {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.ai.da.model.vo.QueryUserConditionsVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -1,27 +1,12 @@
|
||||
package com.ai.da.service;
|
||||
|
||||
import com.ai.da.common.response.PageBaseResponse;
|
||||
import com.ai.da.common.response.Response;
|
||||
import com.ai.da.mapper.primary.entity.Account;
|
||||
import com.ai.da.mapper.primary.entity.AccountExtend;
|
||||
import com.ai.da.mapper.primary.entity.ChatMessage;
|
||||
import com.ai.da.mapper.primary.entity.TrialOrder;
|
||||
import com.ai.da.model.dto.*;
|
||||
import com.ai.da.model.vo.AccountLoginVO;
|
||||
import com.ai.da.model.vo.AccountPreLoginVO;
|
||||
import com.ai.da.model.vo.BindEmailVO;
|
||||
import com.ai.da.model.vo.PersonalHomepageVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 服务类
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.ai.da.mapper.primary.entity.OrderInfo;
|
||||
import com.ai.da.model.dto.QueryPageByTimeDTO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
public interface OrderInfoService extends IService<OrderInfo> {
|
||||
|
||||
@@ -4,9 +4,9 @@ import com.ai.da.model.dto.ProductPurchaseDTO;
|
||||
import com.paypal.http.exceptions.SerializeException;
|
||||
import com.paypal.orders.Order;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.ai.da.model.vo.CheckCouponsVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.stripe.exception.StripeException;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.ai.da.model.dto.TrialOrderDTO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
public interface TrialOrderService extends IService<TrialOrder> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import io.minio.errors.MinioException;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -47,11 +48,11 @@ import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
import javax.sql.DataSource;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -94,9 +95,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
@Resource
|
||||
private AccountLoginLogService accountLoginLogService;
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private ConvenientInquiryService convenientInquiryService;
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private LibraryService libraryService;
|
||||
|
||||
@@ -115,6 +118,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
@Resource
|
||||
private QuestionnaireMapper questionnaireMapper;
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private CreditsService creditsService;
|
||||
|
||||
@@ -137,9 +141,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private StripeService stripeService;
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private AffiliateService affiliateService;
|
||||
|
||||
@@ -201,6 +207,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
return new AccountPreLoginVO(account.getId());
|
||||
}
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private PortfolioService portfolioService;
|
||||
|
||||
|
||||
@@ -25,10 +25,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mysql.cj.util.StringUtils;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -52,6 +53,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
|
||||
private PaymentInfoService paymentInfoService;
|
||||
@Resource
|
||||
private SubscriptionInfoMapper subscriptionInfoMapper;
|
||||
@Lazy
|
||||
@Resource
|
||||
private ReferralService referralService;
|
||||
@Resource
|
||||
|
||||
@@ -23,8 +23,8 @@ import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -20,8 +20,8 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.ai.da.common.enums.LibraryLevel1TypeEnum;
|
||||
import com.ai.da.common.utils.CopyUtil;
|
||||
import com.ai.da.common.utils.MD5Utils;
|
||||
import com.ai.da.common.utils.MinioUtil;
|
||||
import com.ai.da.common.utils.S3Util;
|
||||
import com.ai.da.mapper.primary.AccountMapper;
|
||||
import com.ai.da.mapper.primary.LibraryMapper;
|
||||
import com.ai.da.mapper.primary.entity.Account;
|
||||
@@ -39,7 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
@@ -13,8 +13,6 @@ import com.ai.da.mapper.primary.ClassificationRelLibraryMapper;
|
||||
import com.ai.da.mapper.primary.entity.Classification;
|
||||
import com.ai.da.mapper.primary.entity.ClassificationRelLibrary;
|
||||
import com.ai.da.model.dto.ClassificationDTO;
|
||||
import com.ai.da.model.enums.DesignElementsEnum;
|
||||
import com.ai.da.model.enums.Language;
|
||||
import com.ai.da.model.vo.AuthPrincipalVo;
|
||||
import com.ai.da.model.vo.ClassificationVO;
|
||||
import com.ai.da.service.ClassificationService;
|
||||
@@ -23,7 +21,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
package com.ai.da.service.impl;
|
||||
|
||||
import com.ai.da.mapper.primary.AccountMapper;
|
||||
import com.ai.da.mapper.primary.CloudTaskMapper;
|
||||
import com.ai.da.mapper.primary.entity.Account;
|
||||
import com.ai.da.mapper.primary.entity.CloudTask;
|
||||
import com.ai.da.service.ClassificationService;
|
||||
import com.ai.da.service.CloudTaskService;
|
||||
import com.ai.da.service.CreditsService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@Lazy
|
||||
public class CloudTaskServiceImpl extends ServiceImpl<CloudTaskMapper, CloudTask> implements CloudTaskService {
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private CreditsService creditsService;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
|
||||
@@ -33,11 +33,12 @@ import io.netty.util.internal.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.xssf.usermodel.*;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
@@ -60,6 +61,7 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
|
||||
private GenerateMapper generateMapper;
|
||||
@Resource
|
||||
private ToProductImageResultMapper toProductImageResultMapper;
|
||||
@Lazy
|
||||
@Resource
|
||||
private DesignService designService;
|
||||
@Resource
|
||||
|
||||
@@ -22,10 +22,11 @@ import io.netty.util.internal.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -39,6 +40,7 @@ public class CreditsServiceImpl extends ServiceImpl<CreditsDetailMapper, Credits
|
||||
@Value("${redis.key.credits.pre-deduction}")
|
||||
private String creditsDeduction;
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
@Resource
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
||||
@@ -39,7 +39,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -19,12 +19,13 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.core.io.InputStreamSource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.internet.AddressException;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.mail.MessagingException;
|
||||
import jakarta.mail.internet.AddressException;
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@@ -45,6 +46,7 @@ public class EmailServiceImpl implements EmailService {
|
||||
private EmailTemplateMapper emailTemplateMapper;
|
||||
@Resource
|
||||
private EmailLogMapper emailLogMapper;
|
||||
@Lazy
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
@Resource
|
||||
|
||||
@@ -62,7 +62,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,8 +25,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.google.common.collect.Maps;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -30,8 +30,6 @@ public class PanToneServiceImpl extends ServiceImpl<PanToneMapper, PanTone> impl
|
||||
@Resource
|
||||
private PanToneMapper panToneMapper;
|
||||
@Resource
|
||||
private PanToneService panToneService;
|
||||
@Resource
|
||||
private ColorLoopUpTableService colorLoopUpTableService;
|
||||
|
||||
@Override
|
||||
@@ -139,7 +137,7 @@ public class PanToneServiceImpl extends ServiceImpl<PanToneMapper, PanTone> impl
|
||||
|
||||
// 3. 查询 Pantone 数据
|
||||
Set<Integer> colorIndexes = colorIndexRgb.keySet();
|
||||
List<PanTone> panTones = panToneService.listByIds(colorIndexes);
|
||||
List<PanTone> panTones = this.listByIds(colorIndexes);
|
||||
|
||||
// 4. 将 PanTone 转换为 PantoneVO,并处理缺失的 Pantone 数据
|
||||
Map<Integer, PantoneVO> pantoneVOMap = new HashMap<>();
|
||||
|
||||
@@ -27,15 +27,16 @@ import com.paypal.payments.CapturesRefundRequest;
|
||||
import com.paypal.payments.RefundRequest;
|
||||
import com.paypal.payments.RefundsGetRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -71,6 +72,7 @@ public class PayPalCheckoutServiceImpl implements PayPalCheckoutService {
|
||||
private PayPalClient payPalClient;
|
||||
@Resource
|
||||
private OrderInfoService orderInfoService;
|
||||
@Lazy
|
||||
@Resource
|
||||
private PaymentInfoService paymentInfoService;
|
||||
@Resource
|
||||
|
||||
@@ -25,12 +25,13 @@ import com.stripe.model.Subscription;
|
||||
import com.stripe.model.checkout.Session;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -44,6 +45,7 @@ import java.util.Objects;
|
||||
@Slf4j
|
||||
public class PaymentInfoServiceImpl extends ServiceImpl<PaymentInfoMapper, PaymentInfo> implements PaymentInfoService {
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private StripeService stripeService;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -13,7 +13,7 @@ import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -18,7 +18,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.YearMonth;
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.stripe.model.Refund;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -37,12 +37,13 @@ import com.stripe.param.*;
|
||||
import com.stripe.param.checkout.SessionCreateParams;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.Instant;
|
||||
@@ -59,10 +60,13 @@ public class StripeServiceImpl implements StripeService {
|
||||
|
||||
@Resource
|
||||
private OrderInfoService orderInfoService;
|
||||
@Lazy
|
||||
@Resource
|
||||
private PayPalCheckoutService payPalCheckoutService;
|
||||
@Lazy
|
||||
@Resource
|
||||
private PaymentInfoService paymentInfoService;
|
||||
@Lazy
|
||||
@Resource
|
||||
private CreditsService creditsService;
|
||||
@Resource
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import io.netty.util.internal.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -57,15 +57,15 @@ public class TDesignPythonOutfitDetailServiceImpl extends ServiceImpl<TDesignPyt
|
||||
}
|
||||
|
||||
DesignPythonOutfitVO designPythonOutfitVO = CopyUtil.copyObject(detail, DesignPythonOutfitVO.class);
|
||||
designPythonOutfitVO.setPosition(StringUtil.isNullOrEmpty(detail.getPosition()) ? null : (List<Long>) JSON.parse(detail.getPosition()));
|
||||
designPythonOutfitVO.setImageSize(StringUtil.isNullOrEmpty(detail.getImageSize()) ? null : (List<Long>) JSON.parse(detail.getImageSize()));
|
||||
designPythonOutfitVO.setPosition(parseLongList(detail.getPosition()));
|
||||
designPythonOutfitVO.setImageSize(parseLongList(detail.getImageSize()));
|
||||
designPythonOutfitVO.setImageUrl(StringUtil.isNullOrEmpty(detail.getImageUrl()) ? null : minioUtil.getPreSignedUrl(detail.getImageUrl(), 24 * 60));
|
||||
designPythonOutfitVO.setImageMinioUrl(StringUtil.isNullOrEmpty(detail.getImageUrl()) ? null : detail.getImageUrl());
|
||||
designPythonOutfitVO.setMaskUrl(StringUtil.isNullOrEmpty(detail.getMaskUrl()) ? null : minioUtil.getPreSignedUrl(detail.getMaskUrl(), 24 * 60));
|
||||
designPythonOutfitVO.setMaskMinioUrl(StringUtil.isNullOrEmpty(detail.getMaskUrl()) ? null : detail.getMaskUrl());
|
||||
// designPythonOutfitVO.setScale(Float.parseFloat(detail.getScale()));
|
||||
designPythonOutfitVO.setScale(modifyScale(detail.getScale()));
|
||||
designPythonOutfitVO.setOffset(StringUtil.isNullOrEmpty(detail.getOffset()) ? Arrays.asList(0L, 0L) : (List<Long>) JSON.parse(detail.getOffset()));
|
||||
designPythonOutfitVO.setOffset(StringUtil.isNullOrEmpty(detail.getOffset()) ? Arrays.asList(0L, 0L) : parseLongList(detail.getOffset()));
|
||||
designPythonOutfitVO.setPriority(Math.abs(detail.getPriority()));
|
||||
// designPythonOutfitVO.setOffset(CollectionUtil.isEmpty(offset) ? Arrays.asList(0L, 0L) : offset);
|
||||
|
||||
@@ -107,6 +107,16 @@ public class TDesignPythonOutfitDetailServiceImpl extends ServiceImpl<TDesignPyt
|
||||
return scaleFloat;
|
||||
}
|
||||
|
||||
/**
|
||||
* fastjson 默认把整型反序列化成 Integer,这里统一转成 Long 避免 toJSONString ClassCast 异常。
|
||||
*/
|
||||
private List<Long> parseLongList(String raw) {
|
||||
if (StringUtil.isNullOrEmpty(raw)) {
|
||||
return null;
|
||||
}
|
||||
return JSON.parseArray(raw, Long.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByDesignPythonOutfitIdLogical(Long designPythonOutfitId) {
|
||||
UpdateWrapper<TDesignPythonOutfitDetail> updateWrapper = new UpdateWrapper<>();
|
||||
|
||||
@@ -20,10 +20,11 @@ import io.netty.util.internal.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.lang.reflect.Type;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
@@ -41,6 +42,7 @@ public class TaskListServiceImpl extends ServiceImpl<TaskListMapper, TaskList> i
|
||||
@Resource
|
||||
private MinioUtil minioUtil;
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private SuperResolutionService superResolutionService;
|
||||
|
||||
|
||||
@@ -24,10 +24,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.*;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
@@ -39,8 +40,10 @@ public class TrialOrderServiceImpl extends ServiceImpl<TrialOrderMapper, TrialOr
|
||||
|
||||
@Resource
|
||||
private AccountMapper accountMapper;
|
||||
@Lazy
|
||||
@Resource
|
||||
private LibraryService libraryService;
|
||||
@Lazy
|
||||
@Resource
|
||||
private UserLikeGroupService userLikeGroupService;
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
@@ -35,9 +35,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
@@ -91,8 +90,6 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
|
||||
@Resource
|
||||
private SysFileService sysFileService;
|
||||
@Resource
|
||||
private WorkspaceService workspaceService;
|
||||
|
||||
@Resource
|
||||
private CollectionElementMapper collectionElementMapper;
|
||||
@@ -516,7 +513,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
boolean b = minioUtil.doesObjectExist(bucketName, uploadMinioPath);
|
||||
if (!b) {
|
||||
FileItem a = getMultipartFile(file, file.getName());
|
||||
MultipartFile multipartFile = new CommonsMultipartFile(a);
|
||||
MultipartFile multipartFile = FileUtil.fileItemToMultipartFile(a);
|
||||
minioUtil.upload(bucketName, uploadMinioPath, multipartFile, "");
|
||||
}
|
||||
sysFile.setUrl(bucketName + "/" + uploadMinioPath);
|
||||
@@ -548,7 +545,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
boolean b = minioUtil.doesObjectExist(bucketName, sb.toString());
|
||||
if (!b) {
|
||||
FileItem a = getMultipartFile(file, file.getName());
|
||||
MultipartFile multipartFile = new CommonsMultipartFile(a);
|
||||
MultipartFile multipartFile = FileUtil.fileItemToMultipartFile(a);
|
||||
minioUtil.upload(bucketName, sb.toString(), multipartFile, "");
|
||||
}
|
||||
o.setUrl(bucketName + "/" + sb);
|
||||
@@ -711,7 +708,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
sysFile.setId(null);
|
||||
sysFileMapper.insert(sysFile);
|
||||
FileItem a = getMultipartFile(pngFile, fileName);
|
||||
MultipartFile multipartFile = new CommonsMultipartFile(a);
|
||||
MultipartFile multipartFile = FileUtil.fileItemToMultipartFile(a);
|
||||
minioUtil.upload(url.substring(0, 14), url.substring(15), multipartFile, "");
|
||||
System.out.println("上传成功url:" + url);
|
||||
if (absolutePath.contains("unisex")) {
|
||||
@@ -777,7 +774,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
// minioUtil.upload(bucketName, uploadMinioPath, multipartFile, "");
|
||||
// }
|
||||
FileItem a = getMultipartFile(pngFile, fileName);
|
||||
MultipartFile multipartFile = new CommonsMultipartFile(a);
|
||||
MultipartFile multipartFile = FileUtil.fileItemToMultipartFile(a);
|
||||
minioUtil.upload(url.substring(0, 14), url.substring(15), multipartFile, "");
|
||||
sysFile.setCreateDate(new Date());
|
||||
sysFileMapper.insert(sysFile);
|
||||
@@ -915,8 +912,8 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
workspaceRelStyleMapper.deleteBatchIds(workspaceRelStyles);
|
||||
}
|
||||
}
|
||||
Long workspaceId = workspaceService.getByProjectId(projectId);
|
||||
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(workspaceId);
|
||||
Long workspaceId = this.getByProjectId(projectId);
|
||||
WorkspaceVO byIdForProject = this.getByIdForProject(workspaceId);
|
||||
vo.setWorkspaceVO(byIdForProject);
|
||||
}
|
||||
vo.setId(projectId);
|
||||
@@ -977,7 +974,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
rel.setStyleId(projectDTO.getStyleId());
|
||||
workspaceRelStyleMapper.insert(rel);
|
||||
}
|
||||
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(workspace.getId());
|
||||
WorkspaceVO byIdForProject = this.getByIdForProject(workspace.getId());
|
||||
vo.setWorkspaceVO(byIdForProject);
|
||||
}
|
||||
vo.setId(project.getId());
|
||||
|
||||
Reference in New Issue
Block a user