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

Commit 903a4eb9 authored by 张国柄's avatar 张国柄

opt;

parent 67c8d4ec
......@@ -352,20 +352,21 @@ public class GoblinStoreMgtGoodsController {
beUpdateSpuSpecFlg = true;
specValues.add(GoblinGoodsSpecValueVo.getNew().setSpecVname(newSpecVname).setSpecVsort(specValues.size() + 2));
}
boolean toDelOldSpecVnameFlg = true;// 其他SKU中只要存在该规格值,即不可删除该规格值
Set<Map.Entry<String, List<GoblinGoodsSpecDto>>> entries = otherSkuSpecListMap.entrySet();
for (Map.Entry<String, List<GoblinGoodsSpecDto>> ent : entries) {
for (GoblinGoodsSpecDto specDto : ent.getValue()) {
if (specDto.getSpecName().equals(specName) && specDto.getSpecVname().equals(oldSpecVname)) {
toDelOldSpecVnameFlg = false;
}
boolean toDelOldSpecVnameFlg = true;// 其他SKU中只要存在该规格值,即不可删除该规格值
Set<Map.Entry<String, List<GoblinGoodsSpecDto>>> entries = otherSkuSpecListMap.entrySet();
for (Map.Entry<String, List<GoblinGoodsSpecDto>> ent : entries) {
for (GoblinGoodsSpecDto specDto : ent.getValue()) {
if (specDto.getSpecName().equals(specName) && specDto.getSpecVname().equals(oldSpecVname)) {
toDelOldSpecVnameFlg = false;
}
}
if (toDelOldSpecVnameFlg) {
specValues.removeIf(rmr -> rmr.getSpecVname().equals(oldSpecVname));
delSpuSpecMap.put(specName, oldSpecVname);
}
}
if (toDelOldSpecVnameFlg) {
specValues.removeIf(rmr -> rmr.getSpecVname().equals(oldSpecVname));
delSpuSpecMap.put(specName, oldSpecVname);
beUpdateSpuSpecFlg = true;
}
}
}
......
......@@ -77,7 +77,7 @@ public class GoblinRedisUtils {
List<GoblinSelfTagVo> vos;
if (valStrIsEmptyFlg) {
if (!CollectionUtils.isEmpty(vos = goblinMongoUtils.getSelfTagVos("0"))) {
// redisUtil.set(GoblinRedisConst.BASIC_SELF_GOODS_TAG, JsonUtils.toJson(vos));// TODO: 2022/1/17 zhanggb==
redisUtil.set(GoblinRedisConst.BASIC_SELF_GOODS_TAG, JsonUtils.toJson(vos));
}
} else {
vos = JsonUtils.fromJson(valStr, new TypeReference<List<GoblinSelfTagVo>>() {
......@@ -92,7 +92,7 @@ public class GoblinRedisUtils {
List<GoblinSelfTagVo> vos;
if (valStrIsEmptyFlg) {
if (!CollectionUtils.isEmpty(vos = goblinMongoUtils.getSelfTagVos("1"))) {
// redisUtil.set(GoblinRedisConst.BASIC_SELF_GOODS_TAG, JsonUtils.toJson(vos));// TODO: 2022/1/17 zhanggb==
redisUtil.set(GoblinRedisConst.BASIC_SELF_GOODS_TAG, JsonUtils.toJson(vos));
}
} else {
vos = JsonUtils.fromJson(valStr, new TypeReference<List<GoblinSelfTagVo>>() {
......@@ -109,7 +109,7 @@ public class GoblinRedisUtils {
List<GoblinSelfGoodsCategoryVo> vos;
if (valStrIsEmptyFlg) {
if (!CollectionUtils.isEmpty(vos = goblinMongoUtils.getSelfGoodsCategoryVos())) {
// redisUtil.set(GoblinRedisConst.BASIC_SELF_GOODS_CATEGORY, JsonUtils.toJson(vos));// TODO: 2022/1/17 zhanggb==
redisUtil.set(GoblinRedisConst.BASIC_SELF_GOODS_CATEGORY, JsonUtils.toJson(vos));
}
} else {
vos = JsonUtils.fromJson(valStr, new TypeReference<List<GoblinSelfGoodsCategoryVo>>() {
......@@ -131,7 +131,7 @@ public class GoblinRedisUtils {
List<GoblinStoreGoodsCategoryVo> vos = null;
if (valStrIsEmptyFlg && !CollectionUtils.isEmpty(vos = goblinMongoUtils.getStoreGoodsCategoryVos(storeId))) {
valStr = JsonUtils.toJson(vos);
// redisUtil.set(rk, valStr);// TODO: 2022/1/11 zhanggb==
redisUtil.set(rk, valStr);
} else if (!valStrIsEmptyFlg) {
vos = JsonUtils.fromJson(valStr, new TypeReference<List<GoblinStoreGoodsCategoryVo>>() {
});
......@@ -149,7 +149,7 @@ public class GoblinRedisUtils {
String rk = GoblinRedisConst.BASIC_SELF_GOODS_CATEGORY_SPEC.concat(cateId);
GoblinMgtCategorySpecVo vo = (GoblinMgtCategorySpecVo) redisUtil.get(rk);
if (null == vo && null != (vo = goblinMongoUtils.getCategorySpecVo(cateId))) {
// redisUtil.set(rk, vo);// TODO: 2022/1/18 zhanggb==
redisUtil.set(rk, vo);
}
return vo;
}
......@@ -162,7 +162,7 @@ public class GoblinRedisUtils {
List<GoblinServiceSupportVo> vos;
if (valStrIsEmptyFlg) {
if (!CollectionUtils.isEmpty(vos = goblinMongoUtils.getMgtServiceSupportVos())) {
// redisUtil.set(GoblinRedisConst.BASIC_SERVICE_SUPPORT, JsonUtils.toJson(vos));// TODO: 2022/1/17 zhanggb==
redisUtil.set(GoblinRedisConst.BASIC_SERVICE_SUPPORT, JsonUtils.toJson(vos));
}
} else {
vos = JsonUtils.fromJson(valStr, new TypeReference<List<GoblinServiceSupportVo>>() {
......@@ -209,7 +209,7 @@ public class GoblinRedisUtils {
String rk = GoblinRedisConst.BASIC_STORE_CONF.concat(storeId);
List<GoblinStoreConfigVo> vos = (List<GoblinStoreConfigVo>) redisUtil.get(rk);
if (CollectionUtils.isEmpty(vos) && !CollectionUtils.isEmpty(vos = goblinMongoUtils.getStoreConfigVos(storeId))) {
// redisUtil.set(rk, vos);// TODO: 2022/1/12 zhanggb==
redisUtil.set(rk, vos);
}
return vos;
}
......@@ -230,8 +230,7 @@ public class GoblinRedisUtils {
public boolean addStoreId(String uid, String storeId) {
List<String> storeIds = this.getStoreIds(uid);
// if (CollectionUtils.isEmpty(storeIds)) {
if (CollectionUtils.isEmpty(storeIds) || storeIds.contains("1")) {// TODO: 2022/1/6 zhanggb del
if (CollectionUtils.isEmpty(storeIds)) {
storeIds = CollectionUtil.arrayListString();
}
storeIds.add(storeId);
......@@ -279,7 +278,7 @@ public class GoblinRedisUtils {
String rk = GoblinRedisConst.BASIC_STORE.concat(storeId);
GoblinStoreInfoVo vo = (GoblinStoreInfoVo) redisUtil.get(rk);
if (null == vo && null != (vo = goblinMongoUtils.getStoreInfoVo(storeId))) {
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb==
redisUtil.set(rk, vo);
}
return vo;
}
......@@ -348,7 +347,7 @@ public class GoblinRedisUtils {
String rk = GoblinRedisConst.BASIC_GOODS.concat(spuId);
GoblinGoodsInfoVo vo = (GoblinGoodsInfoVo) redisUtil.get(rk);
if (null == vo && null != (vo = goblinMongoUtils.getMgtGoodsInfoVo(spuId))) {
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb==
redisUtil.set(rk, vo);
}
return vo;
}
......@@ -399,7 +398,7 @@ public class GoblinRedisUtils {
String rk = GoblinRedisConst.BASIC_GOODS_SKU.concat(skuId);
GoblinGoodsSkuInfoVo vo = (GoblinGoodsSkuInfoVo) redisUtil.get(rk);
if (null == vo && null != (vo = goblinMongoUtils.getMgtGoodsSkuInfoVo(skuId))) {
// redisUtil.set(rk, vo);// TODO: 2022/1/4 zhanggb==
redisUtil.set(rk, vo);
}
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