This commit is contained in:
GARCIIAa
2020-04-23 22:08:43 +08:00
parent e691d5c331
commit 1e10631ee2
33 changed files with 34 additions and 105 deletions

1
.idea/vcs.xml generated
View File

@@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

37
.idea/workspace.xml generated
View File

@@ -2,14 +2,30 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="54bae2af-0257-4f0e-bca8-f8b386ccffc1" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/order-query/src/main/java/com/imooc/example/order/query/OrderProjector.java" beforeDir="false" afterPath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/order-query/src/main/java/com/imooc/example/order/query/OrderProjector.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/order-query/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/order-query/src/main/resources/application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/order/src/main/java/com/imooc/example/order/config/AxonConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/order/src/main/java/com/imooc/example/order/config/AxonConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/order/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/order/src/main/resources/application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/proxy/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/proxy/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/ticket/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/ticket/src/main/resources/application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/user/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/user/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/user/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/../imooc-c8-2-spring-cloud-axon-example/user/src/main/resources/application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/order-query/src/main/java/com/group1/hw/order/config/AxonConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/order-query/src/main/java/com/group1/hw/order/config/AxonConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/order-query/src/main/java/com/group1/hw/order/query/OrderEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/order-query/src/main/java/com/group1/hw/order/query/OrderEntity.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/order-query/src/main/java/com/group1/hw/order/query/OrderProjector.java" beforeDir="false" afterPath="$PROJECT_DIR$/order-query/src/main/java/com/group1/hw/order/query/OrderProjector.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/proxy/src/main/java/com/group1/hw/proxy/HttpMethodZuulFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/proxy/src/main/java/com/group1/hw/proxy/HttpMethodZuulFilter.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/command/TicketCreateCommand.java" beforeDir="false" afterPath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/command/TicketCreateCommand.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/config/AxonConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/config/AxonConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/event/OrderTicketUnlockedEvent.java" beforeDir="false" afterPath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/event/OrderTicketUnlockedEvent.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/event/TicketCreatedEvent.java" beforeDir="false" afterPath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/event/TicketCreatedEvent.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/query/TicketProjector.java" beforeDir="false" afterPath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/query/TicketProjector.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/web/TicketController.java" beforeDir="false" afterPath="$PROJECT_DIR$/ticket/src/main/java/com/group1/hw/ticket/web/TicketController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/Customer.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/Customer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/CustomerController.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/CustomerController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/command/CustomerChargeCommand.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/command/CustomerChargeCommand.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/command/CustomerCreateCommand.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/command/CustomerCreateCommand.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/command/CustomerDepositCommand.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/command/CustomerDepositCommand.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/config/AxonConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/config/AxonConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/event/CustomerChargedEvent.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/event/CustomerChargedEvent.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/event/CustomerCreatedEvent.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/event/CustomerCreatedEvent.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/event/CustomerDepositedEvent.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/event/CustomerDepositedEvent.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/query/CustomerEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/query/CustomerEntity.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/query/CustomerEntityRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/query/CustomerEntityRepository.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/query/CustomerProjector.java" beforeDir="false" afterPath="$PROJECT_DIR$/user/src/main/java/com/group1/hw/user/query/CustomerProjector.java" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@@ -18,7 +34,7 @@
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1auKaPHmGEGTEpcWZp0IDikHsAV" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
@@ -163,7 +179,8 @@
<option name="presentableId" value="Default" />
<updated>1587580101628</updated>
<workItem from="1587580103159" duration="3112000" />
<workItem from="1587622864470" duration="3451000" />
<workItem from="1587622864470" duration="4722000" />
<workItem from="1587647185392" duration="2396000" />
</task>
<servers />
</component>

View File

@@ -10,9 +10,6 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* Created by mavlarn on 2018/5/28.
*/
@RestController
@RequestMapping("/orders")
public class OrderController {

View File

@@ -13,10 +13,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Created by mavlarn on 2018/6/4.
*/
@Configuration
public class AxonConfig {

View File

@@ -4,9 +4,6 @@ import javax.persistence.Entity;
import javax.persistence.Id;
import java.time.ZonedDateTime;
/**
* Created by mavlarn on 2018/1/20.
*/
@Entity(name = "tb_customer_order")
public class OrderEntity {

View File

@@ -11,9 +11,6 @@ import org.axonframework.eventsourcing.EventSourcingHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by mavlarn on 2018/5/22.
*/
@Service
@ProcessingGroup("OrderEventProcessor")
public class OrderProjector {

View File

@@ -18,9 +18,6 @@ import java.time.ZonedDateTime;
import static org.axonframework.commandhandling.model.AggregateLifecycle.apply;
/**
* Created by mavlarn on 2018/1/20.
*/
@Aggregate
public class Order {

View File

@@ -10,9 +10,6 @@ import org.springframework.web.bind.annotation.*;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
/**
* Created by mavlarn on 2018/5/28.
*/
@RestController
@RequestMapping("/orders")
public class OrderController {

View File

@@ -2,9 +2,6 @@ package com.group1.hw.order.command;
import org.axonframework.commandhandling.TargetAggregateIdentifier;
/**
* Created by mavlarn on 2018/5/24.
*/
public class OrderCreateCommand {
@TargetAggregateIdentifier

View File

@@ -2,9 +2,6 @@ package com.group1.hw.order.command;
import org.axonframework.commandhandling.TargetAggregateIdentifier;
/**
* Created by mavlarn on 2018/5/24.
*/
public class OrderFailCommand {
@TargetAggregateIdentifier

View File

@@ -2,9 +2,6 @@ package com.group1.hw.order.command;
import org.axonframework.commandhandling.TargetAggregateIdentifier;
/**
* Created by mavlarn on 2018/5/24.
*/
public class OrderFinishCommand {
@TargetAggregateIdentifier

View File

@@ -23,9 +23,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.concurrent.Executors;
/**
* Created by mavlarn on 2018/6/4.
*/
@Configuration
public class AxonConfig {

View File

@@ -2,9 +2,6 @@ package com.group1.hw.order.query;
import org.axonframework.common.Assert;
/**
* Created by mavlarn on 2018/6/27.
*/
public class OrderId {
private final String identifier;

View File

@@ -7,9 +7,6 @@ import org.axonframework.spring.config.AxonConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* Created by mavlarn on 2018/5/29.
*/
@Component
public class OrderQueryHandler {

View File

@@ -10,9 +10,6 @@ import javax.servlet.http.HttpServletRequest;
import static org.springframework.cloud.netflix.zuul.filters.support.FilterConstants.ROUTE_TYPE;
/**
* Created by mavlarn on 2018/6/6.
*/
@Component
public class HttpMethodZuulFilter extends ZuulFilter {

View File

@@ -2,9 +2,6 @@ package com.group1.hw.ticket.command;
import org.axonframework.commandhandling.TargetAggregateIdentifier;
/**
* Created by mavlarn on 2018/5/28.
*/
public class TicketCreateCommand {
@TargetAggregateIdentifier

View File

@@ -13,10 +13,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Created by mavlarn on 2018/6/4.
*/
@Configuration
public class AxonConfig {

View File

@@ -1,8 +1,5 @@
package com.group1.hw.ticket.event;
/**
* Created by mavlarn on 2018/5/27.
*/
public class OrderTicketUnlockedEvent {
private String ticketId;

View File

@@ -1,8 +1,5 @@
package com.group1.hw.ticket.event;
/**
* Created by mavlarn on 2018/5/28.
*/
public class TicketCreatedEvent {
private String ticketId;

View File

@@ -12,9 +12,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* Created by mavlarn on 2018/6/5.
*/
@Component
@ProcessingGroup("TicketEventProcessor")
public class TicketProjector {

View File

@@ -13,9 +13,6 @@ import java.util.List;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
/**
* Created by mavlarn on 2018/5/28.
*/
@RestController
@RequestMapping("/tickets")
public class TicketController {

View File

@@ -19,9 +19,6 @@ import org.slf4j.LoggerFactory;
import static org.axonframework.commandhandling.model.AggregateLifecycle.apply;
/**
* Created by mavlarn on 2018/5/24.
*/
@Aggregate
public class Customer {

View File

@@ -14,9 +14,6 @@ import java.util.List;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
/**
* Created by mavlarn on 2018/5/22.
*/
@RestController
@RequestMapping("/customers")
public class CustomerController {

View File

@@ -4,9 +4,7 @@ import org.axonframework.commandhandling.TargetAggregateIdentifier;
import javax.validation.constraints.Min;
/**
* Created by mavlarn on 2018/5/22.
*/
public class CustomerChargeCommand {
@TargetAggregateIdentifier

View File

@@ -2,9 +2,7 @@ package com.group1.hw.user.command;
import org.axonframework.commandhandling.TargetAggregateIdentifier;
/**
* Created by mavlarn on 2018/5/22.
*/
public class CustomerCreateCommand {
@TargetAggregateIdentifier

View File

@@ -4,9 +4,7 @@ import org.axonframework.commandhandling.TargetAggregateIdentifier;
import javax.validation.constraints.Min;
/**
* Created by mavlarn on 2018/5/22.
*/
public class CustomerDepositCommand {
@TargetAggregateIdentifier

View File

@@ -14,9 +14,6 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Created by mavlarn on 2018/6/4.
*/
@Configuration
public class AxonConfig {

View File

@@ -1,9 +1,7 @@
package com.group1.hw.user.event;
/**
* Created by mavlarn on 2018/5/22.
*/
public class CustomerChargedEvent {
private String customerId;

View File

@@ -1,8 +1,6 @@
package com.group1.hw.user.event;
/**
* Created by mavlarn on 2018/5/22.
*/
public class CustomerCreatedEvent {
private String customerId;

View File

@@ -1,8 +1,6 @@
package com.group1.hw.user.event;
/**
* Created by mavlarn on 2018/5/22.
*/
public class CustomerDepositedEvent {
private String customerId;

View File

@@ -4,9 +4,6 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* Created by mavlarn on 2018/1/20.
*/
@Entity(name = "tb_customer")
public class CustomerEntity {

View File

@@ -2,8 +2,5 @@ package com.group1.hw.user.query;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* Created by mavlarn on 2018/5/22.
*/
public interface CustomerEntityRepository extends JpaRepository<CustomerEntity, String> {
}

View File

@@ -9,9 +9,6 @@ import org.axonframework.eventhandling.EventHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by mavlarn on 2018/5/22.
*/
@Service
@ProcessingGroup("UserEventProcessor")
public class CustomerProjector {