| | |
| | | //添加user |
| | | R addUserResult = userService.addConvenientMerchantUser(convenientMerchantDTO); |
| | | if (R.isOk(addUserResult)) { |
| | | Long merchantUserId =Long.parseLong(addUserResult.getData().toString()); |
| | | Long merchantUserId = Long.parseLong(addUserResult.getData().toString()); |
| | | convenientMerchantDO.setUserId(merchantUserId); |
| | | this.baseMapper.updateById(convenientMerchantDO); |
| | | } else { |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public R getMerchantByUserId(Long userId) { |
| | | ConvenientMerchantVO convenientMerchantVO = this.baseMapper.selectMerchantByUserId(userId); |
| | | if (nonNull(convenientMerchantVO)){ |
| | | List<Long> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(convenientMerchantVO.getId()); |
| | | convenientMerchantVO.setServiceIds(serviceIds); |
| | | } |
| | | return R.ok(convenientMerchantVO); |
| | | } |
| | | } |