Commit af76d0dad290db9db0e7e1fdef2485956a5c8338
1 parent
ebd50028a4
Exists in
master
and in
1 other branch
增加查询yn为1的限制
Showing 1 changed file with 3 additions and 2 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BasicConfigService.java
View file @
af76d0d
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import java.util.List; |
4 | 4 | |
5 | +import com.lyms.platform.common.enums.YnEnums; | |
5 | 6 | import org.apache.commons.lang.StringUtils; |
6 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
7 | 8 | import org.springframework.data.domain.Sort.Direction; |
8 | 9 | |
... | ... | @@ -40,12 +41,12 @@ |
40 | 41 | } |
41 | 42 | |
42 | 43 | public List<BasicConfig> queryParentConfig() { |
43 | - return basicConfigDao.queryBasicConfig(MongoCondition.newInstance("parentId", null, MongoOper.IS).toMongoQuery() | |
44 | + return basicConfigDao.queryBasicConfig(MongoCondition.newInstance("parentId", null, MongoOper.IS).and("yn", YnEnums.YES.getId(), MongoOper.IS).toMongoQuery() | |
44 | 45 | .addOrder(Direction.ASC, "id")); |
45 | 46 | } |
46 | 47 | |
47 | 48 | public List<BasicConfig> queryByParentId(String parentId) { |
48 | - return basicConfigDao.queryBasicConfig(MongoCondition.newInstance("parentId", parentId, MongoOper.IS).toMongoQuery()); | |
49 | + return basicConfigDao.queryBasicConfig(MongoCondition.newInstance("parentId", parentId, MongoOper.IS).and("yn", YnEnums.YES.getId(),MongoOper.IS).toMongoQuery()); | |
49 | 50 | } |
50 | 51 | |
51 | 52 | public Page<BasicConfig> queryGuidesAndPage(int start, int end) { |