|
|
@ -5,6 +5,7 @@ |
|
|
|
*/ |
|
|
|
package com.shop.cereshop.business.service.tool.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.shop.cereshop.business.dao.tool.CereShopGroupWorkDAO; |
|
|
@ -19,6 +20,7 @@ import com.shop.cereshop.business.service.order.CereShopOrderService; |
|
|
|
import com.shop.cereshop.business.service.platformtool.CerePlatformDiscountService; |
|
|
|
import com.shop.cereshop.business.service.platformtool.CerePlatformSeckillService; |
|
|
|
import com.shop.cereshop.business.service.redis.CereRedisKeyServcice; |
|
|
|
import com.shop.cereshop.business.service.shop.CerePlatformShopService; |
|
|
|
import com.shop.cereshop.business.service.tool.CereShopGroupWorkDetailService; |
|
|
|
import com.shop.cereshop.business.service.tool.CereShopGroupWorkService; |
|
|
|
import com.shop.cereshop.commons.constant.CoReturnFormat; |
|
|
@ -28,6 +30,7 @@ import com.shop.cereshop.commons.constant.StringEnum; |
|
|
|
import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; |
|
|
|
import com.shop.cereshop.commons.domain.collage.CereCollageOrder; |
|
|
|
import com.shop.cereshop.commons.domain.common.Page; |
|
|
|
import com.shop.cereshop.commons.domain.shop.CerePlatformShop; |
|
|
|
import com.shop.cereshop.commons.domain.tool.CereShopGroupWork; |
|
|
|
import com.shop.cereshop.commons.domain.tool.CereShopGroupWorkDetail; |
|
|
|
import com.shop.cereshop.commons.exception.CoBusinessException; |
|
|
@ -81,6 +84,9 @@ public class CereShopGroupWorkServiceImpl implements CereShopGroupWorkService { |
|
|
|
@Autowired |
|
|
|
private ProjectInvokeUtil projectInvokeUtil; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private CerePlatformShopService platformShopService; |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) |
|
|
|
public void save(ShopGroupWorkSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { |
|
|
@ -382,9 +388,19 @@ public class CereShopGroupWorkServiceImpl implements CereShopGroupWorkService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Page getProducts(ToolProductParam param) throws CoBusinessException { |
|
|
|
public Page getProducts(ToolProductNewParam param) throws CoBusinessException { |
|
|
|
PageHelper.startPage(param.getPage(),param.getPageSize()); |
|
|
|
List<ToolProduct> list=cereShopGroupWorkDAO.getProducts(param.getShopId(), param.getActivityId()); |
|
|
|
List<ToolProduct> list=cereShopGroupWorkDAO.getProducts(param.getBusinessId(), param.getActivityId(), param.getSearchContent()); |
|
|
|
list.forEach(toolProduct -> { |
|
|
|
try { |
|
|
|
CerePlatformShop platformShop = platformShopService.getById(toolProduct.getShopId()); |
|
|
|
if (ObjectUtils.isNotEmpty(platformShop)){ |
|
|
|
toolProduct.setShopName(platformShop.getShopName()); |
|
|
|
} |
|
|
|
} catch (CoBusinessException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
}); |
|
|
|
PageInfo<ToolProduct> pageInfo=new PageInfo<>(list); |
|
|
|
Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); |
|
|
|
return page; |
|
|
|