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

Commit ed5845e4 authored by 胡佳晨's avatar 胡佳晨

下架商品不扫出来

order goblin 的获取sku spu信息接口修改
parent 527ed4ba
......@@ -38,7 +38,7 @@ public class GoblinPosController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "uid", value = "UID"),
})
public ResponseDto<GoblinUserCouponVo> checkOrderResult(@NotBlank(message = "参数无效:storeCouponId") @RequestParam("storeCouponId") String storeCouponId,
@NotBlank(message = "参数无效:uid") @RequestParam("uid") String uid) {
@NotBlank(message = "参数无效:uid") @RequestParam("uid") String uid) {
String currentUid = CurrentUtil.getCurrentUid();
GoblinStoreInfoVo storeInfoVo = goblinRedisUtils.getStoreInfoVoByUid(currentUid);
GoblinStoreCouponVo storeCouponVo = goblinRedisUtils.getStoreCouponVo(storeCouponId);
......@@ -85,12 +85,12 @@ public class GoblinPosController {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "店铺不存在");
}
String storeId = storeInfoVo.getStoreId();
skuids = skuids.replaceAll("\"","");
skuids = skuids.replaceAll("\"", "");
String[] skuIdArr = skuids.split(",");
List<GoblinPosGoodsVo> posGoodsVoList = ObjectUtil.getGoblinPosGoodsVoArrayList();
for (String skuId : skuIdArr) {
GoblinGoodsSkuInfoVo goodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
if (null != goodsSkuInfoVo && goodsSkuInfoVo.getDelFlg().equals("0") && storeId.equals(goodsSkuInfoVo.getStoreId())) {
if (null != goodsSkuInfoVo && goodsSkuInfoVo.getDelFlg().equals("0") && storeId.equals(goodsSkuInfoVo.getStoreId()) && goodsSkuInfoVo.getShelvesStatus().equals("3")) {
String spuId = goodsSkuInfoVo.getSpuId();
GoblinGoodsInfoVo goodsInfoVo = goblinRedisUtils.getGoodsInfoVo(spuId);
if (null != goodsInfoVo && goodsInfoVo.getDelFlg().equals("0")) {
......
......@@ -63,8 +63,6 @@ public class GoblinStoreMgtGoodsController {
GoblinRedisUtils goblinRedisUtils;
@Autowired
GoblinMongoUtils goblinMongoUtils;
@Autowired
IGoblinZhengzaiService goblinZhengzaiService;
@ApiOperationSupport(order = 1)
@ApiOperation(value = "SPU列表")
......@@ -674,9 +672,6 @@ public class GoblinStoreMgtGoodsController {
List<GoblinGoodsSpecDto> paramSkuSpecDtoList = mgtGoodsEditSkuParam.getSkuSpecList();
for (String skuId : skuIdList) {// 比对所有SKU规格信息
GoblinGoodsSkuInfoVo mgtGoodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
if (!mgtGoodsSkuInfoVo.getDelFlg().equals("0") || !mgtGoodsSkuInfoVo.getShelvesStatus().equals("3")) {
continue;
}
if (mgtGoodsSkuInfoVo.getSkuSpecList().size() != paramSkuSpecDtoList.size()) {
log.warn("商品管理:商品编辑:SKU添加:规格信息有误[skuSpecMap={},paramSkuSpecMap={}]", JsonUtils.toJson(mgtGoodsSkuInfoVo.getSkuSpecList()), JsonUtils.toJson(paramSkuSpecDtoList));
return ResponseDto.failure(ErrorMapping.get("149014"));
......@@ -730,11 +725,6 @@ public class GoblinStoreMgtGoodsController {
log.debug("商品管理:商品编辑:SKU添加:[GoblinStoreMgtGoodsEditSkuParam={}]", JsonUtils.toJson(mgtGoodsEditSkuParam));
}
goblinstoreMgtGoodsService.goodsEditSkuAdd(currentUid, mgtGoodsEditSkuParam, goodsInfoVo);
//同步正在下单商品
GoblinStoreZhengzaiCommonSingleParam param = GoblinStoreZhengzaiCommonSingleParam.getNew();
param.setSkuId(mgtGoodsEditSkuParam.getSkuId());
param.setSpuId(mgtGoodsEditSkuParam.getSpuId());
goblinZhengzaiService.zhengzaiSkuInsertSingle(param);
return ResponseDto.success();
}
......
......@@ -7,16 +7,14 @@ import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsActionParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsAddParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsEditSkuParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreMgtGoodsFilterParam;
import com.liquidnet.service.goblin.dto.manage.*;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinMgtCategorySpecVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsInfoVo;
import com.liquidnet.service.goblin.dto.manage.vo.GoblinStoreMgtGoodsListVo;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.enums.GoblinStoreConf;
import com.liquidnet.service.goblin.service.manage.IGoblinStoreMgtExtraService;
import com.liquidnet.service.goblin.service.manage.IGoblinZhengzaiService;
import com.liquidnet.service.goblin.service.manage.IGoblinstoreMgtGoodsService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
......@@ -44,6 +42,8 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
GoblinMongoUtils goblinMongoUtils;
@Autowired
IGoblinStoreMgtExtraService goblinStoreMgtExtraService;
@Autowired
IGoblinZhengzaiService goblinZhengzaiService;
@Override
public PagedResult<GoblinStoreMgtGoodsListVo> goodsList(GoblinStoreMgtGoodsFilterParam mgtGoodsFilterParam) {
......@@ -737,6 +737,12 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
});
}
//同步正在下单商品
GoblinStoreZhengzaiCommonSingleParam param = GoblinStoreZhengzaiCommonSingleParam.getNew();
param.setSkuId(skuId);
param.setSpuId(spuId);
goblinZhengzaiService.zhengzaiSkuInsertSingle(param);
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_GOODS.getKey(),
SqlMapping.gets(toMqSqls, initGoodsSkuObjs, initGoodsSpecObjs,
initGoodsSpecValueObjs, initGoodsSpuSpecValueObjs, initGoodsSkuSpecValueObjs, updateGoodsObjs)
......
......@@ -1234,7 +1234,7 @@ public class GoblinMongoUtils {
//根据spuId查询活动id
public List<String> getMarketIdListBySpuId(String spuId) {
Query query = Query.query(Criteria.where("marketId").ne(null).regex(spuId.concat(GoblinStatusConst.MarketPreStatus.MARKET_PRE_ZHENGZAI.getValue()).concat(".*")));
Query query = Query.query(Criteria.where("marketId").ne(null).and("spuId").regex(spuId.concat(GoblinStatusConst.MarketPreStatus.MARKET_PRE_ZHENGZAI.getValue()).concat(".*")));
query.fields().include("marketId");
return mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()).stream().map(GoblinGoodsInfoVo::getMarketId).collect(Collectors.toList());
}
......
......@@ -408,6 +408,7 @@ public class GoblinRedisUtils {
vo.setPriceGe(marketVo.getPriceGe());
vo.setPriceLe(marketVo.getPriceLe());
vo.setMarketId(marketVo.getMarketId());
vo.setDelFlg(marketVo.getDelFlg().equals("1") ? marketVo.getDelFlg() : vo.getDelFlg());
return vo;
} else {
String rk = GoblinRedisConst.BASIC_GOODS.concat(spuId);
......@@ -506,7 +507,8 @@ public class GoblinRedisUtils {
vo.setBuyLimit(marketVo.getBuyLimit());
vo.setBuyRoster(marketVo.getBuyRoster());
vo.setBuyFactor(marketVo.getBuyFactor());
vo.setDelFlg("0");
// vo.setDelFlg("0");
vo.setDelFlg(marketVo.getDelFlg().equals("1") ? marketVo.getDelFlg() : vo.getDelFlg());
vo.setMarketId(marketVo.getMarketId());
vo.setCreatedAt(LocalDateTime.now());
return vo;
......@@ -1216,9 +1218,9 @@ public class GoblinRedisUtils {
// String rk = GoblinRedisConst.REDIS_ZZ_MUSIC_TAG.concat(musicTag + ":").concat(performanceId);
// Object obj = redisUtil.get(rk);
// if (obj == null) {
listVo = goblinMongoUtils.getMusicTagPGoods(musicTag, performanceId);
listVo = goblinMongoUtils.getMusicTagPGoods(musicTag, performanceId);
// redisUtil.set(rk, listVo, 60 * 30);
return listVo;
return listVo;
// } else {
// return (List<GoblinGoodsInfoVo>) obj;
// }
......
......@@ -99,6 +99,7 @@ public class GoblinRedisUtils {
vo.setPriceGe(marketVo.getPriceGe());
vo.setPriceLe(marketVo.getPriceLe());
vo.setMarketId(marketVo.getMarketId());
vo.setDelFlg(marketVo.getDelFlg().equals("1") ? marketVo.getDelFlg() : vo.getDelFlg());
return vo;
} else {
String rk = GoblinRedisConst.BASIC_GOODS.concat(spuId);
......@@ -144,7 +145,8 @@ public class GoblinRedisUtils {
vo.setBuyLimit(marketVo.getBuyLimit());
vo.setBuyRoster(marketVo.getBuyRoster());
vo.setBuyFactor(marketVo.getBuyFactor());
vo.setDelFlg("0");
// vo.setDelFlg("0");
vo.setDelFlg(marketVo.getDelFlg().equals("1") ? marketVo.getDelFlg() : vo.getDelFlg());
vo.setMarketId(marketVo.getMarketId());
vo.setCreatedAt(LocalDateTime.now());
return vo;
......
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