Commit 468831b650a8a8b43d2e4ad85a3b89fa388ec5af
1 parent
ca75c67cf3
Exists in
master
and in
6 other branches
update code
Showing 3 changed files with 10 additions and 8 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/service/LisService.java
View file @
468831b
| ... | ... | @@ -5,12 +5,13 @@ |
| 5 | 5 | import com.lyms.platform.permission.model.LisReportItemModel; |
| 6 | 6 | import com.lyms.platform.permission.model.LisReportModel; |
| 7 | 7 | import com.lyms.platform.permission.model.LisReportQuery; |
| 8 | +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | |
| 8 | 9 | |
| 9 | 10 | import java.util.List; |
| 10 | 11 | |
| 11 | 12 | public interface LisService { |
| 12 | 13 | |
| 13 | - BaseResponse saveLisData(List<LisReportModel> models); | |
| 14 | + BaseResponse saveLisData(List<LisReportModel> models,ThreadPoolTaskExecutor commonThreadPool); | |
| 14 | 15 | |
| 15 | 16 | List<LisReportModel> queryLisDataByModel(LisReportQuery model); |
| 16 | 17 |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java
View file @
468831b
| ... | ... | @@ -27,15 +27,10 @@ |
| 27 | 27 | public class LisServiceImpl implements LisService { |
| 28 | 28 | |
| 29 | 29 | @Autowired |
| 30 | - @Qualifier("commonThreadPool") | |
| 31 | - private ThreadPoolTaskExecutor commonThreadPool; | |
| 32 | - | |
| 33 | - | |
| 34 | - @Autowired | |
| 35 | 30 | private MasterLisMapper masterLisMapper; |
| 36 | 31 | |
| 37 | 32 | @Override |
| 38 | - public BaseResponse saveLisData(final List<LisReportModel> lisList) { | |
| 33 | + public BaseResponse saveLisData(final List<LisReportModel> lisList,ThreadPoolTaskExecutor commonThreadPool) { | |
| 39 | 34 | try { |
| 40 | 35 | System.out.println("saveLis data size = "+ lisList.size()); |
| 41 | 36 | if (CollectionUtils.isNotEmpty(lisList)) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisController.java
View file @
468831b
| ... | ... | @@ -18,6 +18,8 @@ |
| 18 | 18 | import org.slf4j.Logger; |
| 19 | 19 | import org.slf4j.LoggerFactory; |
| 20 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 21 | +import org.springframework.beans.factory.annotation.Qualifier; | |
| 22 | +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | |
| 21 | 23 | import org.springframework.stereotype.Controller; |
| 22 | 24 | import org.springframework.web.bind.annotation.*; |
| 23 | 25 | |
| ... | ... | @@ -34,6 +36,10 @@ |
| 34 | 36 | public class LisController extends BaseController { |
| 35 | 37 | |
| 36 | 38 | @Autowired |
| 39 | + @Qualifier("commonThreadPool") | |
| 40 | + private ThreadPoolTaskExecutor commonThreadPool; | |
| 41 | + | |
| 42 | + @Autowired | |
| 37 | 43 | private LisService lisService; |
| 38 | 44 | @Autowired |
| 39 | 45 | private LisFacade lisFacade; |
| ... | ... | @@ -94,7 +100,7 @@ |
| 94 | 100 | } |
| 95 | 101 | } |
| 96 | 102 | } |
| 97 | - return lisService.saveLisData(list); | |
| 103 | + return lisService.saveLisData(list,commonThreadPool); | |
| 98 | 104 | } |
| 99 | 105 | |
| 100 | 106 |