From 7c3271d538f7333a96f14d6413889b0e8453073f Mon Sep 17 00:00:00 2001
From: Cui Zhi Feng <7426394+wuxixiaocui@user.noreply.gitee.com>
Date: 星期二, 10 九月 2024 08:08:50 +0800
Subject: [PATCH] 质检 退款金额null
---
src/main/java/com/mzl/flower/service/customer/CustomerService.java | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/mzl/flower/service/customer/CustomerService.java b/src/main/java/com/mzl/flower/service/customer/CustomerService.java
index 0081055..84774d7 100644
--- a/src/main/java/com/mzl/flower/service/customer/CustomerService.java
+++ b/src/main/java/com/mzl/flower/service/customer/CustomerService.java
@@ -79,6 +79,8 @@
}
customer.create(SecurityUtils.getUserId());
+ customer.setIsEnabled(true);
+ customer.setLevelId(Long.valueOf(Constants.DEFAULT_MEMBER_ID));
customerMapper.insert(customer);
} else {//重新修改
customer = customerMapper.selectById(dto.getId());
@@ -214,6 +216,19 @@
}
return null;
}
+ public void isEnable(Long id) {
+ Customer customer = customerMapper.selectById(id);
+ if (customer == null) {
+ throw new ValidationException("商户信息不存在");
+ }
+ if (customer.getIsEnabled()) {
+ customer.setIsEnabled(false);
+ } else {
+ customer.setIsEnabled(true);
+ }
+ customer.update(SecurityUtils.getUserId());
+ customerMapper.updateById(customer);
+ }
/**
* 根据会员等级获取等级下的customer信息
--
Gitblit v1.9.3