| | |
| | | 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>() |