Merge branch 'dev/dev_xp' into dev/3.1_release_merge

# Conflicts:
#	src/main/java/com/ai/da/common/config/MyTaskScheduler.java
#	src/main/java/com/ai/da/common/task/PaymentTask.java
This commit is contained in:
2025-11-05 16:51:41 +08:00
9 changed files with 26 additions and 19 deletions

View File

@@ -164,7 +164,7 @@ public class MyTaskScheduler {
// 定时任务,每十五天执行一次
// @Scheduled(cron = "0 0 0 ? * MON")
@Scheduled(cron = "0 0 0 */15 * ?")
// @Scheduled(cron = "0 0 0 */15 * ?")
public void checkExpiry() {
// 检测正式用户是否快要过期
QueryWrapper<Account> qw = new QueryWrapper<>();
@@ -200,7 +200,7 @@ public class MyTaskScheduler {
}
}
}
@Scheduled(cron = "0 0 9 * * ?")
// @Scheduled(cron = "0 0 9 * * ?")
public void sendTrialOrderExcelToManagements() {
// 获取前一天日期
LocalDate yesterday = LocalDate.now().minusDays(1);

View File

@@ -31,7 +31,7 @@ public class AccountTask {
accountService.refreshCreditsMonthly();
}
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
public void getPaidUser() {
// 获取code-create 表中 指定日期之后 订单状态为wc-processing的订单
accountService.extendValidityForCC();

View File

@@ -104,7 +104,7 @@ public class PaymentTask {
}
// 定时同步(每分钟一次)
@Scheduled(fixedRate = 60000)
// @Scheduled(fixedRate = 60000)
public void syncLinkViewCountToDB(){
affiliateService.syncLinkViewCountToDB();
}
@@ -120,7 +120,7 @@ public class PaymentTask {
}
}
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
public void calcCouponsCommission(){
log.info("优惠券佣金计算定时器");
affiliateService.calcCouponsCommission();

View File

@@ -766,7 +766,7 @@ public class SendEmailUtil {
try {
String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com";
String[] receiverEmail = {merchantEmail, developer};
String[] receiverEmail = {/*merchantEmail,*/ developer};
Credential cred = new Credential(SECRET_ID, SECRET_KEy);
// 实例化一个http选项可选的没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
@@ -937,7 +937,7 @@ public class SendEmailUtil {
req.setFromEmailAddress(SEND_ADDRESS);
String merchantEmail = "kimwong@code-create.com.hk";
String developerEmail = "xupei@code-create.com.hk";
req.setDestination(new String[]{merchantEmail, developerEmail});
req.setDestination(new String[]{/*merchantEmail,*/ developerEmail});
Template template = new Template();
req.setSubject("New Credit Purchase Order");
template.setTemplateID(CREDITS_PURCHASE_MERCHANT);

View File

@@ -82,7 +82,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
// 邮件通知审批者
String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com";
String[] receiverEmail = {merchantEmail, developer};
String[] receiverEmail = {/*merchantEmail,*/ developer};
SendEmailUtil.affiliateEmailReminder(receiverEmail, new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
// emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
}else {
@@ -389,7 +389,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com";
String[] receiverEmail = {merchantEmail, developer};
String[] receiverEmail = {/*merchantEmail,*/ developer};
// 邮件通知
SendEmailUtil.affiliateEmailReminder(receiverEmail, affiliateEmailParamsDTO, "summary");
// emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), affiliateEmailParamsDTO, "summary");

View File

@@ -573,7 +573,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
// 画笔修改的sketch截图 上传后替换path
// 由于用户在系统或自己上传sketch的基础上修改过的衣服再次修改后第一次修改的衣服不会回到某个池子被再次利用
// 所以这里选择使用system或collection相同的地址只是放在不同的桶这样能保证图片服务器上,类似的sketch不会存在很多
sketchBase64ToPath(designSingleIncludeLayersDTO);
sketchBase64ToPath(designSingleIncludeLayersDTO, userId);
// 将标注后的mask上传到minio,并将minio地址传给python端
// todo 如果当前design使用的仍是旧的mask 则置maskUrl为null
@@ -653,7 +653,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
return selectById(designItemId); // 普通查询,不加锁
}
private void sketchBase64ToPath(DesignSingleIncludeLayersDTO designSingleIncludeLayersDTO){
private void sketchBase64ToPath(DesignSingleIncludeLayersDTO designSingleIncludeLayersDTO, Long userId){
designSingleIncludeLayersDTO.getDesignSingleItemDTOList().forEach(item -> {
// 如果sketch截图不为空则将该截图上传并替换path
if (!StringUtil.isNullOrEmpty(item.getSketchString())){
@@ -662,6 +662,13 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
}
String sourcePath = item.getPath();
String path = sourcePath.substring(sourcePath.indexOf("/") + 1, sourcePath.lastIndexOf("."));
// 路径组成用户id + sketchboard + temp | modified + 原图所在不同桶的原路径
if (designSingleIncludeLayersDTO.getIsPreview()) {
path = userId + "/sketchboard/temp/" + path;
} else {
path = userId + "/sketchboard/modified/" + path;
}
// 将原图地址作为修改后的图片地址,放在不同的桶
String newPath = minioUtil.base64UploadToPath(item.getSketchString(), modifiedSketchBucket, path);
if (StringUtil.isNullOrEmpty(newPath)){

View File

@@ -586,7 +586,7 @@ public class EmailServiceImpl implements EmailService {
try {
String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com";
List<String> merchantReceiver = Arrays.asList(merchantEmail, developer);
List<String> merchantReceiver = Arrays.asList(/*merchantEmail,*/ developer);
String merchantSubject = null;
String merchantTemplate = null;
@@ -706,7 +706,7 @@ public class EmailServiceImpl implements EmailService {
jsonObject.put("quantity", quantity);
jsonObject.put("totalFee", amount);
sendEmail(Arrays.asList(merchantEmail,developerEmail), jsonObject, CREDITS_PURCHASE_MERCHANT, "New Credit Purchase Order", null, null);
sendEmail(Arrays.asList(/*merchantEmail,*/developerEmail), jsonObject, CREDITS_PURCHASE_MERCHANT, "New Credit Purchase Order", null, null);
}
private final static String COMMON_EXCEPTION_REMINDER = "135279_common-exception-reminder.html";

View File

@@ -2,7 +2,7 @@
#spring.profiles.active=test
#<23><><EFBFBD><EFBFBD>application-prod<6F>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
spring.profiles.active=prod
#spring.profiles.active=prod
#<23><><EFBFBD><EFBFBD>application-dev<65>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
#spring.profiles.active=dev
spring.profiles.active=dev

View File

@@ -27,9 +27,9 @@ paypal.webhook_id=1D107312EX592781K
##### Stripe
# developer
#stripe.private-key=sk_test_51P4ZZL02n1TEydyN8qQHjOA9imsFU7Oxs2HMHGy2urHnnQgSHnZuu5vVP6pKhEACwUpsKNyrbZpdcg5TJWJLRHcY008dEO1fn2
stripe.private-key=sk_test_51P4ZZL02n1TEydyN8qQHjOA9imsFU7Oxs2HMHGy2urHnnQgSHnZuu5vVP6pKhEACwUpsKNyrbZpdcg5TJWJLRHcY008dEO1fn2
# dev 端点
#stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w
stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w
# local 端点
#stripe.webhook-sign-secret=whsec_TJcMSnAkh4uktrNY1M6Iy8XaVze4Rzqm
@@ -43,8 +43,8 @@ paypal.webhook_id=1D107312EX592781K
#stripe.webhook-sign-secret=whsec_pX0pPMQm85PaUSWnFMEzoccb3MGNkjoL
# kim - live
stripe.private-key=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
#stripe.private-key=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
# prod 端点
stripe.webhook-sign-secret=whsec_hhGDgdelQRHSg4LmChtQe41crj41eb11
#stripe.webhook-sign-secret=whsec_hhGDgdelQRHSg4LmChtQe41crj41eb11
# dev 端点
#stripe.webhook-sign-secret=whsec_cFUtjUOo8wnrIKZmt4GNvt7ZY1bOfrYr