Merge remote-tracking branch 'origin/dev/dev' into dev/dev
This commit is contained in:
@@ -53,7 +53,7 @@ public class MyTaskScheduler {
|
|||||||
|
|
||||||
// 定时任务,每十五天执行一次
|
// 定时任务,每十五天执行一次
|
||||||
// @Scheduled(cron = "0 0 0 ? * MON")
|
// @Scheduled(cron = "0 0 0 ? * MON")
|
||||||
@Scheduled(cron = "0 0 0 */15 * ?")
|
// @Scheduled(cron = "0 0 0 */15 * ?")
|
||||||
public void checkExpiry() {
|
public void checkExpiry() {
|
||||||
// 检测正式用户是否快要过期
|
// 检测正式用户是否快要过期
|
||||||
QueryWrapper<Account> qw = new QueryWrapper<>();
|
QueryWrapper<Account> qw = new QueryWrapper<>();
|
||||||
@@ -87,7 +87,7 @@ 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);
|
||||||
|
|||||||
@@ -25,20 +25,20 @@ public class AccountTask {
|
|||||||
* 每个月月初只刷新年付用户的积分
|
* 每个月月初只刷新年付用户的积分
|
||||||
*/
|
*/
|
||||||
// @Scheduled(cron = "59 59 23 * * ?")
|
// @Scheduled(cron = "59 59 23 * * ?")
|
||||||
@Scheduled(cron = "0 0 0 1 * ?")
|
// @Scheduled(cron = "0 0 0 1 * ?")
|
||||||
public void refreshCreditsMonthly() {
|
public void refreshCreditsMonthly() {
|
||||||
log.info("每月1号0点 将年费用户积分重置为 6000");
|
log.info("每月1号0点 将年费用户积分重置为 6000");
|
||||||
accountService.refreshCreditsWeekly();
|
accountService.refreshCreditsWeekly();
|
||||||
}
|
}
|
||||||
|
|
||||||
@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);
|
||||||
@@ -51,7 +51,7 @@ public class AccountTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 每天检测正式用户到期情况,每天凌晨0点执行
|
// 每天检测正式用户到期情况,每天凌晨0点执行
|
||||||
@Scheduled(cron = "0 0 0 * * ?")
|
// @Scheduled(cron = "0 0 0 * * ?")
|
||||||
public void paidUserToVisitor() {
|
public void paidUserToVisitor() {
|
||||||
// 1、查询当前已过期正式用户或试用用户
|
// 1、查询当前已过期正式用户或试用用户
|
||||||
List<Account> accountList = accountService.getExpiredUserBySystemUser(1);
|
List<Account> accountList = accountService.getExpiredUserBySystemUser(1);
|
||||||
@@ -68,12 +68,12 @@ public class AccountTask {
|
|||||||
/**
|
/**
|
||||||
* 将Code-Create上注册的用户添加为AiDA的游客
|
* 将Code-Create上注册的用户添加为AiDA的游客
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
|
// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
|
||||||
public void registerUserToVisitor() {
|
public void registerUserToVisitor() {
|
||||||
accountService.registerUserToVisitor();
|
accountService.registerUserToVisitor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(cron = "0 0 0 1 * ?")
|
// @Scheduled(cron = "0 0 0 1 * ?")
|
||||||
// 每月初刷新所有用户用户名剩余修改次数
|
// 每月初刷新所有用户用户名剩余修改次数
|
||||||
public void resetUsernameModifyTimes(){
|
public void resetUsernameModifyTimes(){
|
||||||
log.info("重置所有用户的用户名修改次数");
|
log.info("重置所有用户的用户名修改次数");
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class PaymentTask {
|
|||||||
@Resource
|
@Resource
|
||||||
private PayPalCheckoutService payPalCheckoutService;
|
private PayPalCheckoutService payPalCheckoutService;
|
||||||
|
|
||||||
@Scheduled(cron = "0/30 * * * * ?")
|
// @Scheduled(cron = "0/30 * * * * ?")
|
||||||
public void orderConfirmForPaypal() throws SerializeException {
|
public void orderConfirmForPaypal() throws SerializeException {
|
||||||
|
|
||||||
// log.info("PayPal orderConfirm 被执行......");
|
// log.info("PayPal orderConfirm 被执行......");
|
||||||
@@ -85,7 +85,7 @@ public class PaymentTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 提前7天向用户发送提醒邮件,每天早上8点执行
|
// 提前7天向用户发送提醒邮件,每天早上8点执行
|
||||||
@Scheduled(cron = "0 0 8 * * ?")
|
// @Scheduled(cron = "0 0 8 * * ?")
|
||||||
public void subscriptionReminder(){
|
public void subscriptionReminder(){
|
||||||
stripeService.subscriptionReminder();
|
stripeService.subscriptionReminder();
|
||||||
}
|
}
|
||||||
@@ -102,13 +102,13 @@ public class PaymentTask {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
|
// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
|
||||||
public void updateAffiliateInfoWithPayment(){
|
public void updateAffiliateInfoWithPayment(){
|
||||||
// log.info("佣金计算定时器");
|
// log.info("佣金计算定时器");
|
||||||
affiliateService.updateAffiliateInfoWithPayment();
|
affiliateService.updateAffiliateInfoWithPayment();
|
||||||
}
|
}
|
||||||
|
|
||||||
@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();
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public class RequestInfoUtil {
|
|||||||
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
||||||
String output;
|
String output;
|
||||||
StringBuilder outputBuilder = new StringBuilder();
|
StringBuilder outputBuilder = new StringBuilder();
|
||||||
System.out.println("Output from Server .... \n");
|
// System.out.println("Output from Server .... \n");
|
||||||
while ((output = br.readLine()) != null) {
|
while ((output = br.readLine()) != null) {
|
||||||
outputBuilder.append(output);
|
outputBuilder.append(output);
|
||||||
System.out.println(output);
|
System.out.println(output);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.ai.da.mapper.primary.entity.PaymentInfo;
|
|||||||
import com.ai.da.model.vo.OrderListVO;
|
import com.ai.da.model.vo.OrderListVO;
|
||||||
import com.ai.da.model.vo.PaymentInfoVO;
|
import com.ai.da.model.vo.PaymentInfoVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -26,4 +27,6 @@ public interface PaymentInfoMapper extends BaseMapper<PaymentInfo> {
|
|||||||
List<Map<String, String>> getCities();
|
List<Map<String, String>> getCities();
|
||||||
|
|
||||||
List<Map<String, String>> getCountries();
|
List<Map<String, String>> getCountries();
|
||||||
|
|
||||||
|
int insertIgnore(@Param("paymentInfo")PaymentInfo paymentInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ package com.ai.da.mapper.primary;
|
|||||||
|
|
||||||
import com.ai.da.mapper.primary.entity.SubscriptionInfo;
|
import com.ai.da.mapper.primary.entity.SubscriptionInfo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
public interface SubscriptionInfoMapper extends BaseMapper<SubscriptionInfo> {
|
public interface SubscriptionInfoMapper extends BaseMapper<SubscriptionInfo> {
|
||||||
|
int insertIgnore(@Param("subscriptionInfo") SubscriptionInfo subscriptionInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class DesignItemDetailPrint {
|
|||||||
/**
|
/**
|
||||||
* 印花缩放比例
|
* 印花缩放比例
|
||||||
*/
|
*/
|
||||||
private Double scale;
|
private String scale;
|
||||||
/**
|
/**
|
||||||
* 印花旋转角度
|
* 印花旋转角度
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class SubscriptionInfo extends BaseEntity{
|
|||||||
// month || year
|
// month || year
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
// active || expired
|
// active || canceled
|
||||||
private String status = "active";
|
private String status = "active";
|
||||||
|
|
||||||
private byte cancelNotified = (byte)0;
|
private byte cancelNotified = (byte)0;
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ public class DesignSinglePrint implements Serializable {
|
|||||||
private String minIOPath;
|
private String minIOPath;
|
||||||
|
|
||||||
@ApiModelProperty("印花位置")
|
@ApiModelProperty("印花位置")
|
||||||
private List<Double> location;
|
private List<Float> location;
|
||||||
|
|
||||||
@ApiModelProperty("印花大小")
|
@ApiModelProperty("印花大小")
|
||||||
@Range(max = 1, message = "印花缩放值需用大于等于0小于等于1的数表示")
|
@Range(max = 1, message = "印花缩放值需用大于等于0小于等于1的数表示")
|
||||||
private Double scale;
|
private List<Float> scale;
|
||||||
|
|
||||||
@Range(min = -360, max = 360, message = "印花旋转角度范围为-360° ~ 360°")
|
@Range(min = -360, max = 360, message = "印花旋转角度范围为-360° ~ 360°")
|
||||||
@ApiModelProperty("印花角度")
|
@ApiModelProperty("印花角度")
|
||||||
@@ -46,12 +46,12 @@ public class DesignSinglePrint implements Serializable {
|
|||||||
public DesignSinglePrint() {
|
public DesignSinglePrint() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public DesignSinglePrint(String path, Double scale) {
|
public DesignSinglePrint(String path, List<Float> scale) {
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.scale = scale;
|
this.scale = scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DesignSinglePrint(String level2Type, String path, String minIOPath, List<Double> location, Double scale, Double angle, Integer priority, Boolean ifSingle) {
|
public DesignSinglePrint(String level2Type, String path, String minIOPath, List<Float> location, List<Float> scale, Double angle, Integer priority, Boolean ifSingle) {
|
||||||
this.level2Type = level2Type;
|
this.level2Type = level2Type;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.minIOPath = minIOPath;
|
this.minIOPath = minIOPath;
|
||||||
|
|||||||
@@ -2767,13 +2767,13 @@ public class PythonService {
|
|||||||
|
|
||||||
int size = printObject.size();
|
int size = printObject.size();
|
||||||
// 占位符填充数组
|
// 占位符填充数组
|
||||||
List<List<Double>> locationS = new ArrayList<>(Collections.nCopies(size, null));
|
List<List<Float>> locationS = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
List<Double> scaleS = new ArrayList<>(Collections.nCopies(size, null));
|
List<List<Float>> scaleS = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
List<Double> angleS = new ArrayList<>(Collections.nCopies(size, null));
|
List<Double> angleS = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
ArrayList<String> pathsS = new ArrayList<>(Collections.nCopies(size, null));
|
ArrayList<String> pathsS = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
|
|
||||||
List<List<Double>> locationO = new ArrayList<>(Collections.nCopies(size, null));
|
List<List<Float>> locationO = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
List<Double> scaleO = new ArrayList<>(Collections.nCopies(size, null));
|
List<List<Float>> scaleO = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
List<Double> angleO = new ArrayList<>(Collections.nCopies(size, null));
|
List<Double> angleO = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
ArrayList<String> pathsO = new ArrayList<>(Collections.nCopies(size, null));
|
ArrayList<String> pathsO = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
|
|
||||||
@@ -2830,8 +2830,8 @@ public class PythonService {
|
|||||||
|
|
||||||
int size = trims.getPrints().size();
|
int size = trims.getPrints().size();
|
||||||
// 占位符填充数组
|
// 占位符填充数组
|
||||||
List<List<Double>> location = new ArrayList<>(Collections.nCopies(size, null));
|
List<List<Float>> location = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
List<Double> scale = new ArrayList<>(Collections.nCopies(size, null));
|
List<List<Float>> scale = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
List<Double> angle = new ArrayList<>(Collections.nCopies(size, null));
|
List<Double> angle = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
ArrayList<String> paths = new ArrayList<>(Collections.nCopies(size, null));
|
ArrayList<String> paths = new ArrayList<>(Collections.nCopies(size, null));
|
||||||
|
|
||||||
@@ -2841,6 +2841,8 @@ public class PythonService {
|
|||||||
prints.forEach(p -> {
|
prints.forEach(p -> {
|
||||||
p.getLocation().set(0, p.getLocation().get(0));
|
p.getLocation().set(0, p.getLocation().get(0));
|
||||||
p.getLocation().set(1, p.getLocation().get(1));
|
p.getLocation().set(1, p.getLocation().get(1));
|
||||||
|
p.getScale().set(0, p.getScale().get(0));
|
||||||
|
p.getScale().set(1, p.getScale().get(1));
|
||||||
Integer priority = p.getPriority();
|
Integer priority = p.getPriority();
|
||||||
location.set(priority - 1, p.getLocation());
|
location.set(priority - 1, p.getLocation());
|
||||||
scale.set(priority - 1, p.getScale());
|
scale.set(priority - 1, p.getScale());
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ import java.util.List;
|
|||||||
public class DesignPythonItemElement {
|
public class DesignPythonItemElement {
|
||||||
|
|
||||||
@ApiModelProperty("print的位置 传 [[0.2, 0.2]]")
|
@ApiModelProperty("print的位置 传 [[0.2, 0.2]]")
|
||||||
private List<List<Double>> location = new ArrayList<>();
|
private List<List<Float>> location = new ArrayList<>();
|
||||||
|
|
||||||
private List<String> element_path_list = new ArrayList<>();
|
private List<String> element_path_list = new ArrayList<>();
|
||||||
|
|
||||||
@ApiModelProperty("print的缩放比例 传 [0.2, 0.2]")
|
@ApiModelProperty("print的缩放比例 传 [0.2, 0.2]")
|
||||||
private List<Double> element_scale_list = new ArrayList<>();
|
private List<List<Float>> element_scale_list = new ArrayList<>();
|
||||||
|
|
||||||
@ApiModelProperty("print的旋转角度 传 [0.2, 0.2]")
|
@ApiModelProperty("print的旋转角度 传 [0.2, 0.2]")
|
||||||
private List<Double> element_angle_list = new ArrayList<>();
|
private List<Double> element_angle_list = new ArrayList<>();
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ public class DesignPythonItemPrint {
|
|||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("print的位置 传 [[0.2, 0.2]]")
|
@ApiModelProperty("print的位置 传 [[0.2, 0.2]]")
|
||||||
private List<List<Double>> location = new ArrayList<>();
|
private List<List<Float>> location = new ArrayList<>();
|
||||||
|
|
||||||
@ApiModelProperty("print的缩放比例 传 [0.2, 0.2]")
|
@ApiModelProperty("print的缩放比例 传 [0.2, 0.2]")
|
||||||
private List<Double> print_scale_list = new ArrayList<>();
|
private List<List<Float>> print_scale_list = new ArrayList<>();
|
||||||
|
|
||||||
@ApiModelProperty("print的旋转角度 传 [0.2, 0.2]")
|
@ApiModelProperty("print的旋转角度 传 [0.2, 0.2]")
|
||||||
private List<Double> print_angle_list = new ArrayList<>();
|
private List<Double> print_angle_list = new ArrayList<>();
|
||||||
@@ -52,8 +52,8 @@ public class DesignPythonItemPrint {
|
|||||||
public DesignPythonItemPrint(List<String> print_path_list, Boolean ifDesign) {
|
public DesignPythonItemPrint(List<String> print_path_list, Boolean ifDesign) {
|
||||||
if (ifDesign){
|
if (ifDesign){
|
||||||
this.print_path_list = print_path_list;
|
this.print_path_list = print_path_list;
|
||||||
this.location = Collections.singletonList(Arrays.asList(0.0, 0.0));
|
this.location = Collections.singletonList(Arrays.asList(0.0f, 0.0f));
|
||||||
this.print_scale_list = Arrays.asList(0.0, 0.0);
|
this.print_scale_list = Collections.singletonList(Arrays.asList(0.0f, 0.0f));
|
||||||
this.print_angle_list = Arrays.asList(0.0, 0.0);
|
this.print_angle_list = Arrays.asList(0.0, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -816,7 +816,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
designItemDetailPrint.setPrintType(printType);
|
designItemDetailPrint.setPrintType(printType);
|
||||||
designItemDetailPrint.setLevel2Type(print.getLevel2Type());
|
designItemDetailPrint.setLevel2Type(print.getLevel2Type());
|
||||||
designItemDetailPrint.setPath(print.getMinIOPath());
|
designItemDetailPrint.setPath(print.getMinIOPath());
|
||||||
designItemDetailPrint.setScale(print.getScale());
|
designItemDetailPrint.setScale(print.getScale().toString());
|
||||||
designItemDetailPrint.setSingleOrOverall(printType.equals("print") ? print.getIfSingle() ? "single" : "overall" : "single");
|
designItemDetailPrint.setSingleOrOverall(printType.equals("print") ? print.getIfSingle() ? "single" : "overall" : "single");
|
||||||
designItemDetailPrint.setCreateDate(LocalDateTime.now(ZoneId.of(timeZone)));
|
designItemDetailPrint.setCreateDate(LocalDateTime.now(ZoneId.of(timeZone)));
|
||||||
// single、overall模式下都有position、angle和priority
|
// single、overall模式下都有position、angle和priority
|
||||||
|
|||||||
@@ -820,7 +820,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
print.setPosition("[0.0,0.0]");
|
print.setPosition("[0.0,0.0]");
|
||||||
// print.setScale(1d);
|
// print.setScale(1d);
|
||||||
// todo mark 将print默认scale置为0.3
|
// todo mark 将print默认scale置为0.3
|
||||||
print.setScale(0.3d);
|
print.setScale(Arrays.toString(new Float[]{0.3f, 0.3f}));
|
||||||
print.setAngle(0.0);
|
print.setAngle(0.0);
|
||||||
print.setPriority(1);
|
print.setPriority(1);
|
||||||
QueryWrapper<CollectionElement> getPrintboardLevel2TypeQw = new QueryWrapper<>();
|
QueryWrapper<CollectionElement> getPrintboardLevel2TypeQw = new QueryWrapper<>();
|
||||||
@@ -951,7 +951,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
print.setPosition("[0.0,0.0]");
|
print.setPosition("[0.0,0.0]");
|
||||||
// print.setScale(1d);
|
// print.setScale(1d);
|
||||||
// todo mark 将print默认scale置为0.3
|
// todo mark 将print默认scale置为0.3
|
||||||
print.setScale(0.3d);
|
print.setScale(Arrays.toString(new Float[]{0.3f, 0.3f}));
|
||||||
print.setAngle(0.0);
|
print.setAngle(0.0);
|
||||||
print.setPriority(1);
|
print.setPriority(1);
|
||||||
QueryWrapper<CollectionElement> getPrintboardLevel2TypeQw = new QueryWrapper<>();
|
QueryWrapper<CollectionElement> getPrintboardLevel2TypeQw = new QueryWrapper<>();
|
||||||
@@ -1596,12 +1596,12 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
DesignSinglePrint designSinglePrint = new DesignSinglePrint();
|
DesignSinglePrint designSinglePrint = new DesignSinglePrint();
|
||||||
// designSinglePrintDTO.setIfSingle(detailPrint.getSingleOrOverall().equals("single") ? Boolean.TRUE : Boolean.FALSE);
|
// designSinglePrintDTO.setIfSingle(detailPrint.getSingleOrOverall().equals("single") ? Boolean.TRUE : Boolean.FALSE);
|
||||||
designSinglePrint.setLevel2Type(detailPrint.getLevel2Type());
|
designSinglePrint.setLevel2Type(detailPrint.getLevel2Type());
|
||||||
designSinglePrint.setLocation(JSONArray.parseArray(detailPrint.getPosition(), Double.class));
|
designSinglePrint.setLocation(JSONArray.parseArray(detailPrint.getPosition(), Float.class));
|
||||||
designSinglePrint.setAngle(detailPrint.getAngle());
|
designSinglePrint.setAngle(detailPrint.getAngle());
|
||||||
designSinglePrint.setPriority(detailPrint.getPriority());
|
designSinglePrint.setPriority(detailPrint.getPriority());
|
||||||
designSinglePrint.setPath(minioUtil.getPreSignedUrl(detailPrint.getPath(), 24 * 60));
|
designSinglePrint.setPath(minioUtil.getPreSignedUrl(detailPrint.getPath(), 24 * 60));
|
||||||
designSinglePrint.setMinIOPath(detailPrint.getPath());
|
designSinglePrint.setMinIOPath(detailPrint.getPath());
|
||||||
designSinglePrint.setScale(detailPrint.getScale());
|
designSinglePrint.setScale(JSONArray.parseArray(detailPrint.getScale(), Float.class));
|
||||||
designSinglePrint.setIfSingle(detailPrint.getSingleOrOverall().equals("single") ? Boolean.TRUE : Boolean.FALSE);
|
designSinglePrint.setIfSingle(detailPrint.getSingleOrOverall().equals("single") ? Boolean.TRUE : Boolean.FALSE);
|
||||||
prints.add(designSinglePrint);
|
prints.add(designSinglePrint);
|
||||||
} else {
|
} else {
|
||||||
@@ -1613,8 +1613,8 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
print.getLevel2Type(),
|
print.getLevel2Type(),
|
||||||
minioUtil.getPreSignedUrl(print.getPath(), 24 * 60),
|
minioUtil.getPreSignedUrl(print.getPath(), 24 * 60),
|
||||||
print.getPath(),
|
print.getPath(),
|
||||||
JSONArray.parseArray(print.getPosition(), Double.class),
|
JSONArray.parseArray(print.getPosition(), Float.class),
|
||||||
print.getScale(),
|
JSONArray.parseArray(print.getScale(), Float.class),
|
||||||
print.getAngle(),
|
print.getAngle(),
|
||||||
print.getPriority(),
|
print.getPriority(),
|
||||||
print.getSingleOrOverall().equals("single") ? Boolean.TRUE : Boolean.FALSE));
|
print.getSingleOrOverall().equals("single") ? Boolean.TRUE : Boolean.FALSE));
|
||||||
@@ -1977,7 +1977,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
print.setPosition("[0.0,0.0]");
|
print.setPosition("[0.0,0.0]");
|
||||||
// print.setScale(1d);
|
// print.setScale(1d);
|
||||||
// todo mark 将print默认scale置为0.3
|
// todo mark 将print默认scale置为0.3
|
||||||
print.setScale(0.3d);
|
print.setScale(Arrays.toString(new Float[]{0.3f, 0.3f}));
|
||||||
print.setAngle(0.0);
|
print.setAngle(0.0);
|
||||||
print.setPriority(1);
|
print.setPriority(1);
|
||||||
QueryWrapper<CollectionElement> getPrintboardLevel2TypeQw = new QueryWrapper<>();
|
QueryWrapper<CollectionElement> getPrintboardLevel2TypeQw = new QueryWrapper<>();
|
||||||
|
|||||||
@@ -285,7 +285,8 @@ public class PaymentInfoServiceImpl extends ServiceImpl<PaymentInfoMapper, Payme
|
|||||||
paymentInfo.setCity(orderByOrderNo.getCity());
|
paymentInfo.setCity(orderByOrderNo.getCity());
|
||||||
paymentInfo.setIpAddress(orderByOrderNo.getIpAddress());
|
paymentInfo.setIpAddress(orderByOrderNo.getIpAddress());
|
||||||
}
|
}
|
||||||
baseMapper.insert(paymentInfo);
|
int row = baseMapper.insertIgnore(paymentInfo);
|
||||||
|
log.info("Payment Info insert affect rows:{}", row);
|
||||||
}else {
|
}else {
|
||||||
paymentInfo.setTradeState(status);
|
paymentInfo.setTradeState(status);
|
||||||
paymentInfo.setUpdateTime(LocalDateTime.now());
|
paymentInfo.setUpdateTime(LocalDateTime.now());
|
||||||
@@ -354,7 +355,8 @@ public class PaymentInfoServiceImpl extends ServiceImpl<PaymentInfoMapper, Payme
|
|||||||
paymentInfo.setCity(orderByOrderNo.getCity());
|
paymentInfo.setCity(orderByOrderNo.getCity());
|
||||||
paymentInfo.setIpAddress(orderByOrderNo.getIpAddress());
|
paymentInfo.setIpAddress(orderByOrderNo.getIpAddress());
|
||||||
}
|
}
|
||||||
baseMapper.insert(paymentInfo);
|
int row = baseMapper.insertIgnore(paymentInfo);
|
||||||
|
log.info("Payment Info insert affect rows:{}", row);
|
||||||
}else {
|
}else {
|
||||||
paymentInfo.setTradeState(charge.getStatus());
|
paymentInfo.setTradeState(charge.getStatus());
|
||||||
paymentInfo.setPaymentMethod(paymentMethod);
|
paymentInfo.setPaymentMethod(paymentMethod);
|
||||||
|
|||||||
@@ -482,7 +482,9 @@ public class StripeServiceImpl implements StripeService {
|
|||||||
subscriptionInfo.setCurrentPeriodStart(subscription.getCurrentPeriodStart());
|
subscriptionInfo.setCurrentPeriodStart(subscription.getCurrentPeriodStart());
|
||||||
subscriptionInfo.setCurrentPeriodEnd(subscription.getCurrentPeriodEnd());
|
subscriptionInfo.setCurrentPeriodEnd(subscription.getCurrentPeriodEnd());
|
||||||
subscriptionInfo.setCreateTime(LocalDateTime.now());
|
subscriptionInfo.setCreateTime(LocalDateTime.now());
|
||||||
subscriptionInfoMapper.insert(subscriptionInfo);
|
|
||||||
|
int rows = subscriptionInfoMapper.insertIgnore(subscriptionInfo);
|
||||||
|
log.info("Subscription info insert affect rows : {}", rows);
|
||||||
|
|
||||||
if (subscriptionInfo.getStatus().equals("active")){
|
if (subscriptionInfo.getStatus().equals("active")){
|
||||||
log.info("创建订阅更新账号信息");
|
log.info("创建订阅更新账号信息");
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -163,4 +163,15 @@
|
|||||||
AND TRIM(country) != ''
|
AND TRIM(country) != ''
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertIgnore" parameterType="com.ai.da.mapper.primary.entity.PaymentInfo">
|
||||||
|
INSERT IGNORE INTO
|
||||||
|
t_payment_info (order_no, transaction_id, payment_type, trade_state, payer_total,
|
||||||
|
type, content, notified, payment_method, last4, hosted_invoice_url,
|
||||||
|
country, city, ip_address, create_time)
|
||||||
|
VALUES (#{paymentInfo.orderNo}, #{paymentInfo.transactionId}, #{paymentInfo.paymentType},
|
||||||
|
#{paymentInfo.tradeState}, #{paymentInfo.payerTotal}, #{paymentInfo.content},#{paymentInfo.type},
|
||||||
|
#{paymentInfo.notified},#{paymentInfo.paymentMethod}, #{paymentInfo.last4},#{paymentInfo.hostedInvoiceUrl},
|
||||||
|
#{paymentInfo.ipAddress},#{paymentInfo.country},#{paymentInfo.city},#{paymentInfo.createTime});
|
||||||
|
</insert>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
13
src/main/resources/mapper/primary/SubscriptionInfoMapper.xml
Normal file
13
src/main/resources/mapper/primary/SubscriptionInfoMapper.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ai.da.mapper.primary.SubscriptionInfoMapper">
|
||||||
|
<insert id="insertIgnore" parameterType="com.ai.da.mapper.primary.entity.SubscriptionInfo">
|
||||||
|
INSERT IGNORE INTO
|
||||||
|
t_subscription_info (account_id, order_no, subscription_id, type, status, cancel_notified,
|
||||||
|
next_pay_date, current_period_start, current_period_end, create_time)
|
||||||
|
VALUES (#{subscriptionInfo.accountId}, #{subscriptionInfo.orderNo}, #{subscriptionInfo.subscriptionId},
|
||||||
|
#{subscriptionInfo.type}, #{subscriptionInfo.status}, #{subscriptionInfo.cancelNotified},
|
||||||
|
#{subscriptionInfo.nextPayDate}, #{subscriptionInfo.currentPeriodStart},
|
||||||
|
#{subscriptionInfo.currentPeriodEnd}, #{subscriptionInfo.createTime});
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user