8 changed files with 156 additions and 11 deletions
Unified View
Diff Options
-
4dating-agency-mall-constant/src/main/java/com/qniao/dam/domian/aggregate/ora/constant/RefundOrderTypeEnum.java
-
7dating-agency-mall-entity/src/main/java/com/qniao/dam/domain/aggregate/eso/entity/EntrustServiceOrder.java
-
7dating-agency-mall-server/src/main/java/com/qniao/dam/api/command/eso/user/EntrustServiceOrderUserCommandController.java
-
29dating-agency-mall-server/src/main/java/com/qniao/dam/api/command/eso/user/request/request/UserRefundEntrustServiceOrderDto.java
-
7dating-agency-mall-server/src/main/java/com/qniao/dam/application/handler/ora/OrderRefundApplicationEventHandler.java
-
79dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/eso/EntrustServiceOrderApplicationService.java
-
8dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/ora/OrderRefundApplicationApplicationService.java
-
26dating-agency-mall-server/src/main/java/com/qniao/dam/domain/service/eso/RefundEntrustServiceOrderDomainService.java
@ -0,0 +1,29 @@ |
|||||
|
package com.qniao.dam.api.command.eso.user.request.request; |
||||
|
|
||||
|
import com.qniao.dam.domain.aggregate.eso.entity.EntrustServiceOrder; |
||||
|
import com.qniao.domain.Trans2DomainAssembler; |
||||
|
import com.qniao.framework.utils.TypeConvertUtils; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.Size; |
||||
|
|
||||
|
@Data |
||||
|
public class UserRefundEntrustServiceOrderDto implements Trans2DomainAssembler<EntrustServiceOrder> { |
||||
|
|
||||
|
@ApiModelProperty("唯一标识") |
||||
|
@NotNull(message = "唯一标识不能为空") |
||||
|
private Long id; |
||||
|
|
||||
|
@ApiModelProperty("退款原因") |
||||
|
@NotNull(message = "退款原因不能为空") |
||||
|
@Size(max = 100,min = 1, message = "退款原因不超过100个字符") |
||||
|
private String refundReason; |
||||
|
|
||||
|
@Override |
||||
|
public EntrustServiceOrder trans2Domain() { |
||||
|
return TypeConvertUtils.convert(this, EntrustServiceOrder.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
package com.qniao.dam.domain.service.eso; |
||||
|
|
||||
|
import com.qniao.dam.domain.aggregate.eso.EntrustServiceOrderAggregate; |
||||
|
import com.qniao.dam.domain.aggregate.eso.entity.EntrustServiceOrder; |
||||
|
import com.qniao.dam.domain.aggregate.ora.OrderRefundApplicationAggregate; |
||||
|
import com.qniao.dam.domain.aggregate.ora.entity.OrderRefundApplication; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
@Service |
||||
|
public class RefundEntrustServiceOrderDomainService { |
||||
|
|
||||
|
@Resource |
||||
|
private EntrustServiceOrderAggregate entrustServiceOrderAggregate; |
||||
|
@Resource |
||||
|
private OrderRefundApplicationAggregate orderRefundApplicationAggregate; |
||||
|
|
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void handle(EntrustServiceOrder entrustServiceOrder, |
||||
|
OrderRefundApplication orderRefundApplication) { |
||||
|
entrustServiceOrderAggregate.edit(entrustServiceOrder); |
||||
|
orderRefundApplicationAggregate.create(orderRefundApplication); |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save