记得上下班打卡 | git大法好,push需谨慎

Commit 24f92a6c authored by 胡佳晨's avatar 胡佳晨

提交 正在下单配置

parent 6504a531
......@@ -10,8 +10,8 @@ import lombok.Data;
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinStoreMgtInfoVo implements java.io.Serializable, Cloneable {
private static final long serialVersionUID = 6109909470490181810L;
// @ApiModelProperty(position = 10, value = "店铺ID[64]")
// private String storeId;
@ApiModelProperty(position = 10, value = "店铺ID[64]")
private String storeId;
@ApiModelProperty(position = 11, value = "店铺名称[128]")
private String storeName;
@ApiModelProperty(position = 12, value = "店铺LOGO[256]")
......
......@@ -13,6 +13,8 @@ public class GoblinMarketRelationVo implements Serializable, Cloneable {
private static final long serialVersionUID = 2353354057235207502L;
@ApiModelProperty(position = 11, value = "spuId")
private String spuId;
@ApiModelProperty(position = 11, value = "storeId")
private String storeId;
@ApiModelProperty(position = 12, value = "skuId 集合")
private List<String> skuList;
......
package com.liquidnet.service.goblin.service;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo;
import com.liquidnet.service.goblin.dto.vo.GoblinStoreInfoVo;
import java.util.List;
public interface IGoblinAppZhengzaiService {
List<GoblinSelfMarketingVo> getZhengzaiMarketList();
List<GoblinStoreInfoVo> getStoreList(String marketId);
}
package com.liquidnet.service.goblin.controller;
import com.liquidnet.service.goblin.service.IGoblinAppZhengzaiService;
import com.liquidnet.service.goblin.service.IGoblinStoreZhengzaiService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
......
package com.liquidnet.service.goblin.service.impl;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtInfoVo;
import com.liquidnet.service.goblin.dto.vo.GoblinMarketRelationVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo;
import com.liquidnet.service.goblin.dto.vo.GoblinStoreInfoVo;
import com.liquidnet.service.goblin.service.IGoblinAppZhengzaiService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
import com.liquidnet.service.goblin.util.QueueUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
......@@ -18,4 +25,16 @@ public class GoblinAppZhengzaiServiceImpl implements IGoblinAppZhengzaiService {
@Autowired
QueueUtils queueUtils;
@Override
public List<GoblinSelfMarketingVo> getZhengzaiMarketList() {
return mongoUtils.getGoblinSelfMarketingVoList();
}
@Override
public List<GoblinStoreInfoVo> getStoreList(String marketId) {
List<GoblinMarketRelationVo> relationVo = redisUtils.getMarketRelation(GoblinStatusConst.MarketPreStatus.MARKET_PRE_ZHENGZAI.getValue(), marketId);
List<String> storeIdList = relationVo.stream().map(GoblinMarketRelationVo::getStoreId).collect(Collectors.toList());
return mongoUtils.getGoblinStoreVoList(storeIdList);
}
}
package com.liquidnet.service.goblin.service.impl;
import com.liquidnet.service.goblin.service.IGoblinAppZhengzaiService;
import com.liquidnet.service.goblin.service.IGoblinStoreZhengzaiService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
......
......@@ -223,6 +223,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
String marketSpuId = params.getSpuId().concat(GoblinStatusConst.MarketPreStatus.MARKET_PRE_PURCHASE.getValue()).concat(IDGenerator.marketGoodId(params.getStoreMarketId()));
GoblinMarketRelationVo relationVo = GoblinMarketRelationVo.getNew();
relationVo.setSpuId(params.getSpuId());
relationVo.setStoreId(params.getStoreId());
List<String> skuList = CollectionUtil.arrayListString();//skuId数组
List<String> marketSkuList = CollectionUtil.arrayListString();//活动skuId数组
List<String> errorNameList = CollectionUtil.arrayListString();//修改失败的款式名称数组
......
......@@ -296,4 +296,19 @@ public class GoblinMongoUtils {
info.put("data", voList);
return info;
}
//获取全部正在下单的活动
public List<GoblinSelfMarketingVo> getGoblinSelfMarketingVoList() {
//todo 没redis
String nowStr = DateUtil.getNowTime();
List<GoblinSelfMarketingVo> voList = mongoTemplate.find(Query.query(Criteria.where("type").is(2).and("status").ne(7).and("endTime").gte(nowStr).and("startTime").lte(nowStr)), GoblinSelfMarketingVo.class, GoblinSelfMarketingVo.class.getSimpleName());
return voList;
}
//获取 参加正在下单的商品列表
public List<GoblinStoreInfoVo> getGoblinStoreVoList(List<String> storeIdList) {
//todo 没redis
List<GoblinStoreInfoVo> voList = mongoTemplate.find(Query.query(Criteria.where("storeId").in(storeIdList)), GoblinStoreInfoVo.class, GoblinStoreInfoVo.class.getSimpleName());
return voList;
}
}
......@@ -8,6 +8,7 @@ import com.liquidnet.service.goblin.entity.GoblinFrontBanner;
import com.mongodb.BasicDBObject;
import java.util.ArrayList;
import java.util.List;
public class ObjectUtil {
private static final PagedResult<GoblinStoreMgtGoodsListVo> goblinStoreMgtGoodsVoPagedResult = new PagedResult<>();
......@@ -36,6 +37,7 @@ public class ObjectUtil {
public static ArrayList<GoblinGoodsInfoVo> goblinGoodsInfoVoArrayList() {
return (ArrayList<GoblinGoodsInfoVo>) goblinGoodsInfoVoArrayList.clone();
}
public static ArrayList<GoblinFrontBannerVo> goblinFrontBannerVoArrayList() {
return (ArrayList<GoblinFrontBannerVo>) goblinFrontBannerVoArrayList.clone();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment