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

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

Merge remote-tracking branch 'origin/dev_erp_gjy' into dev_erp_gjy

parents 2f4b79c8 77dbf88d
...@@ -23,6 +23,7 @@ import io.swagger.annotations.ApiImplicitParam; ...@@ -23,6 +23,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -341,6 +342,29 @@ public class GoblinStoreMgtController { ...@@ -341,6 +342,29 @@ public class GoblinStoreMgtController {
if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) { if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) {
return ResponseDto.failure(ErrorMapping.get("149002")); return ResponseDto.failure(ErrorMapping.get("149002"));
} }
if (
StringUtils.isEmpty(StringUtils.trim(sid)) &&
StringUtils.isEmpty(StringUtils.trim(appKey)) &&
StringUtils.isEmpty(StringUtils.trim(appSecret)) &&
StringUtils.isEmpty(StringUtils.trim(shopNo))
) {
sid = StringUtils.trim(sid);
appKey = StringUtils.trim(appKey);
appSecret = StringUtils.trim(appSecret);
shopNo = StringUtils.trim(shopNo);
} else if(
StringUtils.isNotEmpty(StringUtils.trim(sid)) &&
StringUtils.isNotEmpty(StringUtils.trim(appKey)) &&
StringUtils.isNotEmpty(StringUtils.trim(appSecret)) &&
StringUtils.isNotEmpty(StringUtils.trim(shopNo))
) {
sid = StringUtils.trim(sid);
appKey = StringUtils.trim(appKey);
appSecret = StringUtils.trim(appSecret);
shopNo = StringUtils.trim(shopNo);
} else {
return ResponseDto.failure(ErrorMapping.get("149001"));
}
GoblinStoreErpConfigVo storeErpConfigVo = goblinRedisUtils.getStoreErpConfigVoByStoreId(storeId); GoblinStoreErpConfigVo storeErpConfigVo = goblinRedisUtils.getStoreErpConfigVoByStoreId(storeId);
storeErpConfigVo = null == storeErpConfigVo ? storeErpConfigVo.getNew() : storeErpConfigVo; storeErpConfigVo = null == storeErpConfigVo ? storeErpConfigVo.getNew() : storeErpConfigVo;
log.info("店铺管理:店铺ERP配置:编辑[UID:{},BEF:{}]", currentUid, JsonUtils.toJson(storeErpConfigVo)); log.info("店铺管理:店铺ERP配置:编辑[UID:{},BEF:{}]", currentUid, JsonUtils.toJson(storeErpConfigVo));
......
...@@ -460,7 +460,7 @@ public class GoblinMongoUtils { ...@@ -460,7 +460,7 @@ public class GoblinMongoUtils {
/* ---------------------------------------- 店铺ERP配置数据源 ---------------------------------------- */ /* ---------------------------------------- 店铺ERP配置数据源 ---------------------------------------- */
public List<String> getStoreErpShopNoList() { public List<String> getStoreErpShopNoList() {
Query query = Query.query(Criteria.where("shopNo").ne("")); Query query = Query.query(Criteria.where("shopNo").exists(true).and("shopNo").ne(""));
query.fields().include("shopNo"); query.fields().include("shopNo");
List<GoblinStoreErpConfigVo> vos = mongoTemplate.find(query, GoblinStoreErpConfigVo.class, GoblinStoreErpConfigVo.class.getSimpleName()); List<GoblinStoreErpConfigVo> vos = mongoTemplate.find(query, GoblinStoreErpConfigVo.class, GoblinStoreErpConfigVo.class.getSimpleName());
if (!CollectionUtils.isEmpty(vos)) { if (!CollectionUtils.isEmpty(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