gongzuming
2024-09-09 ead65cd9b15cd574f4e37c3376c7447efea53935
src/main/java/com/mzl/flower/service/customer/CustomerService.java
@@ -79,6 +79,7 @@
            }
            customer.create(SecurityUtils.getUserId());
            customer.setIsEnabled(true);
            customer.setLevelId(Long.valueOf(Constants.DEFAULT_MEMBER_ID));
            customerMapper.insert(customer);
        } else {//重新修改
@@ -215,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信息