io.dddbyexamples.cqrs.ui.WithdrawalCommand类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中io.dddbyexamples.cqrs.ui.WithdrawalCommand类的一些代码示例,展示了WithdrawalCommand类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WithdrawalCommand类的具体详情如下:
包路径:io.dddbyexamples.cqrs.ui.WithdrawalCommand
类名称:WithdrawalCommand

WithdrawalCommand介绍

暂无

代码示例

代码示例来源:origin: ddd-by-examples/all-things-cqrs

  1. @PostMapping
  2. ResponseEntity withdraw(@RequestBody WithdrawalCommand withdrawalCommand) {
  3. withdrawalProcess.withdraw(withdrawalCommand.getCard(), withdrawalCommand.getAmount());
  4. return ResponseEntity.ok().build();
  5. }

代码示例来源:origin: ddd-by-examples/all-things-cqrs

  1. CardWithdrawn withdraw(WithdrawalCommand command) {
  2. BigDecimal amount = command.getAmount();
  3. if (thereIsMoneyToWithdraw(amount)) {
  4. return new CardWithdrawn(cardId, amount);
  5. } else {
  6. throw new NotEnoughMoneyException(cardId, command.getAmount(), availableBalance());
  7. }
  8. }

代码示例来源:origin: ddd-by-examples/all-things-cqrs

  1. public void withdraw(WithdrawalCommand command) {
  2. repository.apply(command.getCard(),creditCard -> creditCard.withdraw(command));
  3. }
  4. }

代码示例来源:origin: ddd-by-examples/all-things-cqrs

  1. @PostMapping
  2. ResponseEntity withdraw(@RequestBody WithdrawalCommand withdrawalCommand) {
  3. withdrawalProcess.withdraw(withdrawalCommand.getCard(), withdrawalCommand.getAmount());
  4. return ResponseEntity.ok().build();
  5. }

代码示例来源:origin: ddd-by-examples/all-things-cqrs

  1. @PostMapping
  2. ResponseEntity withdraw(@RequestBody WithdrawalCommand withdrawalCommand) {
  3. withdrawalProcess.withdraw(withdrawalCommand.getCard(), withdrawalCommand.getAmount());
  4. return ResponseEntity.ok().build();
  5. }

代码示例来源:origin: ddd-by-examples/all-things-cqrs

  1. @PostMapping
  2. ResponseEntity withdraw(@RequestBody WithdrawalCommand withdrawalCommand) {
  3. withdrawalProcess.withdraw(withdrawalCommand.getCard(), withdrawalCommand.getAmount());
  4. return ResponseEntity.ok().build();
  5. }

代码示例来源:origin: ddd-by-examples/all-things-cqrs

  1. @PostMapping
  2. ResponseEntity withdraw(@RequestBody WithdrawalCommand withdrawalCommand) {
  3. withdrawalProcess.withdraw(withdrawalCommand.getCard(), withdrawalCommand.getAmount());
  4. return ResponseEntity.ok().build();
  5. }

代码示例来源:origin: ddd-by-examples/all-things-cqrs

  1. @PostMapping
  2. ResponseEntity withdraw(@RequestBody WithdrawalCommand withdrawalCommand) {
  3. withdrawalProcess.withdraw(withdrawalCommand.getCard(), withdrawalCommand.getAmount());
  4. return ResponseEntity.ok().build();
  5. }

代码示例来源:origin: ddd-by-examples/all-things-cqrs

  1. @PostMapping
  2. ResponseEntity withdraw(@RequestBody WithdrawalCommand withdrawalCommand) {
  3. withdrawalProcess.withdraw(withdrawalCommand.getCard(), withdrawalCommand.getAmount());
  4. return ResponseEntity.ok().build();
  5. }

相关文章