| Pass |
- 10:04:18 |
+ 10:46:04 |
Test passed
|
@@ -128,13 +128,13 @@
Started
-
ʮÔÂ 28, 2026 10:04:17
+
ʮÔÂ 28, 2026 10:46:04
Ended
-
ʮÔÂ 28, 2026 10:04:18
+
ʮÔÂ 28, 2026 10:46:05
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ReturnCommissionController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ReturnCommissionController.java
index 81b36c12..2db60bae 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ReturnCommissionController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ReturnCommissionController.java
@@ -190,6 +190,10 @@ public class ReturnCommissionController {
if (!isShopWalletWithdrawEnabled(shop)) {
return ResultUtil.error("该店铺已设置不显示钱包余额且不可提现!");
}
+ final Result shopAliInfoValidateResult = validateShopAliInfo(returnCommission, shop);
+ if (shopAliInfoValidateResult != null) {
+ return shopAliInfoValidateResult;
+ }
returnCommission.setRemark("商家" + shop.getShopName() + "提现");
final BigDecimal shopBalance = shop.getBalance() == null ? BigDecimal.ZERO : shop.getBalance();
if (shopBalance.compareTo(returnCommission.getCommission()) < 0) {
@@ -522,6 +526,22 @@ public class ReturnCommissionController {
return shop != null && !Integer.valueOf(0).equals(shop.getShowWalletWithdraw());
}
+ private Result validateShopAliInfo(ReturnCommission returnCommission, Shop shop) {
+ if (!equalsTrim(returnCommission.getAliAccount(), shop.getAliAccount())
+ || !equalsTrim(returnCommission.getAliName(), shop.getAliName())) {
+ return ResultUtil.error("支付宝账号或户名与店铺绑定信息不一致,不可提现!");
+ }
+ return null;
+ }
+
+ private boolean equalsTrim(String left, String right) {
+ return trimToEmpty(left).equals(trimToEmpty(right));
+ }
+
+ private String trimToEmpty(String value) {
+ return value == null ? "" : value.trim();
+ }
+
private boolean isValidAliAccount(String aliAccount) {
final String account = aliAccount == null ? "" : aliAccount.trim();
return PHONE_PATTERN.matcher(account).matches() || EMAIL_PATTERN.matcher(account).matches();
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
index a38b2916..0022fa8b 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
@@ -60,6 +60,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
@@ -243,6 +244,57 @@ public class ShopController {
return ResultUtil.success("编辑成功");
}
+ @RequestMapping(value = "/changeOwnerByMobile", method = RequestMethod.POST)
+ @ResponseBody
+ @Transactional
+ @ApiOperation("根据手机号换绑店铺商家账号")
+ public Result