| | |
| | | import com.ruoyi.shop.service.shop.*; |
| | | import com.ruoyi.shop.service.task.MemberTaskService; |
| | | import com.ruoyi.shop.service.task.ShopTaskService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopIdByCodeDto; |
| | |
| | | { |
| | | String mobile = qwUserDetail.getMobile(); |
| | | ShopStaff shopStaff = shopStaffService.getByMobile(mobile); |
| | | if(shopStaff==null){ |
| | | throw new ServiceException(AppErrorConstant.USER_NO_SHOP); |
| | | } |
| | | Long userId = shopStaff.getUserId(); |
| | | SysUser sysUser = remoteUserService.getSysUser(userId).getData(); |
| | | Optional.ofNullable(sysUser).orElseThrow(() -> new ServiceException("登录失败,未查询到用户")); |
| | |
| | | ShopRelUserVo shopRelUserVo = new ShopRelUserVo(); |
| | | shopRelUserVo.setShopId(shopRelUser.getShopId()); |
| | | shopRelUserVo.setUserName(shopRelUser.getUserName()); |
| | | return R.ok(shopRelUserVo); |
| | | } |
| | | |
| | | @PostMapping("/getShopByBelongUserId") |
| | | public R<ShopRelUserVo> getShopByBelongUserId(@RequestBody Long userId) |
| | | { |
| | | Shop shop = shopService.getShopByBelongUserId(userId); |
| | | Optional.ofNullable(shop).orElseThrow(() -> new ServiceException("未查询到商户信息")); |
| | | ShopRelUserVo shopRelUserVo = new ShopRelUserVo(); |
| | | shopRelUserVo.setShopId(shop.getShopId()); |
| | | return R.ok(shopRelUserVo); |
| | | } |
| | | |
| | |
| | | } |
| | | return R.ok(marketingStatus); |
| | | } |
| | | |
| | | |
| | | } |