This commit is contained in:
wangw 2024-11-23 09:41:17 +08:00
parent 0cd809b07f
commit 042716e39f
1 changed files with 11 additions and 4 deletions

View File

@ -8,6 +8,7 @@ import cn.ysk.cashier.dto.shop.TbShopInfoQueryCriteria;
import cn.ysk.cashier.exception.BadRequestException;
import cn.ysk.cashier.exception.EntityNotFoundException;
import cn.ysk.cashier.mapper.shop.TbShopInfoMapper;
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;
@ -19,6 +20,7 @@ import cn.ysk.cashier.repository.shop.TbPlussShopStaffRepository;
import cn.ysk.cashier.repository.shop.TbShopInfoRepository;
import cn.ysk.cashier.service.BindService;
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;
@ -31,7 +33,6 @@ import cn.ysk.cashier.system.service.UserService;
import cn.ysk.cashier.utils.*;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
@ -62,7 +63,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;
@ -277,8 +278,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