记得上下班打卡 | git大法好,push需谨慎

Commit f0ee7244 authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/new_member' into new_member

parents b6b9bd8a 53e99fa9
...@@ -28,6 +28,8 @@ import java.util.List; ...@@ -28,6 +28,8 @@ import java.util.List;
@ApiModel @ApiModel
public class KylinOrderRefundsVo implements Serializable,Cloneable { public class KylinOrderRefundsVo implements Serializable,Cloneable {
private static final long serialVersionUID = 268172565273929795L;
@ApiModelProperty(value = "主键ID") @ApiModelProperty(value = "主键ID")
private String orderRefundsId; private String orderRefundsId;
...@@ -167,10 +169,10 @@ public class KylinOrderRefundsVo implements Serializable,Cloneable { ...@@ -167,10 +169,10 @@ public class KylinOrderRefundsVo implements Serializable,Cloneable {
this.statusName = "退款失败"; this.statusName = "退款失败";
break; break;
case 7: case 7:
this.statusName = "二审通过等待退款"; this.statusName = "财务通过等待退款";
break; break;
case 8: case 8:
this.statusName = "二审驳回退款"; this.statusName = "财务驳回退款";
break; break;
default: default:
this.statusName = "其他"; this.statusName = "其他";
......
...@@ -103,10 +103,10 @@ public class OrderRefundDao implements Serializable { ...@@ -103,10 +103,10 @@ public class OrderRefundDao implements Serializable {
this.statusName="退款失败"; this.statusName="退款失败";
break; break;
case 7: case 7:
this.statusName="二审通过等待退款"; this.statusName="财务通过等待退款";
break; break;
case 8: case 8:
this.statusName="二审驳回退款"; this.statusName="财务驳回退款";
break; break;
case 9: case 9:
this.statusName="已确认收货"; this.statusName="已确认收货";
......
...@@ -18,9 +18,9 @@ import lombok.EqualsAndHashCode; ...@@ -18,9 +18,9 @@ import lombok.EqualsAndHashCode;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class KylinOrderRefunds implements Serializable { public class KylinOrderRefunds implements Serializable, Cloneable{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 5901424962410128552L;
@TableId(value = "mid", type = IdType.AUTO) @TableId(value = "mid", type = IdType.AUTO)
private Integer mid; private Integer mid;
......
package com.liquidnet.service.platform.service.refund; package com.liquidnet.service.platform.service.refund;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import com.liquidnet.commons.lang.util.*; import com.liquidnet.commons.lang.util.*;
import com.liquidnet.service.base.UserPathDto; import com.liquidnet.service.base.UserPathDto;
...@@ -82,61 +81,65 @@ public class KylinRefundsStatusServiceImpl { ...@@ -82,61 +81,65 @@ public class KylinRefundsStatusServiceImpl {
public boolean orderTicketRefunded(RefundCallbackParam refundCallbackParam, KylinOrderRefunds refundInfo) { public boolean orderTicketRefunded(RefundCallbackParam refundCallbackParam, KylinOrderRefunds refundInfo) {
List<KylinOrderRefundEntities> refundEntities = kylinOrderRefundsEntitiesMapper.selectList( List<KylinOrderRefundEntities> refundEntities = kylinOrderRefundsEntitiesMapper.selectList(
new QueryWrapper<KylinOrderRefundEntities>().eq("order_refunds_id", refundInfo.getOrderRefundsId()) Wrappers.lambdaQuery(KylinOrderRefundEntities.class).eq(KylinOrderRefundEntities::getOrderRefundsId, refundInfo.getOrderRefundsId())
); );
List<String> orderTicketEntitiesIdsArr = refundEntities.stream().map(KylinOrderTicketEntities -> KylinOrderTicketEntities.getOrderTicketEntitiesId()).collect(Collectors.toList()); List<String> orderTicketEntitiesIdsArr = refundEntities.stream().map(KylinOrderTicketEntities -> KylinOrderTicketEntities.getOrderTicketEntitiesId()).collect(Collectors.toList());
String orderTicketsId = refundInfo.getOrderTicketsId(); String orderTicketsId = refundInfo.getOrderTicketsId();
KylinOrderTicketRelations orderRelations = kylinOrderTicketRelationsMapper.selectOne( KylinOrderTicketRelations orderRelations = kylinOrderTicketRelationsMapper.selectOne(
new QueryWrapper<KylinOrderTicketRelations>().eq("order_id", orderTicketsId) Wrappers.lambdaQuery(KylinOrderTicketRelations.class).eq(KylinOrderTicketRelations::getOrderId, orderTicketsId)
); );
// 更新数据 // 更新数据
// 订单状态表 // 订单状态表
KylinOrderTickets orderInfo = kylinOrderTicketsMapper.selectOne( KylinOrderTickets orderInfo = kylinOrderTicketsMapper.selectOne(
new QueryWrapper<KylinOrderTickets>().eq("order_tickets_id", orderTicketsId) Wrappers.lambdaQuery(KylinOrderTickets.class).eq(KylinOrderTickets::getOrderTicketsId, orderTicketsId)
); );
KylinOrderTicketStatus orderStatusTable = new KylinOrderTicketStatus(); KylinOrderTicketStatus orderStatusTable = KylinOrderTicketStatus.getNew();
int newStatus = 0; int newStatus = 0;
if (refundCallbackParam.getRefundPrice().add(refundInfo.getPriceCharges()).add(orderInfo.getPriceRefund()).add(orderInfo.getRefundPriceCharges()).compareTo(orderInfo.getPriceActual()) >= 0) { int compareToRes = refundCallbackParam.getRefundPrice().add(refundInfo.getPriceCharges()).add(orderInfo.getPriceRefund()).add(orderInfo.getRefundPriceCharges()).compareTo(orderInfo.getPriceActual());
if (compareToRes == 0) {
newStatus = KylinTableStatusConst.ORDER_STATUS4; newStatus = KylinTableStatusConst.ORDER_STATUS4;
} else { } else if (compareToRes < 0) {
newStatus = KylinTableStatusConst.ORDER_STATUS6; newStatus = KylinTableStatusConst.ORDER_STATUS6;
} else if (compareToRes > 0) {
log.info("refundCallback: 退款金额已大于实际支付金额,编号{}", refundInfo.getOrderTicketsId());
newStatus = KylinTableStatusConst.ORDER_STATUS4;
} }
orderStatusTable.setStatus(newStatus); orderStatusTable.setStatus(newStatus);
orderStatusTable.setUpdatedAt(LocalDateTime.now()); orderStatusTable.setUpdatedAt(LocalDateTime.now());
kylinOrderTicketStatusMapper.update( int update1 = kylinOrderTicketStatusMapper.update(
orderStatusTable, new UpdateWrapper<KylinOrderTicketStatus>() orderStatusTable,
.eq("order_id", orderTicketsId) Wrappers.lambdaUpdate(KylinOrderTicketStatus.class).eq(KylinOrderTicketStatus::getOrderId, orderTicketsId)
); );
// 入场人 // 入场人
BigDecimal priceActual = orderInfo.getPriceActual(); BigDecimal priceActual = orderInfo.getPriceActual();
BigDecimal priceExpress = orderInfo.getPriceExpress(); BigDecimal priceExpress = orderInfo.getPriceExpress();
int allEntitiesCount = kylinOrderTicketEntitiesMapper.selectCount(// 总入场人数量 排出未付款的 用来计算单入场人的价格 int allEntitiesCount = kylinOrderTicketEntitiesMapper.selectCount(// 总入场人数量 排出未付款的 用来计算单入场人的价格
new QueryWrapper<KylinOrderTicketEntities>() Wrappers.lambdaQuery(KylinOrderTicketEntities.class)
.eq("order_id", orderTicketsId) .eq(KylinOrderTicketEntities::getOrderId, orderTicketsId)
.ne("is_payment", KylinTableStatusConst.ENTITIES_IS_PAYMENT0) .ne(KylinOrderTicketEntities::getIsPayment, KylinTableStatusConst.ENTITIES_IS_PAYMENT0)
); );
BigDecimal onePrice = priceActual.subtract(priceExpress).divide(BigDecimal.valueOf(allEntitiesCount));//单价 BigDecimal onePrice = priceActual.subtract(priceExpress).divide(BigDecimal.valueOf(allEntitiesCount));//单价
int refundNumber = 0; int refundNumber = 0;
for (String entitiesId : orderTicketEntitiesIdsArr) { for (String entitiesId : orderTicketEntitiesIdsArr) {
KylinOrderTicketEntities EntitiesInfo = kylinOrderTicketEntitiesMapper.selectOne(//已退完成的 KylinOrderTicketEntities EntitiesInfo = kylinOrderTicketEntitiesMapper.selectOne(//已退完成的
new QueryWrapper<KylinOrderTicketEntities>() Wrappers.lambdaQuery(KylinOrderTicketEntities.class)
.eq("order_ticket_entities_id", entitiesId) .eq(KylinOrderTicketEntities::getOrderTicketEntitiesId, entitiesId)
); );
BigDecimal refundedPrice = EntitiesInfo.getRefundPrice(); BigDecimal refundedPrice = EntitiesInfo.getRefundPrice();
KylinOrderRefundEntities refundEntitiesInfo = kylinOrderRefundsEntitiesMapper.selectOne( KylinOrderRefundEntities refundEntitiesInfo = kylinOrderRefundsEntitiesMapper.selectOne(
new QueryWrapper<KylinOrderRefundEntities>() Wrappers.lambdaQuery(KylinOrderRefundEntities.class)
.eq("order_refunds_id", refundInfo.getOrderRefundsId()) .eq(KylinOrderRefundEntities::getOrderRefundsId, refundInfo.getOrderRefundsId())
.eq("order_ticket_entities_id", entitiesId) .eq(KylinOrderRefundEntities::getOrderTicketEntitiesId, entitiesId)
); );
KylinOrderTicketEntities entitiesTable = new KylinOrderTicketEntities(); KylinOrderTicketEntities entitiesTable = KylinOrderTicketEntities.getNew();
BigDecimal priceNew = refundEntitiesInfo.getRefundPrice().add(refundedPrice); BigDecimal priceNew = refundEntitiesInfo.getRefundPrice().add(refundedPrice);
int isPayment = 0; int isPayment = 0;
if (priceNew.compareTo(onePrice) == 0) { if (priceNew.compareTo(onePrice) >= 0) {
isPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT3; isPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT3;
refundNumber++; refundNumber++;
} else { } else {
...@@ -144,11 +147,16 @@ public class KylinRefundsStatusServiceImpl { ...@@ -144,11 +147,16 @@ public class KylinRefundsStatusServiceImpl {
} }
entitiesTable.setIsPayment(isPayment); entitiesTable.setIsPayment(isPayment);
entitiesTable.setUpdatedAt(LocalDateTime.now()); entitiesTable.setUpdatedAt(LocalDateTime.now());
if (priceNew.compareTo(onePrice) > 0) {
priceNew = onePrice;
}
entitiesTable.setRefundPrice(priceNew); entitiesTable.setRefundPrice(priceNew);
Integer[] entitiesTableIsPayment = {KylinTableStatusConst.ENTITIES_IS_PAYMENT2, KylinTableStatusConst.ENTITIES_IS_PAYMENT4}; Integer[] entitiesTableIsPayment = {KylinTableStatusConst.ENTITIES_IS_PAYMENT2, KylinTableStatusConst.ENTITIES_IS_PAYMENT4};
kylinOrderTicketEntitiesMapper.update(entitiesTable, new UpdateWrapper<KylinOrderTicketEntities>() kylinOrderTicketEntitiesMapper.update(
.eq("order_ticket_entities_id", entitiesId) entitiesTable,
.in("is_payment", entitiesTableIsPayment) Wrappers.lambdaUpdate(KylinOrderTicketEntities.class)
.eq(KylinOrderTicketEntities::getOrderTicketEntitiesId, entitiesId)
.in(KylinOrderTicketEntities::getIsPayment, entitiesTableIsPayment)
); );
HashMap<String, Object> EntitiesVo = new HashMap<>(); HashMap<String, Object> EntitiesVo = new HashMap<>();
...@@ -166,18 +174,21 @@ public class KylinRefundsStatusServiceImpl { ...@@ -166,18 +174,21 @@ public class KylinRefundsStatusServiceImpl {
// 订单表 // 订单表
BigDecimal price = orderInfo.getPriceRefund().add(refundCallbackParam.getRefundPrice()); BigDecimal price = orderInfo.getPriceRefund().add(refundCallbackParam.getRefundPrice());
if (price.compareTo(orderInfo.getPriceActual()) == 1) { if (compareToRes > 0) {
price = orderInfo.getPriceActual(); price = orderInfo.getPriceActual();
} }
Integer num = orderInfo.getRefundNumber() + refundNumber; Integer num = orderInfo.getRefundNumber() + refundNumber;
KylinOrderTickets update = new KylinOrderTickets(); if (num > orderInfo.getNumber()) {
num = orderInfo.getNumber();
}
KylinOrderTickets update = KylinOrderTickets.getNew();
update.setRefundNumber(num); update.setRefundNumber(num);
update.setPriceRefund(price); update.setPriceRefund(price);
update.setUpdatedAt(LocalDateTime.now()); update.setUpdatedAt(LocalDateTime.now());
update.setRefundPriceCharges(orderInfo.getRefundPriceCharges().add(refundInfo.getPriceCharges())); update.setRefundPriceCharges(orderInfo.getRefundPriceCharges().add(refundInfo.getPriceCharges()));
kylinOrderTicketsMapper.update( int update2 = kylinOrderTicketsMapper.update(
update, new UpdateWrapper<KylinOrderTickets>() update,
.eq("order_tickets_id", orderTicketsId) Wrappers.lambdaUpdate(KylinOrderTickets.class).eq(KylinOrderTickets::getOrderTicketsId, orderTicketsId)
); );
HashMap<String, Object> orderVo = new HashMap<>(); HashMap<String, Object> orderVo = new HashMap<>();
...@@ -195,19 +206,19 @@ public class KylinRefundsStatusServiceImpl { ...@@ -195,19 +206,19 @@ public class KylinRefundsStatusServiceImpl {
mongoVoUtils.resetOrderListVo(orderInfo.getUserId(), 2, orderTicketsId, null); mongoVoUtils.resetOrderListVo(orderInfo.getUserId(), 2, orderTicketsId, null);
// 退款单完成 // 退款单完成
KylinOrderRefunds kylinOrderRefunds = new KylinOrderRefunds(); KylinOrderRefunds kylinOrderRefunds = KylinOrderRefunds.getNew();
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_REFUNDED); kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_REFUNDED);
kylinOrderRefunds.setRefundCode(refundCallbackParam.getRefundCode()); kylinOrderRefunds.setRefundCode(refundCallbackParam.getRefundCode());
kylinOrderRefunds.setRefundType(refundCallbackParam.getRefundType()); kylinOrderRefunds.setRefundType(refundCallbackParam.getRefundType());
kylinOrderRefunds.setRefundId(refundCallbackParam.getRefundId()); kylinOrderRefunds.setRefundId(refundCallbackParam.getRefundId());
kylinOrderRefunds.setRefundAt(refundCallbackParam.getRefundAt()); kylinOrderRefunds.setRefundAt(refundCallbackParam.getRefundAt());
kylinOrderRefunds.setUpdatedAt(LocalDateTime.now()); kylinOrderRefunds.setUpdatedAt(LocalDateTime.now());
kylinOrderRefundsMapper.update( int update3 = kylinOrderRefundsMapper.update(
kylinOrderRefunds, kylinOrderRefunds,
new UpdateWrapper<KylinOrderRefunds>().in("order_refunds_id", refundInfo.getOrderRefundsId()) Wrappers.lambdaUpdate(KylinOrderRefunds.class).eq(KylinOrderRefunds::getOrderRefundsId, refundInfo.getOrderRefundsId())
); );
// 修改缓存 // 修改缓存
KylinOrderRefundsVo kylinOrderRefundsVo = new KylinOrderRefundsVo(); KylinOrderRefundsVo kylinOrderRefundsVo = KylinOrderRefundsVo.getNew();
BeanUtils.copyProperties(kylinOrderRefunds, kylinOrderRefundsVo); BeanUtils.copyProperties(kylinOrderRefunds, kylinOrderRefundsVo);
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(kylinOrderRefundsVo)); BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(kylinOrderRefundsVo));
UpdateResult updateResult = mongoTemplate.getCollection(KylinOrderRefundsVo.class.getSimpleName()).updateOne( UpdateResult updateResult = mongoTemplate.getCollection(KylinOrderRefundsVo.class.getSimpleName()).updateOne(
...@@ -217,11 +228,11 @@ public class KylinRefundsStatusServiceImpl { ...@@ -217,11 +228,11 @@ public class KylinRefundsStatusServiceImpl {
dataUtils.delOrderRefundVo(refundInfo.getOrderRefundsId()); dataUtils.delOrderRefundVo(refundInfo.getOrderRefundsId());
dataUtils.delOrderRefundVoByOrderId(refundInfo.getOrderTicketsId()); dataUtils.delOrderRefundVoByOrderId(refundInfo.getOrderTicketsId());
if (refundInfo.getType() != KylinTableStatusConst.ORDER_REFUND_TYPE_AUTO) { if (refundInfo.getType() != KylinTableStatusConst.ORDER_REFUND_TYPE_AUTO && update3 > 0) {
// 退还库存 // 退还库存
for (String entitiesId : orderTicketEntitiesIdsArr) { for (String entitiesId : orderTicketEntitiesIdsArr) {
KylinOrderTicketEntities entitiesInfo = kylinOrderTicketEntitiesMapper.selectOne( KylinOrderTicketEntities entitiesInfo = kylinOrderTicketEntitiesMapper.selectOne(
new QueryWrapper<KylinOrderTicketEntities>().eq("order_ticket_entities_id", entitiesId) Wrappers.lambdaQuery(KylinOrderTicketEntities.class).eq(KylinOrderTicketEntities::getOrderTicketEntitiesId, entitiesId)
); );
if (entitiesInfo.getIsPayment() == KylinTableStatusConst.ENTITIES_IS_PAYMENT3) { if (entitiesInfo.getIsPayment() == KylinTableStatusConst.ENTITIES_IS_PAYMENT3) {
dataUtils.changeSurplusGeneral(entitiesInfo.getTicketId(), 1); dataUtils.changeSurplusGeneral(entitiesInfo.getTicketId(), 1);
......
package com.liquidnet.service.platform.service.refund; package com.liquidnet.service.platform.service.refund;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.commons.lang.util.HttpUtil; import com.liquidnet.commons.lang.util.HttpUtil;
...@@ -8,6 +7,7 @@ import com.liquidnet.service.kylin.constant.KylinTableStatusConst; ...@@ -8,6 +7,7 @@ import com.liquidnet.service.kylin.constant.KylinTableStatusConst;
import com.liquidnet.service.kylin.dto.param.RefundCallbackParam; import com.liquidnet.service.kylin.dto.param.RefundCallbackParam;
import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo; import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo;
import com.liquidnet.service.kylin.entity.KylinOrderRefunds; import com.liquidnet.service.kylin.entity.KylinOrderRefunds;
import com.liquidnet.service.kylin.entity.KylinOrderTicketStatus;
import com.liquidnet.service.kylin.entity.KylinOrderTickets; import com.liquidnet.service.kylin.entity.KylinOrderTickets;
import com.liquidnet.service.kylin.mapper.*; import com.liquidnet.service.kylin.mapper.*;
import com.liquidnet.service.kylin.service.IKylinOrderRefundsService; import com.liquidnet.service.kylin.service.IKylinOrderRefundsService;
...@@ -52,6 +52,8 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun ...@@ -52,6 +52,8 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun
private KylinOrderRefundsMapper kylinOrderRefundsMapper; private KylinOrderRefundsMapper kylinOrderRefundsMapper;
@Autowired @Autowired
private KylinOrderTicketsMapper kylinOrderTicketsMapper; private KylinOrderTicketsMapper kylinOrderTicketsMapper;
@Autowired
private KylinOrderTicketStatusMapper kylinOrderTicketStatusMapper;
@Autowired @Autowired
MongoTemplate mongoTemplate; MongoTemplate mongoTemplate;
...@@ -61,24 +63,32 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun ...@@ -61,24 +63,32 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun
private DataUtils dataUtils; private DataUtils dataUtils;
public String refundCallback(RefundCallbackParam refundCallbackParam) { public String refundCallback(RefundCallbackParam refundCallbackParam) {
log.info("订单退款回调参数:[RefundCallbackParam={}]", refundCallbackParam); log.info("refundCallback订单退款回调参数: [RefundCallbackParam={}]", refundCallbackParam);
KylinOrderRefunds refundInfo = kylinOrderRefundsMapper.selectOne( KylinOrderRefunds refundInfo = kylinOrderRefundsMapper.selectOne(
new UpdateWrapper<KylinOrderRefunds>() Wrappers.lambdaQuery(KylinOrderRefunds.class).eq(KylinOrderRefunds::getOrderRefundCode, refundCallbackParam.getOrderRefundCode())
.eq("order_refund_code", refundCallbackParam.getOrderRefundCode())
); );
if (refundInfo == null) { if (refundInfo == null) {
log.info("Failed:{}.RefundController refundCallback: 退款订单查询失败,编号{}", "KylinOrderRefundsServiceImplRefundCallback", refundCallbackParam.getOrderRefundCode()); log.info("refundCallback: 退款订单查询失败,编号{}", refundCallbackParam.getOrderRefundCode());
return "fail"; return "fail";
} }
if (refundInfo.getStatus() == KylinTableStatusConst.ORDER_REFUND_STATUS_CANCEL || refundInfo.getStatus() == KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT) { if (refundInfo.getStatus() == KylinTableStatusConst.ORDER_REFUND_STATUS_CANCEL || refundInfo.getStatus() == KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT) {
log.info("Failed:{}.RefundController refundCallback: 退款订单已取消或已运营审核拒绝,编号{}", "KylinOrderRefundsServiceImplRefundCallback", refundCallbackParam.getOrderRefundCode()); log.info("refundCallback: 退款订单已取消,编号{}", refundCallbackParam.getOrderRefundCode());
return "fail"; return "fail";
} }
if (refundInfo.getStatus() == KylinTableStatusConst.ORDER_REFUND_STATUS_REFUNDED) { if (refundInfo.getStatus() == KylinTableStatusConst.ORDER_REFUND_STATUS_REFUNDED) {
log.info("Failed:{}.RefundController refundCallback: 退款订单已退款,编号{}", "KylinOrderRefundsServiceImplRefundCallback", refundCallbackParam.getOrderRefundCode()); log.info("refundCallback: 退款订单已完成,编号{}", refundCallbackParam.getOrderRefundCode());
return "success"; return "success";
} }
/*KylinOrderTicketStatus kylinOrderTicketStatus = kylinOrderTicketStatusMapper.selectOne(
Wrappers.lambdaQuery(KylinOrderTicketStatus.class).eq(KylinOrderTicketStatus::getOrderId, refundInfo.getOrderTicketsId())
);
if (kylinOrderTicketStatus.getStatus() == KylinTableStatusConst.ORDER_STATUS4) {
log.info("refundCallback: 票订单已完成退款,编号{}", refundInfo.getOrderTicketsId());
return "success";
}*/
Integer status = refundCallbackParam.getStatus(); Integer status = refundCallbackParam.getStatus();
if (1 == status) { // 退款成功 if (1 == status) { // 退款成功
boolean res = kylinRefundsStatusServiceImpl.orderTicketRefunded(refundCallbackParam, refundInfo); boolean res = kylinRefundsStatusServiceImpl.orderTicketRefunded(refundCallbackParam, refundInfo);
...@@ -97,7 +107,7 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun ...@@ -97,7 +107,7 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun
kylinOrderRefunds.setUpdatedAt(LocalDateTime.now()); kylinOrderRefunds.setUpdatedAt(LocalDateTime.now());
kylinOrderRefundsMapper.update( kylinOrderRefundsMapper.update(
kylinOrderRefunds, kylinOrderRefunds,
new UpdateWrapper<KylinOrderRefunds>().eq("order_refunds_id", refundInfo.getOrderRefundsId()) Wrappers.lambdaUpdate(KylinOrderRefunds.class).eq(KylinOrderRefunds::getOrderRefundsId, refundInfo.getOrderRefundsId())
); );
// 修改缓存 // 修改缓存
KylinOrderRefundsVo kylinOrderRefundsVo = new KylinOrderRefundsVo(); KylinOrderRefundsVo kylinOrderRefundsVo = new KylinOrderRefundsVo();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment