|
|
|
@ -40,6 +40,9 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe
|
|
|
|
|
@Autowired
|
|
|
|
|
private StuGoodsInfoMapper stuGoodsInfoMapper;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
StuShoppingCartInfoMapper shoppingCartInfoMapper;
|
|
|
|
|
|
|
|
|
|
//小广告位招租
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity getSmallAdPlacement(String userId) {
|
|
|
|
@ -100,8 +103,17 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//大广告招租
|
|
|
|
|
@Resource
|
|
|
|
|
StuShoppingCartInfoMapper shoppingCartInfoMapper;
|
|
|
|
|
public PageInfo<StuShoppingCartInfo> getShoppingCartInfo(String userId, Integer index, Integer size) {
|
|
|
|
|
StuShoppingCartInfoExample cartInfoExample=new StuShoppingCartInfoExample();
|
|
|
|
|
|
|
|
|
|
cartInfoExample.createCriteria().andUserIdEqualTo(userId);
|
|
|
|
|
|
|
|
|
|
List<StuShoppingCartInfo> stuShoppingCartInfos = shoppingCartInfoMapper.selectByExample(cartInfoExample);
|
|
|
|
|
return PageUtil.pageHelper(stuShoppingCartInfos,index,size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity getBigAdPlacement(String userId) {
|
|
|
|
|
//查询用户商品销售管理数据
|
|
|
|
@ -110,9 +122,6 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe
|
|
|
|
|
goodSalesManageExample.createCriteria().andUserIdEqualTo(userId).andStateEqualTo(1);
|
|
|
|
|
List<StuGoodSalesManage> goodSalesManageList = stuGoodSalesManageMapper.selectByExample(goodSalesManageExample);
|
|
|
|
|
if (goodSalesManageList != null && goodSalesManageList.size() > 0) {
|
|
|
|
|
public PageInfo<StuShoppingCartInfo> getShoppingCartInfo(String userId, Integer index, Integer size) {
|
|
|
|
|
StuShoppingCartInfoExample cartInfoExample=new StuShoppingCartInfoExample();
|
|
|
|
|
cartInfoExample.createCriteria().andUserIdEqualTo(userId);
|
|
|
|
|
|
|
|
|
|
if (goodSalesManageList.size() >= 2) {
|
|
|
|
|
Collections.shuffle(goodSalesManageList, new Random(System.currentTimeMillis()));
|
|
|
|
@ -122,10 +131,10 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe
|
|
|
|
|
return new ResultEntity<>(goodSalesManageList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<StuShoppingCartInfo> stuShoppingCartInfos = shoppingCartInfoMapper.selectByExample(cartInfoExample);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.NO_CONTENT);
|
|
|
|
|
return PageUtil.pageHelper(stuShoppingCartInfos,index,size);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//根据类型展示数据
|
|
|
|
|