陶杰
2024-08-29 d0588c993451c483cc557d4912fba86f30b0b7c7
src/main/java/com/mzl/flower/service/BaseService.java
@@ -459,6 +459,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>()