feat:下单bug
This commit is contained in:
1 parent
a932190426
commit
2b25aafc15
13 files changed
+120
-22
No files matched your search
+5
-3
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.wallet.api.dto;
|
||||
|
||||
import com.bsd.pjcloud.wallet.api.constant.WalletBizEnum;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -9,22 +10,23 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NotEmpty
|
||||
@Data
|
||||
public class WalletBalanceTransactionDto {
|
||||
|
||||
@NotNull(message = "钱包id不能为空")
|
||||
@JsonProperty("walletId")
|
||||
private Long walletId;
|
||||
|
||||
@NotNull(message = "操作金额不能为空")
|
||||
@JsonProperty("price")
|
||||
private Integer price;
|
||||
|
||||
@NotEmpty(message = "业务类型关联id不能为空")
|
||||
@JsonProperty("bizId")
|
||||
private String bizId;
|
||||
|
||||
@NotNull(message = "业务类型不能为空")
|
||||
@JsonProperty("bizType")
|
||||
private WalletBizEnum bizType;
|
||||
|
||||
}
|
||||
+3
-3
@@ -6,18 +6,18 @@ import com.bsd.pjcloud.common.feign.annotation.NoToken;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletBalanceTransactionDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletTransactionEntity;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(contextId = "remoteWalletTransactionService", value = ServiceNameConstants.WALLET_SERVICE)
|
||||
public interface RemoteWalletTransactionService {
|
||||
|
||||
@NoToken
|
||||
@GetMapping("/wallet-transaction/add-balance")
|
||||
@PostMapping("/wallet-transaction/add-balance")
|
||||
R<WalletTransactionEntity> addWalletBalance(@RequestBody WalletBalanceTransactionDto dto);
|
||||
|
||||
@NoToken
|
||||
@GetMapping("/wallet-transaction/reduce-balance")
|
||||
@PostMapping("/wallet-transaction/reduce-balance")
|
||||
R<WalletTransactionEntity> reduceWalletBalance(@RequestBody WalletBalanceTransactionDto dto);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user