Commit 3f775d86471c44837b35020be11a00340ac8fe7b
1 parent
0a00a58e57
Exists in
master
and in
1 other branch
增加批量提交
Showing 3 changed files with 14 additions and 0 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBasicConfigDao.java
View file @
3f775d8
1 | 1 | package com.lyms.platform.biz.dal; |
2 | 2 | |
3 | +import java.util.Collection; | |
3 | 4 | import java.util.List; |
4 | 5 | |
5 | 6 | import com.lyms.platform.common.dao.operator.MongoQuery; |
... | ... | @@ -23,5 +24,7 @@ |
23 | 24 | |
24 | 25 | public Page<BasicConfig> findPage(MongoQuery query); |
25 | 26 | public BasicConfig getOneBasicConfigById(String id); |
27 | + | |
28 | + public void batchSave(Collection<BasicConfig> list); | |
26 | 29 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BasicConfigDaoImpl.java
View file @
3f775d8
1 | 1 | package com.lyms.platform.biz.dal.impl; |
2 | 2 | |
3 | +import java.util.Collection; | |
3 | 4 | import java.util.List; |
4 | 5 | |
5 | 6 | import com.lyms.platform.pojo.BabyModel; |
... | ... | @@ -26,6 +27,11 @@ |
26 | 27 | public void deleteBasicConfig(String id) { |
27 | 28 | delete(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery()); |
28 | 29 | } |
30 | + | |
31 | + public void batchSave(Collection<BasicConfig> list) { | |
32 | + batchSave(list); | |
33 | + } | |
34 | + | |
29 | 35 | |
30 | 36 | public BasicConfig getBasicConfig(String id) { |
31 | 37 | return findById(id); |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BasicConfigService.java
View file @
3f775d8
1 | 1 | package com.lyms.platform.biz.service; |
2 | 2 | |
3 | +import java.util.Collection; | |
3 | 4 | import java.util.List; |
4 | 5 | |
5 | 6 | import com.lyms.platform.common.enums.YnEnums; |
... | ... | @@ -38,6 +39,10 @@ |
38 | 39 | } |
39 | 40 | |
40 | 41 | return basicConfigDao.queryBasicConfig(query.addOrder(Direction.ASC, "id")); |
42 | + } | |
43 | + | |
44 | + public void batchSave(Collection<BasicConfig> list) { | |
45 | + basicConfigDao.batchSave(list); | |
41 | 46 | } |
42 | 47 | |
43 | 48 | public List<BasicConfig> queryParentConfig() { |