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

Commit aabbb020 authored by 张国柄's avatar 张国柄

+MDB根据店铺名称模糊匹配返回店铺ID;

parent f5a4dfe2
...@@ -274,6 +274,13 @@ public class GoblinMongoUtils { ...@@ -274,6 +274,13 @@ public class GoblinMongoUtils {
GoblinStoreInfoVo.class, GoblinStoreInfoVo.class.getSimpleName()); GoblinStoreInfoVo.class, GoblinStoreInfoVo.class.getSimpleName());
} }
public String getStoreInfoVoRegexName(String storeName) {
Query query = Query.query(Criteria.where("storeName").regex("^.*" + storeName + ".*$").and("delFlg").is("0").and("status").in("3", "5"));
query.fields().include("storeId");
GoblinStoreInfoVo vo = mongoTemplate.findOne(query, GoblinStoreInfoVo.class, GoblinStoreInfoVo.class.getSimpleName());
return null == vo ? null : vo.getStoreId();
}
public GoblinStoreInfoVo getStoreInfoVoByUid(String uid) { public GoblinStoreInfoVo getStoreInfoVoByUid(String uid) {
return mongoTemplate.findOne(Query.query(Criteria.where("uid").is(uid).and("delFlg").is("0")), return mongoTemplate.findOne(Query.query(Criteria.where("uid").is(uid).and("delFlg").is("0")),
GoblinStoreInfoVo.class, GoblinStoreInfoVo.class.getSimpleName()); GoblinStoreInfoVo.class, GoblinStoreInfoVo.class.getSimpleName());
......
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