| | |
| | | import com.ruoyi.shop.domain.pojo.task.ShopFile; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopTask; |
| | | import com.ruoyi.shop.domain.vo.*; |
| | | import com.ruoyi.shop.domain.vo.MgtShopPageVo; |
| | | import com.ruoyi.shop.enums.WxApplyMentStateEnum; |
| | | import com.ruoyi.shop.mapper.shop.ShopMapper; |
| | | import com.ruoyi.shop.service.shop.*; |
| | |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.poji.shop.ShopAppointableTime; |
| | | import com.ruoyi.system.api.domain.poji.shop.TShopAppointableTime; |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.service.*; |
| | |
| | | shopFileService.deleteByShopId(shop.getShopId()); |
| | | shopRelTagService.deleteByShopId(shop.getShopId()); |
| | | shopRelUserService.deleteByShopId(shop.getShopId()); |
| | | //默认登录账号开关 开启后原默认账号开关关闭 |
| | | List<Long> openIdList = Arrays.stream(mgtEditShopDto.getRelUserOpenIds().split(",")) |
| | | .map(String::trim) |
| | | .filter(StringUtils::isNotBlank) |
| | | .map(Long::valueOf) |
| | | .collect(Collectors.toList()); |
| | | if ( !openIdList.isEmpty()) { |
| | | shopRelUserService.setDefaultCloseByUserIdList(openIdList); |
| | | } |
| | | |
| | | //清空归属 |
| | | shopStaffService.clearShopStaffRelation(shop.getShopId()); |
| | | if(!shop.getShopName().equals(mgtEditShopDto.getShopName())){ |
| | |
| | | handleShopStaff(shop.getShopId(),belongSysUser); |
| | | }*/ |
| | | //商户关联人员 |
| | | String[] openIds = mgtEditShopDto.getRelUserOpenIds().split(",");//开启默认登录账号 |
| | | if(StringUtils.isNotBlank(relUserIds)){ |
| | | shopStaffService.clearShopStaffRelation(shop.getShopId()); |
| | | String[] relUserIdArray = relUserIds.split(","); |
| | |
| | | shopRelUser.setUserName(sysUser.getNickName()); |
| | | shopRelUser.setUserMobile(sysUser.getPhonenumber()); |
| | | shopRelUser.setUserDeptId(sysUser.getDeptId()); |
| | | shopRelUser.setIsDefault((openIds.length > 0 && Arrays.asList(openIds).contains(str)) ? 1 : 0); |
| | | shopRelUserService.save(shopRelUser); |
| | | handleShopStaff(shop.getShopId(),sysUser); |
| | | } |
| | |
| | | if(shopRelUserList!=null&&!shopRelUserList.isEmpty()){ |
| | | StringJoiner shopUserJs = new StringJoiner(","); |
| | | StringJoiner shopUserNameJs = new StringJoiner(","); |
| | | StringJoiner relUserOpenIds = new StringJoiner(","); |
| | | for(ShopRelUser shopRelUser : shopRelUserList){ |
| | | shopUserJs.add(shopRelUser.getUserId().toString()); |
| | | shopUserNameJs.add(shopRelUser.getUserName()); |
| | | if (shopRelUser.getIsDefault()==1){ |
| | | relUserOpenIds.add(shopRelUser.getUserId().toString()); |
| | | } |
| | | } |
| | | mgtShopInfoVo.setRelUserIds(shopUserJs.toString()); |
| | | mgtShopInfoVo.setRelUsers(shopUserNameJs.toString()); |
| | | mgtShopInfoVo.setRelUserOpenIds(relUserOpenIds.toString()); |
| | | } |
| | | //商户图片 |
| | | List<ShopFile> shopFileList = shopFileService.listShopFileByShopId(shopId); |
| | |
| | | merHomeShopTotalVo.setExplorationSurp(orderVo.getExplorationSurp()); |
| | | merHomeShopTotalVo.setPlatformBirthdayFlag(shop.getPlatformBirthdayFlag()); |
| | | merHomeShopTotalVo.setPlatformCouponFlag(shop.getPlatformCouponFlag()); |
| | | int unHandleReserve = shopAppointableTimeService.count(new LambdaQueryWrapper<ShopAppointableTime>().eq(ShopAppointableTime::getShopId, shopId).eq(ShopAppointableTime::getStatus, 1)); |
| | | int unHandleReserve = shopAppointableTimeService.count(new LambdaQueryWrapper<TShopAppointableTime>().eq(TShopAppointableTime::getShopId, shopId).eq(TShopAppointableTime::getStatus, 1)); |
| | | merHomeShopTotalVo.setUnHandleReserve(unHandleReserve); |
| | | return merHomeShopTotalVo; |
| | | } |