diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopInfoServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopInfoServiceImpl.java index d7277038..8eba3b62 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopInfoServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopInfoServiceImpl.java @@ -11,6 +11,7 @@ import cn.ysk.cashier.exception.BadRequestException; import cn.ysk.cashier.exception.EntityNotFoundException; import cn.ysk.cashier.mapper.shop.TbShopInfoMapper; import cn.ysk.cashier.mybatis.mapper.MpShopInfoMapper; +import cn.ysk.cashier.pojo.product.TbProductGroup; import cn.ysk.cashier.pojo.shop.TbMerchantAccount; import cn.ysk.cashier.pojo.shop.TbMerchantRegister; import cn.ysk.cashier.pojo.shop.TbPlussShopStaff; @@ -18,6 +19,7 @@ import cn.ysk.cashier.pojo.shop.TbShopInfo; import cn.ysk.cashier.repository.TbShopPayTypeRepository; import cn.ysk.cashier.repository.shop.*; import cn.ysk.cashier.service.WxService; +import cn.ysk.cashier.service.product.TbProductGroupService; import cn.ysk.cashier.service.shop.TbShopInfoService; import cn.ysk.cashier.system.domain.Dept; import cn.ysk.cashier.system.domain.Job; @@ -66,7 +68,7 @@ public class TbShopInfoServiceImpl implements TbShopInfoService { private TbShopInfoMapper tbShopInfoMapper; private final TbMerchantAccountRepository merchantAccountRepository; - + private final TbProductGroupService tbProductGroupService; private final UserRepository userRepository; private final UserService userService; @@ -229,8 +231,14 @@ public class TbShopInfoServiceImpl implements TbShopInfoService { if (integer<4){ throw new BadRequestException("请重试"); } - - return tbShopInfoMapper.toDto(new TbShopInfo()); + TbProductGroup tbProductGroup = new TbProductGroup(); + tbProductGroup.setName("热销"); + tbProductGroup.setShopId(save.getId()); + tbProductGroup.setProductIds("[]"); + tbProductGroup.setSortMode("0"); + tbProductGroup.setUseTime(0); + tbProductGroupService.create(tbProductGroup); + return tbShopInfoMapper.toDto(save); } @Override