-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
演示如何通过shared kernel在core/sub domains里进行交互
- Loading branch information
Showing
7 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
order-center-cp/cp-oc-spec/src/main/java/org/example/cp/oms/spec/model/vo/IOrderItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
package org.example.cp.oms.spec.model.vo; | ||
|
||
public interface IOrderItem { | ||
|
||
String getSku(); | ||
Integer getQuantity(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...r-center-stock-spec/src/main/java/org/example/oms/d/stock/spec/service/IStockService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
package org.example.oms.d.stock.spec.service; | ||
|
||
import io.github.dddplus.model.IDomainService; | ||
import org.example.cp.oms.spec.model.IOrderMain; | ||
|
||
// 库存相关的服务,都收敛在库存支撑域,通过领域服务提供给订单核心域调用:JVM内调用, not RPC | ||
public interface IStockService extends IDomainService { | ||
|
||
/** | ||
* 预占预存. | ||
* | ||
* @param sku 商品的sku编号 | ||
* @param orderMain core domain提供的领域模型聚合根 | ||
*/ | ||
void occupyStock(String sku); | ||
void occupyStock(IOrderMain orderMain); | ||
|
||
} |