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

Commit 8d6466b2 authored by 张国柄's avatar 张国柄

~API:店铺审核:状态调整;

parent e6c1a209
...@@ -47,7 +47,7 @@ public class GoblinStoreInfoServiceImpl extends ServiceImpl<GoblinStoreInfoMappe ...@@ -47,7 +47,7 @@ public class GoblinStoreInfoServiceImpl extends ServiceImpl<GoblinStoreInfoMappe
lambdaUpdateWrapper.eq(GoblinStoreInfo::getStoreId, storeId); lambdaUpdateWrapper.eq(GoblinStoreInfo::getStoreId, storeId);
lambdaUpdateWrapper.eq(GoblinStoreInfo::getStatus, 1); lambdaUpdateWrapper.eq(GoblinStoreInfo::getStatus, 1);
lambdaUpdateWrapper.set(GoblinStoreInfo::getStatus, status); lambdaUpdateWrapper.set(GoblinStoreInfo::getStatus, status.equals("3") ? "4" : status);
lambdaUpdateWrapper.set(GoblinStoreInfo::getReason, reason); lambdaUpdateWrapper.set(GoblinStoreInfo::getReason, reason);
lambdaUpdateWrapper.set(GoblinStoreInfo::getUpdatedBy, operator); lambdaUpdateWrapper.set(GoblinStoreInfo::getUpdatedBy, operator);
lambdaUpdateWrapper.set(GoblinStoreInfo::getUpdatedAt, now); lambdaUpdateWrapper.set(GoblinStoreInfo::getUpdatedAt, now);
...@@ -60,7 +60,7 @@ public class GoblinStoreInfoServiceImpl extends ServiceImpl<GoblinStoreInfoMappe ...@@ -60,7 +60,7 @@ public class GoblinStoreInfoServiceImpl extends ServiceImpl<GoblinStoreInfoMappe
} }
Query query = Query.query(Criteria.where("storeId").is(storeId)); Query query = Query.query(Criteria.where("storeId").is(storeId));
Update update = Update.update("status", status); Update update = Update.update("status", status.equals("3") ? "4" : status);
update.set("reason", reason); update.set("reason", reason);
update.set("updatedBy", operator); update.set("updatedBy", operator);
update.set("updatedAt", now); update.set("updatedAt", now);
......
...@@ -105,7 +105,7 @@ public class GoblinMongoUtils { ...@@ -105,7 +105,7 @@ public class GoblinMongoUtils {
public List<GoblinStoreConfigVo> getStoreConfigVo(String storeId) { public List<GoblinStoreConfigVo> getStoreConfigVo(String storeId) {
Query query = Query.query(Criteria.where("storeId").is(storeId)); Query query = Query.query(Criteria.where("storeId").is(storeId));
query.fields().include("configName").include("configKey").include("configVal"); query.fields().include("configKey").include("configVal");
return mongoTemplate.find(query, return mongoTemplate.find(query,
GoblinStoreConfigVo.class, GoblinStoreConfigVo.class.getSimpleName()); GoblinStoreConfigVo.class, GoblinStoreConfigVo.class.getSimpleName());
} }
......
...@@ -7,6 +7,7 @@ import com.liquidnet.commons.lang.util.JsonUtils; ...@@ -7,6 +7,7 @@ import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.commons.lang.util.RandomUtil; import com.liquidnet.commons.lang.util.RandomUtil;
import com.liquidnet.service.goblin.constant.GoblinRedisConst; import com.liquidnet.service.goblin.constant.GoblinRedisConst;
import com.liquidnet.service.goblin.dto.vo.*; import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.enums.GoblinStoreConf;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -103,6 +104,12 @@ public class GoblinRedisUtils { ...@@ -103,6 +104,12 @@ public class GoblinRedisUtils {
String rk = GoblinRedisConst.BASIC_STORE_CONF.concat(storeId); String rk = GoblinRedisConst.BASIC_STORE_CONF.concat(storeId);
List<GoblinStoreConfigVo> vos = (List<GoblinStoreConfigVo>) redisUtil.get(rk); List<GoblinStoreConfigVo> vos = (List<GoblinStoreConfigVo>) redisUtil.get(rk);
if (CollectionUtils.isEmpty(vos) && null != (vos = goblinMongoUtils.getStoreConfigVo(storeId))) { if (CollectionUtils.isEmpty(vos) && null != (vos = goblinMongoUtils.getStoreConfigVo(storeId))) {
GoblinStoreInfoVo storeInfoVo = this.getStoreInfoVo(storeId);
vos.add(GoblinStoreConfigVo.getNew()
.setConfigKey(GoblinStoreConf.BUSINESS_STATUS.name())
.setConfigVal(null == storeInfoVo ? "4" : storeInfoVo.getStatus().equals("3") ? "5" : storeInfoVo.getStatus())
);
// redisUtil.set(rk, vos);// TODO: 2022/1/12 zhanggb== // redisUtil.set(rk, vos);// TODO: 2022/1/12 zhanggb==
} }
return vos; return vos;
......
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