Merge branch 'release/3.1' into dev/3.1_release_merge
This commit is contained in:
@@ -200,7 +200,8 @@ public class MyTaskScheduler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// @Scheduled(cron = "0 0 9 * * ?")
|
|
||||||
|
@Scheduled(cron = "0 0 9 * * ?")
|
||||||
public void sendTrialOrderExcelToManagements() {
|
public void sendTrialOrderExcelToManagements() {
|
||||||
// 获取前一天日期
|
// 获取前一天日期
|
||||||
LocalDate yesterday = LocalDate.now().minusDays(1);
|
LocalDate yesterday = LocalDate.now().minusDays(1);
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ public class AccountTask {
|
|||||||
accountService.refreshCreditsMonthly();
|
accountService.refreshCreditsMonthly();
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
|
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
|
||||||
public void getPaidUser() {
|
public void getPaidUser() {
|
||||||
// 获取code-create 表中 指定日期之后 订单状态为wc-processing的订单
|
// 获取code-create 表中 指定日期之后 订单状态为wc-processing的订单
|
||||||
accountService.extendValidityForCC();
|
accountService.extendValidityForCC();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 每天凌晨0点执行一次
|
// 每天凌晨0点执行一次
|
||||||
// @Scheduled(cron = "0 0 0 * * ?")
|
@Scheduled(cron = "0 0 0 * * ?")
|
||||||
public void cancelActivityBenefits() {
|
public void cancelActivityBenefits() {
|
||||||
// 1、查询当前所有参与了活动且过期的用户
|
// 1、查询当前所有参与了活动且过期的用户
|
||||||
List<Account> accountList = accountService.getExpiredUserBySystemUser(4);
|
List<Account> accountList = accountService.getExpiredUserBySystemUser(4);
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ public class GenerateTask {
|
|||||||
// 万相 -> pose transformation 补偿 当前任务执行完后,5分钟再执行一次(不会出现任务重叠的情况)
|
// 万相 -> pose transformation 补偿 当前任务执行完后,5分钟再执行一次(不会出现任务重叠的情况)
|
||||||
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
||||||
public void wxCompensationMechanism(){
|
public void wxCompensationMechanism(){
|
||||||
log.info("=====万相补偿获取结果开始=====");
|
|
||||||
List<APIGenerate> apiGenerates = apiGenerateService.getPendingTaskByStatus("wx");
|
List<APIGenerate> apiGenerates = apiGenerateService.getPendingTaskByStatus("wx");
|
||||||
if (apiGenerates != null && !apiGenerates.isEmpty()){
|
if (apiGenerates != null && !apiGenerates.isEmpty()){
|
||||||
|
log.info("=====万相补偿获取结果开始=====");
|
||||||
for (APIGenerate apiGenerate : apiGenerates){
|
for (APIGenerate apiGenerate : apiGenerates){
|
||||||
String taskId = apiGenerate.getTaskId();
|
String taskId = apiGenerate.getTaskId();
|
||||||
PoseTransformation poseTransformation = poseTransformationMapper.selectOne(new QueryWrapper<PoseTransformation>().eq("unique_id", taskId));
|
PoseTransformation poseTransformation = poseTransformationMapper.selectOne(new QueryWrapper<PoseTransformation>().eq("unique_id", taskId));
|
||||||
|
|||||||
@@ -104,12 +104,12 @@ public class PaymentTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 定时同步(每分钟一次)
|
// 定时同步(每分钟一次)
|
||||||
// @Scheduled(fixedRate = 60000)
|
@Scheduled(fixedRate = 60000)
|
||||||
public void syncLinkViewCountToDB(){
|
public void syncLinkViewCountToDB(){
|
||||||
affiliateService.syncLinkViewCountToDB();
|
affiliateService.syncLinkViewCountToDB();
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Scheduled(cron = "0 0 8 28-31 * ?")
|
@Scheduled(cron = "0 0 8 28-31 * ?")
|
||||||
public void commissionSummaryReminder(){
|
public void commissionSummaryReminder(){
|
||||||
// 每个月末的最后一天的早上八点执行
|
// 每个月末的最后一天的早上八点执行
|
||||||
LocalDate today = LocalDate.now();
|
LocalDate today = LocalDate.now();
|
||||||
@@ -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(){
|
public void calcCouponsCommission(){
|
||||||
log.info("优惠券佣金计算定时器");
|
log.info("优惠券佣金计算定时器");
|
||||||
affiliateService.calcCouponsCommission();
|
affiliateService.calcCouponsCommission();
|
||||||
|
|||||||
@@ -766,7 +766,7 @@ public class SendEmailUtil {
|
|||||||
try {
|
try {
|
||||||
String merchantEmail = "kimwong@code-create.com.hk";
|
String merchantEmail = "kimwong@code-create.com.hk";
|
||||||
String developer = "xupei3360@163.com";
|
String developer = "xupei3360@163.com";
|
||||||
String[] receiverEmail = {/*merchantEmail,*/ developer};
|
String[] receiverEmail = {merchantEmail, developer};
|
||||||
Credential cred = new Credential(SECRET_ID, SECRET_KEy);
|
Credential cred = new Credential(SECRET_ID, SECRET_KEy);
|
||||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||||
HttpProfile httpProfile = new HttpProfile();
|
HttpProfile httpProfile = new HttpProfile();
|
||||||
@@ -953,7 +953,7 @@ public class SendEmailUtil {
|
|||||||
req.setFromEmailAddress(SEND_ADDRESS);
|
req.setFromEmailAddress(SEND_ADDRESS);
|
||||||
String merchantEmail = "kimwong@code-create.com.hk";
|
String merchantEmail = "kimwong@code-create.com.hk";
|
||||||
String developerEmail = "xupei@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();
|
Template template = new Template();
|
||||||
req.setSubject("New Credit Purchase Order");
|
req.setSubject("New Credit Purchase Order");
|
||||||
template.setTemplateID(CREDITS_PURCHASE_MERCHANT);
|
template.setTemplateID(CREDITS_PURCHASE_MERCHANT);
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
|
|||||||
// 邮件通知审批者
|
// 邮件通知审批者
|
||||||
String merchantEmail = "kimwong@code-create.com.hk";
|
String merchantEmail = "kimwong@code-create.com.hk";
|
||||||
String developer = "xupei3360@163.com";
|
String developer = "xupei3360@163.com";
|
||||||
String[] receiverEmail = {/*merchantEmail,*/ developer};
|
String[] receiverEmail = {merchantEmail, developer};
|
||||||
SendEmailUtil.affiliateEmailReminder(receiverEmail, new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
|
SendEmailUtil.affiliateEmailReminder(receiverEmail, new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
|
||||||
// emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
|
// emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), new AffiliateEmailParamsDTO(userHolder.getUsername(), promotionMethod), "new");
|
||||||
}else {
|
}else {
|
||||||
@@ -212,10 +212,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
|
|||||||
|
|
||||||
// operationType Active -> 激活 | Inactive -> 关闭 | Delete -> 删除
|
// operationType Active -> 激活 | Inactive -> 关闭 | Delete -> 删除
|
||||||
if (!StringUtil.isNullOrEmpty(operationType)) {
|
if (!StringUtil.isNullOrEmpty(operationType)) {
|
||||||
if (operationType.equals("Delete")) {
|
if (operationType.equals("Delete") || operationType.equals("Active") || operationType.equals("Inactive")) {
|
||||||
baseMapper.deleteById(id);
|
|
||||||
return;
|
|
||||||
} else if (operationType.equals("Active") || operationType.equals("Inactive")) {
|
|
||||||
affiliate.setStatus(operationType);
|
affiliate.setStatus(operationType);
|
||||||
} else {
|
} else {
|
||||||
throw new BusinessException("unknown.operationType");
|
throw new BusinessException("unknown.operationType");
|
||||||
@@ -223,6 +220,10 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
|
|||||||
}
|
}
|
||||||
affiliate.setUpdateTime(LocalDateTime.now());
|
affiliate.setUpdateTime(LocalDateTime.now());
|
||||||
baseMapper.updateById(affiliate);
|
baseMapper.updateById(affiliate);
|
||||||
|
|
||||||
|
if (operationType.equals("Delete")) {
|
||||||
|
baseMapper.deleteById(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定时计算佣金
|
// 定时计算佣金
|
||||||
@@ -401,7 +402,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
|
|||||||
|
|
||||||
String merchantEmail = "kimwong@code-create.com.hk";
|
String merchantEmail = "kimwong@code-create.com.hk";
|
||||||
String developer = "xupei3360@163.com";
|
String developer = "xupei3360@163.com";
|
||||||
String[] receiverEmail = {/*merchantEmail,*/ developer};
|
String[] receiverEmail = {merchantEmail, developer};
|
||||||
// 邮件通知
|
// 邮件通知
|
||||||
SendEmailUtil.affiliateEmailReminder(receiverEmail, affiliateEmailParamsDTO, "summary");
|
SendEmailUtil.affiliateEmailReminder(receiverEmail, affiliateEmailParamsDTO, "summary");
|
||||||
// emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), affiliateEmailParamsDTO, "summary");
|
// emailService.affiliateEmailReminder(Arrays.asList(/*merchantEmail,*/ developer), affiliateEmailParamsDTO, "summary");
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ public class EmailServiceImpl implements EmailService {
|
|||||||
try {
|
try {
|
||||||
String merchantEmail = "kimwong@code-create.com.hk";
|
String merchantEmail = "kimwong@code-create.com.hk";
|
||||||
String developer = "xupei3360@163.com";
|
String developer = "xupei3360@163.com";
|
||||||
List<String> merchantReceiver = Arrays.asList(/*merchantEmail,*/ developer);
|
List<String> merchantReceiver = Arrays.asList(merchantEmail, developer);
|
||||||
|
|
||||||
String merchantSubject = null;
|
String merchantSubject = null;
|
||||||
String merchantTemplate = null;
|
String merchantTemplate = null;
|
||||||
@@ -730,7 +730,7 @@ public class EmailServiceImpl implements EmailService {
|
|||||||
jsonObject.put("quantity", quantity);
|
jsonObject.put("quantity", quantity);
|
||||||
jsonObject.put("totalFee", amount);
|
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";
|
private final static String COMMON_EXCEPTION_REMINDER = "135279_common-exception-reminder.html";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#spring.profiles.active=test
|
#spring.profiles.active=test
|
||||||
|
|
||||||
#<23><><EFBFBD><EFBFBD>application-prod<6F>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
#<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>)
|
#<23><><EFBFBD><EFBFBD>application-dev<65>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||||
spring.profiles.active=dev
|
#spring.profiles.active=dev
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
<if test="affiliateId != null">
|
<if test="affiliateId != null">
|
||||||
AND f.id = #{affiliateId}
|
AND f.id = #{affiliateId}
|
||||||
</if>
|
</if>
|
||||||
|
AND f.is_deleted = 0
|
||||||
</where>
|
</where>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="sortField != null and sortField != ''">
|
<when test="sortField != null and sortField != ''">
|
||||||
@@ -83,6 +84,7 @@
|
|||||||
AND f.id = #{affiliateId}
|
AND f.id = #{affiliateId}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
AND f.is_deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAllAffiliateUsername" resultType="java.util.Map">
|
<select id="selectAllAffiliateUsername" resultType="java.util.Map">
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ paypal.webhook_id=1D107312EX592781K
|
|||||||
##### Stripe
|
##### Stripe
|
||||||
|
|
||||||
# developer
|
# developer
|
||||||
stripe.private-key=sk_test_51P4ZZL02n1TEydyN8qQHjOA9imsFU7Oxs2HMHGy2urHnnQgSHnZuu5vVP6pKhEACwUpsKNyrbZpdcg5TJWJLRHcY008dEO1fn2
|
#stripe.private-key=sk_test_51P4ZZL02n1TEydyN8qQHjOA9imsFU7Oxs2HMHGy2urHnnQgSHnZuu5vVP6pKhEACwUpsKNyrbZpdcg5TJWJLRHcY008dEO1fn2
|
||||||
# dev 端点
|
# dev 端点
|
||||||
stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w
|
#stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w
|
||||||
# local 端点
|
# local 端点
|
||||||
#stripe.webhook-sign-secret=whsec_TJcMSnAkh4uktrNY1M6Iy8XaVze4Rzqm
|
#stripe.webhook-sign-secret=whsec_TJcMSnAkh4uktrNY1M6Iy8XaVze4Rzqm
|
||||||
|
|
||||||
@@ -43,8 +43,8 @@ stripe.webhook-sign-secret=whsec_e0dBiJngx6qqgJj6yPyJ2A9ouh1Cjv5w
|
|||||||
#stripe.webhook-sign-secret=whsec_pX0pPMQm85PaUSWnFMEzoccb3MGNkjoL
|
#stripe.webhook-sign-secret=whsec_pX0pPMQm85PaUSWnFMEzoccb3MGNkjoL
|
||||||
|
|
||||||
# kim - live
|
# kim - live
|
||||||
#stripe.private-key=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
|
stripe.private-key=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
|
||||||
# prod 端点
|
# prod 端点
|
||||||
#stripe.webhook-sign-secret=whsec_hhGDgdelQRHSg4LmChtQe41crj41eb11
|
stripe.webhook-sign-secret=whsec_hhGDgdelQRHSg4LmChtQe41crj41eb11
|
||||||
# dev 端点
|
# dev 端点
|
||||||
#stripe.webhook-sign-secret=whsec_cFUtjUOo8wnrIKZmt4GNvt7ZY1bOfrYr
|
#stripe.webhook-sign-secret=whsec_cFUtjUOo8wnrIKZmt4GNvt7ZY1bOfrYr
|
||||||
|
|||||||
Reference in New Issue
Block a user