cloudroam
2024-08-30 e15121030e0510229a38c65582eb9c4c3543cc2b
src/main/java/com/mzl/flower/service/BaseService.java
@@ -463,6 +463,26 @@
        return p;
    }
    protected Customer getCustomerByUserId(String userId){
        Customer p = customerMapper.selectOne(new QueryWrapper<Customer>()
                .eq("user_id", userId));
        if(p == null){
            throw new ValidationException("客户不存在");
        }
        return p;
    }
    protected Customer getCustomer(Long id){
        Customer p = customerMapper.selectById(id);
        if(p == null){
            throw new ValidationException("商户不存在");
        }
        return p;
    }
    public Partner getCurrentPartner(){
        String userId = SecurityUtils.getUserId();
        Partner p = partnerMapper.selectOne(new QueryWrapper<Partner>()