This commit is contained in:
gzlv
2021-07-13 19:03:21 +08:00
parent 3261b76127
commit 538abaa5d5
9 changed files with 122 additions and 124 deletions

View File

@ -22,14 +22,15 @@ import java.util.List;
import java.util.Map;
/**
* @author hupeng
* @date 2020-05-13
*/
public interface YxStoreSeckillService extends BaseService<YxStoreSeckill>{
* @author hupeng
* @date 2020-05-13
*/
public interface YxStoreSeckillService extends BaseService<YxStoreSeckill> {
/**
* 产品详情
*
* @param id 秒杀商品id
* @return StoreSeckillVo
*/
@ -37,7 +38,8 @@ public interface YxStoreSeckillService extends BaseService<YxStoreSeckill>{
/**
* 秒杀产品列表
* @param page page
*
* @param page page
* @param limit limit
* @return list
*/
@ -45,33 +47,37 @@ public interface YxStoreSeckillService extends BaseService<YxStoreSeckill>{
/**
* 秒杀产品列表(首页用)
* @param page page
*
* @param page page
* @param limit limit
* @return list
*/
List<YxStoreSeckillQueryVo> getList(int page, int limit);
/**
* 查询数据分页
* @param criteria 条件
* @param pageable 分页参数
* @return Map<String,Object>
*/
Map<String,Object> queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable);
* 查询数据分页
*
* @param criteria 条件
* @param pageable 分页参数
* @return Map<String, Object>
*/
Map<String, Object> queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable);
/**
* 查询所有数据不分页
* @param criteria 条件参数
* @return List<YxStoreSeckillDto>
*/
* 查询所有数据不分页
*
* @param criteria 条件参数
* @return List<YxStoreSeckillDto>
*/
List<YxStoreSeckill> queryAll(YxStoreSeckillQueryCriteria criteria);
/**
* 导出数据
* @param all 待导出的数据
* @param response /
* @throws IOException /
*/
* 导出数据
*
* @param all 待导出的数据
* @param response /
* @throws IOException /
*/
void download(List<YxStoreSeckillDto> all, HttpServletResponse response) throws IOException;
boolean saveSeckill(YxStoreSeckillDto resources);

View File

@ -79,16 +79,6 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
@Autowired
private YxShippingTemplatesService shippingTemplatesService;
// @Override
// public YxStoreSeckill getSeckill(int id) {
// LambdaQueryWrapper<YxStoreSeckill> wrapper = new LambdaQueryWrapper<>();
// int nowTime = OrderUtil.getSecondTimestampTwo();
// wrapper.eq("id",id).eq("is_del",0).eq("status",1)
// .le("start_time",nowTime).ge("stop_time",nowTime);
// return yxStoreSeckillMapper.selectOne(wrapper);
// }
/**
* 产品详情
* @param id 砍价商品id
@ -114,7 +104,7 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
String tempName = "";
if(StrUtil.isBlank(storeFreePostage)
|| !NumberUtil.isNumber(storeFreePostage)
|| Integer.valueOf(storeFreePostage) == 0){
|| Integer.parseInt(storeFreePostage) == 0){
tempName = "全国包邮";
}else{
YxShippingTemplates shippingTemplates = shippingTemplatesService.getById(storeSeckill.getTempId());

View File

@ -46,5 +46,5 @@ public interface YxStoreProductRuleService extends BaseService<YxStoreProductRu
* @param response /
* @throws IOException /
*/
void download(List<YxStoreProductRuleDto> all, HttpServletResponse response) throws IOException;
void download(List<YxStoreProductRule> all, HttpServletResponse response) throws IOException;
}

View File

@ -88,6 +88,10 @@ public class YxStoreProductAttrServiceImpl extends BaseServiceImpl<StoreProductA
attrGroup.add(yxStoreProductAttr);
}
/*int count = storeProductAttrValueService.count(Wrappers.<YxStoreProductAttrValue>lambdaQuery().eq(YxStoreProductAttrValue::getProductId, productId));
if (count > 0 ) {
throw new BadRequestException("该产品已被添加到其他活动,禁止操作!");
}*/
List<YxStoreProductAttrValue> valueGroup = new ArrayList<>();
for (ProductFormatDto productFormatDto : attrs) {

View File

@ -64,9 +64,9 @@ public class YxStoreProductRuleServiceImpl extends BaseServiceImpl<YxStoreProduc
@Override
public void download(List<YxStoreProductRuleDto> all, HttpServletResponse response) throws IOException {
public void download(List<YxStoreProductRule> all, HttpServletResponse response) throws IOException {
List<Map<String, Object>> list = new ArrayList<>();
for (YxStoreProductRuleDto yxStoreProductRule : all) {
for (YxStoreProductRule yxStoreProductRule : all) {
Map<String,Object> map = new LinkedHashMap<>();
map.put("规格名称", yxStoreProductRule.getRuleName());
map.put("规格值", yxStoreProductRule.getRuleValue());