|
@@ -314,8 +314,12 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|
|
if (null != payLinkDto.getVipRecordId()) {
|
|
|
// 获取会员套餐记录
|
|
|
VipRecordBo record = payOrderMapper.getVipPackageRecord(payLinkDto.getVipRecordId());
|
|
|
- orderPayLink.setVipId(record.getPackageId());
|
|
|
- orderPayLink.setUnpaidAmount(record.getPrice());
|
|
|
+ // 获取会员套餐价格
|
|
|
+ Double price = payOrderMapper.getVipPackagePriceById(record.getPackageId());
|
|
|
+ // 超级会员套餐时长(月)
|
|
|
+ Integer mouth = payOrderMapper.getVipPackageDurationById(record.getPackageId());
|
|
|
+ orderPayLink.setVipMonth(mouth);
|
|
|
+ orderPayLink.setUnpaidAmount(price);
|
|
|
} else {
|
|
|
orderPayLink.setUnpaidAmount(payLinkDto.getUnpaidAmount());
|
|
|
}
|
|
@@ -362,9 +366,12 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|
|
// 链接状态,0成功
|
|
|
int code = 0;
|
|
|
String userName = "";
|
|
|
+ // 链接类型:1订单,2超级会员
|
|
|
+ int type = 0;
|
|
|
// 订单支付记录
|
|
|
List<DiscernReceiptVo> discernReceiptList = null;
|
|
|
if (null != orderPayLink.getOrderId()) {
|
|
|
+ type = 1;
|
|
|
// 订单信息
|
|
|
OrderVo order = orderCommonMapper.getOrderByOrderId(orderPayLink.getOrderId());
|
|
|
// 支付记录
|
|
@@ -372,9 +379,7 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|
|
// 机构信息
|
|
|
userName = baseMapper.getUserNameByUserId(order.getUserId());
|
|
|
} else {
|
|
|
- // 超级会员套餐时长(月)
|
|
|
- Integer mouth = payOrderMapper.getVipPackageDurationById(orderPayLink.getVipId());
|
|
|
- orderPayLink.setVipMonth(mouth);
|
|
|
+ type = 2;
|
|
|
// 获取会员套餐记录
|
|
|
VipRecordBo record = payOrderMapper.getVipPackageRecord(orderPayLink.getVipRecordId());
|
|
|
// 机构信息
|
|
@@ -399,7 +404,8 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|
|
}
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String time = dateFormat.format(orderPayLink.getEffectiveTime());
|
|
|
- Map<String, Object> map = new HashMap<>(3);
|
|
|
+ Map<String, Object> map = new HashMap<>(5);
|
|
|
+ map.put("type", type);
|
|
|
map.put("orderPayLink", orderPayLink);
|
|
|
map.put("userName", userName);
|
|
|
map.put("code", code);
|