| | |
| | | import com.ruoyi.shop.service.task.ShopFileService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.AppMemberBindingDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopIdByCodeDto; |
| | | 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.sys.SysUser; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtShopIdByCodeVo; |
| | | import com.ruoyi.system.api.service.RemoteConfigService; |
| | | import com.ruoyi.system.api.service.RemoteMemberService; |
| | | import com.ruoyi.system.api.service.RemoteOrderService; |
| | | import com.ruoyi.system.api.service.RemoteUserService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.StringJoiner; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | if(shopSame!=null){ |
| | | throw new ServiceException(AppErrorConstant.SHOP_DOUBLE); |
| | | } |
| | | shop.setDelFlag(0); |
| | | shop.setShopStatus(3); |
| | | shop.setCreateTime(new Date()); |
| | | shop.setCreateUserId(mgtEditShopDto.getUserId()); |
| | |
| | | this.saveOrUpdate(shop); |
| | | } |
| | | //商户归属员工 |
| | | SysUser belongSysUser = sysUserService.getSysUser(shop.getBelongUserId()).getData(); |
| | | handleShopStaff(shop.getShopId(),belongSysUser); |
| | | if(shop.getBelongUserId()!=null){ |
| | | SysUser belongSysUser = sysUserService.getSysUser(shop.getBelongUserId()).getData(); |
| | | handleShopStaff(shop.getShopId(),belongSysUser); |
| | | } |
| | | //商户关联人员 |
| | | String relUserIds = mgtEditShopDto.getRelUserIds(); |
| | | if(StringUtils.isNotBlank(relUserIds)){ |
| | |
| | | public void deleteShopTag(String shopTag){ |
| | | shopMapper.deleteShopTag(shopTag); |
| | | } |
| | | |
| | | /** |
| | | * @description 通过code获取shopId |
| | | * @author jqs |
| | | * @date 2023/6/9 16:40 |
| | | * @param mgtShopIdByCodeDto |
| | | * @return MgtShopIdByCodeVo |
| | | */ |
| | | @Override |
| | | public MgtShopIdByCodeVo getShopIdByCode(MgtShopIdByCodeDto mgtShopIdByCodeDto){ |
| | | MgtShopIdByCodeVo mgtShopIdByCodeVo = new MgtShopIdByCodeVo(); |
| | | List<Long> shopIdList = shopMapper.getShopIdByCode(mgtShopIdByCodeDto); |
| | | if(shopIdList!=null&&!shopIdList.isEmpty()){ |
| | | String shopIdStr = shopIdList.stream() |
| | | .map(Object::toString) |
| | | .collect(Collectors.joining(",")); |
| | | mgtShopIdByCodeVo.setShopIds(shopIdStr); |
| | | } |
| | | return mgtShopIdByCodeVo; |
| | | } |
| | | |
| | | /** |
| | | * @description 获取商户list |
| | | * @author jqs |
| | | * @date 2023/6/12 14:37 |
| | | * @param mgtShopListDto |
| | | * @return List<MgtShopListSimpleVo> |
| | | */ |
| | | @Override |
| | | public List<MgtShopListSimpleVo> listMgtShopSimpleVo(MgtShopListDto mgtShopListDto){ |
| | | return shopMapper.listMgtShopSimpleVo(mgtShopListDto); |
| | | } |
| | | } |