Browse Source

修复sonarqube异味类问题

lyq 1 year ago
parent
commit
3bb4bb8a61

+ 25 - 14
src/main/java/com/sooka/sponest/mobile/appbigdata/controller/AppBigDataController.java

@@ -40,13 +40,13 @@ public class AppBigDataController extends VisuBaseService {
     @Resource
     RemoteSystemBaseService remoteSystemBaseService;
 
-    public final static String EVENT_TYPE = "eventType";
-    public final static String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
-    public final static String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
-    public final static String NAME_CHINESE = "name_chinese";
-    public final static String NAME_ORIGINAL = "name_original";
-    public final static String EVENT = "event";
-    public final static String PHOTO_ID = "photoId";
+    public static final String EVENT_TYPE = "eventType";
+    public static final String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
+    public static final String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
+    public static final String NAME_CHINESE = "name_chinese";
+    public static final String NAME_ORIGINAL = "name_original";
+    public static final String EVENT = "event";
+    public static final String PHOTO_ID = "photoId";
 
 
     /**
@@ -340,12 +340,12 @@ public class AppBigDataController extends VisuBaseService {
      */
     @ApiOperation(value = "获取重点工程(无分页,无筛选)", notes = "获取重点工程(无分页,无筛选)")
     @GetMapping("getKeyProjects")
-    public AjaxResult getKeyProjects(Long deptId,String state) {
-        AjaxResult ajaxResult = remoteDataBaseService.getKeyProjects(deptId,state);
+    public AjaxResult getKeyProjects(Long deptId, String state) {
+        AjaxResult ajaxResult = remoteDataBaseService.getKeyProjects(deptId, state);
         if ("200".equals(ajaxResult.get("code").toString())) {
             List<LinkedHashMap<String, Object>> list = (List<LinkedHashMap<String, Object>>) ajaxResult.get("data");
-            list.forEach(map->{
-                if(null != map.get("cameraCode")){
+            list.forEach(map -> {
+                if (null != map.get("cameraCode")) {
                     map.put("cameraCode", map.get("cameraCode").toString().split(","));
                 }
             });
@@ -368,8 +368,8 @@ public class AppBigDataController extends VisuBaseService {
         TableDataInfo keyProjectsByParams = remoteDataBaseService.getKeyProjectsByParams(bo.getPageNum(), bo.getPageSize(), bo.getDeptId(), bo.getPark(), bo.getProjectName(), bo.getTerritoriality(), bo.getNature(), bo.getState());
         if (HttpStatus.SUCCESS == keyProjectsByParams.getCode()) {
             List<LinkedHashMap<String, Object>> list = (List<LinkedHashMap<String, Object>>) keyProjectsByParams.getRows();
-            list.forEach(map->{
-                if(null != map.get("cameraCode")){
+            list.forEach(map -> {
+                if (null != map.get("cameraCode")) {
                     map.put("cameraCode", map.get("cameraCode").toString().split(","));
                 }
             });
@@ -396,6 +396,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 获取重点区域
+     *
      * @return
      * @Version 1.0
      * @author wang_xy
@@ -423,6 +424,7 @@ public class AppBigDataController extends VisuBaseService {
     /**
      * 获取重点区域
      * 带筛选,带分页
+     *
      * @return
      * @Version 1.0
      * @author wang_xy
@@ -445,7 +447,7 @@ public class AppBigDataController extends VisuBaseService {
                 area.put("projectLevelLabel", projectLevel.get(area.get("projectLevel")));
             }
             return AjaxResult.success(list);
-        }else{
+        } else {
             return AjaxResult.error(importAreaListByParams.getCode(), importAreaListByParams.getMsg());
         }
     }
@@ -475,6 +477,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * app事件统计
+     *
      * @param deptId
      * @return
      */
@@ -486,6 +489,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 四长统计
+     *
      * @param deptId
      * @return
      */
@@ -497,6 +501,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 四长概况点击事件
+     *
      * @param CommandCenterBO
      * @return
      */
@@ -516,6 +521,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 手机端四长接口
+     *
      * @param CommandCenterBO
      * @return
      */
@@ -528,6 +534,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 通讯录组织机构
+     *
      * @return
      */
     @ApiOperation(value = "通讯录组织机构", notes = "通讯录组织机构")
@@ -538,6 +545,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 根据部门id获取通讯录列表
+     *
      * @param deptId
      * @param pageNum
      * @param pageSize
@@ -552,6 +560,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 大事迹按部门搜索
+     *
      * @param deptId
      * @return
      */
@@ -564,6 +573,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 防火队发送短信
+     *
      * @param visuFireSendingSMSVo
      * @return
      */
@@ -576,6 +586,7 @@ public class AppBigDataController extends VisuBaseService {
 
     /**
      * 防火队列表
+     *
      * @param dataBO
      * @return
      */

+ 29 - 59
src/main/java/com/sooka/sponest/mobile/appbigdata/controller/AppBigDataCountController.java

@@ -11,9 +11,9 @@ import com.sooka.sponest.mobile.appbigdata.domain.CenterdataTEnvironmentRyList;
 import com.sooka.sponest.mobile.appbigdata.domain.ForestCloudRYList;
 import com.sooka.sponest.mobile.appbigdata.domain.bo.EnvironmentCloudRYBO;
 import com.sooka.sponest.mobile.appbigdata.domain.bo.ForestCloudRYBO;
+import com.sooka.sponest.mobile.appbigdata.domain.bo.VisualBO;
 import com.sooka.sponest.mobile.appbigdata.domain.vo.ForestCloudMapVO;
 import com.sooka.sponest.mobile.appbigdata.domain.vo.VisuForestCloudMapVO;
-import com.sooka.sponest.mobile.appbigdata.domain.bo.VisualBO;
 import com.sooka.sponest.mobile.base.service.AppAttendanceService;
 import com.sooka.sponest.mobile.data.digitalagriculture.domain.VisuBaseService;
 import com.sooka.sponest.mobile.remoteapi.RemoteDataBaseService;
@@ -21,35 +21,30 @@ import com.sooka.sponest.mobile.remoteapi.RemoteEventBaseService;
 import com.sooka.sponest.mobile.remoteapi.RemoteMiddlewareService;
 import com.sooka.sponest.mobile.remoteapi.domain.DataVO;
 import com.sooka.sponest.mobile.utils.PictureReplaceAll;
-import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import javax.annotation.Resource;
 import java.util.*;
 
 @RestController
 @RequestMapping("/AppBigDataCountController")
 public class AppBigDataCountController extends VisuBaseService {
 
-    public final static String EVENT_TYPE = "eventType";
-    public final static String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
-    public final static String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
-    public final static String EVENT = "event";
-    public final static String NAME_CHINESE = "name_chinese";
-    public final static String NAME_ORIGINAL = "name_original";
+    public static final String EVENT_TYPE = "eventType";
+    public static final String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
+    public static final String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
+    public static final String EVENT = "event";
+    public static final String NAME_CHINESE = "name_chinese";
+    public static final String NAME_ORIGINAL = "name_original";
 
     @Autowired
     private RemoteMiddlewareService middlewareService;
-    @Resource
-    AppAttendanceService appAttendanceService;
-    @Resource
-    RemoteEventBaseService remoteEventBaseService;
-
-    @Resource
-    RemoteDataBaseService dataBaseService;
-    ;
-
+    @Autowired
+    private AppAttendanceService appAttendanceService;
+    @Autowired
+    private RemoteEventBaseService remoteEventBaseService;
+    @Autowired
+    private RemoteDataBaseService dataBaseService;
 
     /**
      * 查询落点集合接口
@@ -78,9 +73,9 @@ public class AppBigDataCountController extends VisuBaseService {
         R resultData = middlewareService.getResourcePointById(vb.getId(), vb.getType());
         if (HttpStatus.SUCCESS == resultData.getCode()) {
             Map<String, Object> data = (Map<String, Object>) resultData.getData();
-            if(data.containsKey("pictures")){
+            if (data.containsKey("pictures")) {
                 List<String> pictures = (List<String>) data.get("pictures");
-                if(!pictures.isEmpty()){
+                if (!pictures.isEmpty()) {
                     List<String> strList = PictureReplaceAll.replacePicturesList(pictures);
                     data.put("pictures", strList);
                 }
@@ -162,8 +157,8 @@ public class AppBigDataCountController extends VisuBaseService {
         JSONArray result = new JSONArray();
         for (Object data : list) {
             JSONObject jsonObject = (JSONObject) JSONObject.toJSON(data);
-            if(jsonObject.containsKey("dictType")){
-                jsonObject.put("jobValue",jsonObject.remove("dictType"));
+            if (jsonObject.containsKey("dictType")) {
+                jsonObject.put("jobValue", jsonObject.remove("dictType"));
             }
             result.add(jsonObject);
         }
@@ -171,39 +166,26 @@ public class AppBigDataCountController extends VisuBaseService {
     }
 
     /**
+     * @throws
      * @description
      * @author LG
      * @param[1] deptId
      * @param[2] leadType
-     * @throws
      * @Api 河长,路长,田长,获取人员类型
      * @time 2023/8/16 18:29
      */
-    private ArrayList<Map<String, Object>> getRyListByJob(Long deptId, String leadType){
+    private ArrayList<Map<String, Object>> getRyListByJob(Long deptId, String leadType) {
         AjaxResult waterResult = dataBaseService.getRyListToWaterConservancyViewByType(deptId, leadType);
         LinkedHashMap<String, Object> data = (LinkedHashMap<String, Object>) waterResult.get("data");
-        ArrayList<Map<String, Object>> list = (ArrayList<Map<String, Object>>) data.get("ryList");
-        return list;
+        return (ArrayList<Map<String, Object>>) data.get("ryList");
     }
 
     /**
-     * @throws 手机端:人员巡查轨迹五级联动
-     * @description
-     * @author LG
-     * @param[1] null
-     * @time 2023/8/16 11:08
-     */
-
-    //1. 获取航管局列表
-    //字典值,调用/AppCameraController/getSortByType  传dictType(字典值的key) 获取数据
-
-    //2. 获取航管局对应的人员类型
-
-    /**
      * 获取航管局对应的人员类型
+     *
      * @param dictValue 行管局类型 1:林业;2:农业;3:水利;4:环保;5:应急;6:交通;7:资源;8:消防
-     * @param deptId 部门id
-     * @param leadType 人员类型
+     * @param deptId    部门id
+     * @param leadType  人员类型
      * @return AjaxResult
      */
     @GetMapping("/getPersonTypeBySystem")
@@ -213,54 +195,42 @@ public class AppBigDataCountController extends VisuBaseService {
         switch (dictValue) {
             case "1"://林业
                 R<ForestCloudRYList> ryListToForestView = dataBaseService.getRyListToForestView(forestMapVo);
-                if(HttpStatus.SUCCESS == ryListToForestView.getCode()){
+                if (HttpStatus.SUCCESS == ryListToForestView.getCode()) {
                     ArrayList<ForestCloudRYBO> visuForestCloudRYBO = (ArrayList<ForestCloudRYBO>) ryListToForestView.getData().getVisuForestCloudRYBO();
                     return AjaxResult.success(typeUnity(visuForestCloudRYBO));
-                }else{
+                } else {
                     return AjaxResult.error(ryListToForestView.getCode(), ryListToForestView.getMsg());
                 }
             case "2"://农业
                 //无
                 return AjaxResult.success(new JSONArray());
-
             case "3"://水利
                 return AjaxResult.success(typeUnity(getRyListByJob(deptId, leadType)));
-
             case "4"://环保
                 R<CenterdataTEnvironmentRyList> ryListToEnvironmentView = dataBaseService.getRyListToEnvironmentView(forestMapVo);
-                if(HttpStatus.SUCCESS == ryListToEnvironmentView.getCode()){
+                if (HttpStatus.SUCCESS == ryListToEnvironmentView.getCode()) {
                     ArrayList<EnvironmentCloudRYBO> userList = (ArrayList<EnvironmentCloudRYBO>) ryListToEnvironmentView.getData().getUser();
                     return AjaxResult.success(typeUnity(userList));
-                }else{
+                } else {
                     return AjaxResult.error(ryListToEnvironmentView.getCode(), ryListToEnvironmentView.getMsg());
                 }
             case "5"://应急
                 return AjaxResult.success(new JSONArray());
-
             case "6"://交通
                 return AjaxResult.success(typeUnity(getRyListByJob(deptId, leadType)));
-
             case "7"://资源
                 return AjaxResult.success(typeUnity(getRyListByJob(deptId, leadType)));
-
             case "8"://消防
                 R<Map<String, Object>> ryListToFireControlView = dataBaseService.getRyListToFireControlView(deptId);
-                if(HttpStatus.SUCCESS == ryListToFireControlView.getCode()){
+                if (HttpStatus.SUCCESS == ryListToFireControlView.getCode()) {
                     ArrayList<Map<String, Object>> fireControlList = (ArrayList<Map<String, Object>>) ryListToFireControlView.getData().get("ryList");
                     return AjaxResult.success(typeUnity(fireControlList));
-                }else{
+                } else {
                     return AjaxResult.error(ryListToFireControlView.getCode(), ryListToFireControlView.getMsg());
                 }
-
             default: {
                 return AjaxResult.error(500, "航管局类型错误");
             }
         }
     }
-
-    //3. 获取类型对应的人员信息
-
-    //4. 获取人员对应的巡护任务列表
-
-    //5. 根据巡护任务查询任务详情轨迹
 }

+ 0 - 18
src/main/java/com/sooka/sponest/mobile/base/database/DynamicDataSource.java

@@ -1,18 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
-
-
-public class DynamicDataSource extends AbstractRoutingDataSource {
-
-    Logger logger = LoggerFactory.getLogger(DynamicDataSource.class);
-
-    @Override
-    protected Object determineCurrentLookupKey() {
-        logger.info("------------------当前数据源 {}", DynamicDataSourceSwitcher.getDataSource());
-        return DynamicDataSourceSwitcher.getDataSource();
-    }
-}

+ 0 - 35
src/main/java/com/sooka/sponest/mobile/base/database/DynamicDataSourceAspect.java

@@ -1,35 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-import org.aspectj.lang.annotation.After;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Before;
-import org.aspectj.lang.annotation.Pointcut;
-import org.springframework.core.annotation.Order;
-import org.springframework.stereotype.Component;
-
-@Aspect
-@Component
-@Order(1)
-public class DynamicDataSourceAspect {
-
-    /**
-     * 切入点只对@Service注解的类上的@DataSource方法生效
-     * @param myDataSource
-     */
-    @Pointcut(value="(@within(org.springframework.stereotype.Service) ||@within(org.springframework.stereotype.Repository)) && @annotation(myDataSource)" )
-    public void dynamicDataSourcePointCut(MyDataSource myDataSource){}
-
-    @Before(value = "dynamicDataSourcePointCut(myDataSource)")
-    public void switchDataSource(MyDataSource myDataSource) {
-        DynamicDataSourceSwitcher.setDataSource(myDataSource.value());
-    }
-
-    /**
-     * 切点执行完后 切换成主数据库
-     * @param myDataSource
-     */
-    @After(value="dynamicDataSourcePointCut(myDataSource)")
-    public void after(MyDataSource myDataSource){
-        DynamicDataSourceSwitcher.cleanDataSource();
-    }
-}

+ 0 - 45
src/main/java/com/sooka/sponest/mobile/base/database/DynamicDataSourceSwitcher.java

@@ -1,45 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class DynamicDataSourceSwitcher {
-
-    static Logger logger = LoggerFactory.getLogger(DynamicDataSourceSwitcher.class);
-
-    public static final String Master = "master";
-    public static final String dbCenterTtranmanager = "db-center-tranmanager";
-    public static final String dbCenterData = "db-center-data";
-    public static final String dbCenterEvent = "db-center-event";
-    public static final String dbCenterMonitor = "db-center-monitor";
-    public static final String dbCenterTask = "db-center-task";
-    public static final String dbCenterEvaluation = "db-center-evaluation";
-    public static final String dbCenterFire = "db-center-fire";
-    public static final String dbCenterStraw = "db-center-straw";
-    public static final String dbCenterPests = "db-center-pests";
-    public static final String dbCenterComprehensive = "db-center-comprehensive";
-    public static final String dbCenterOnest = "db-center-onest";
-    public static final String dbSystemData = "db-system";
-    public static final String dbCenterMessage = "db-center-message";
-
-    private static final ThreadLocal<String> contextHolder = new ThreadLocal<>();
-
-    public static void setDataSource(String name){
-        logger.info("-------- 设置数据源数据源为 :{} ", name);
-        contextHolder.set(name);
-    }
-
-    public static String getDataSource(){
-        if (StringUtils.isEmpty(contextHolder.get())) {
-            setDataSource(Master);
-        }
-        return contextHolder.get();
-    }
-
-    public static void cleanDataSource(){
-        contextHolder.remove();
-    }
-
-}

+ 0 - 4
src/main/java/com/sooka/sponest/mobile/base/database/GlobalTransactionalRabbitMQ.java

@@ -1,4 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-public @interface GlobalTransactionalRabbitMQ {
-}

+ 0 - 145
src/main/java/com/sooka/sponest/mobile/base/database/MultipleDataSourceConfig.java

@@ -1,145 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-
-import com.alibaba.druid.pool.DruidDataSource;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-
-import javax.sql.DataSource;
-import java.util.HashMap;
-import java.util.Map;
-
-@Configuration
-public class MultipleDataSourceConfig {
-
-    @Bean("master")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.master")
-    public DataSource createMasterDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbSystemData")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-system")
-    public DataSource createSystemDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterTranmanager")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-tranmanager")
-    public DataSource createTranmanagerDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterData")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-data")
-    public DataSource createDataDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterMessage")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-message")
-    public DataSource createMessageDataSource() {
-        return new DruidDataSource();
-    }
-
-
-    @Bean("dbCenterEvent")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-event")
-    public DataSource createEventDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterMonitor")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-monitor")
-    public DataSource createMonitorDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterTask")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-task")
-    public DataSource createTaskDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterEvaluation")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-evaluation")
-    public DataSource createEvaluationDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterFire")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-fire")
-    public DataSource createFireDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterStraw")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-straw")
-    public DataSource createStrawDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterPests")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-pests")
-    public DataSource createPestsDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterComprehensive")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-comprehensive")
-    public DataSource createComprehensiveDataSource() {
-        return new DruidDataSource();
-    }
-
-    @Bean("dbCenterOnest")
-    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center-onest")
-    public DataSource createOnestDataSource() {
-        return new DruidDataSource();
-    }
-
-    /**
-     * 设置动态数据源,通过@Primary 来确定主DataSource
-     *
-     * @return
-     */
-    @Bean
-    @Primary
-    public DataSource createDynamicDataSource(@Qualifier("master") DataSource master,
-                                              @Qualifier("dbSystemData") DataSource dbSystemData,
-                                              @Qualifier("dbCenterData") DataSource dbCenterData,
-                                              @Qualifier("dbCenterMessage") DataSource dbCenterMessage,
-                                              @Qualifier("dbCenterEvent") DataSource dbCenterEvent,
-                                              @Qualifier("dbCenterMonitor") DataSource dbCenterMonitor,
-                                              @Qualifier("dbCenterTask") DataSource dbCenterTask,
-                                              @Qualifier("dbCenterEvaluation") DataSource dbCenterEvaluation,
-                                              @Qualifier("dbCenterFire") DataSource dbCenterFire,
-                                              @Qualifier("dbCenterStraw") DataSource dbCenterStraw,
-                                              @Qualifier("dbCenterPests") DataSource dbCenterPests,
-                                              @Qualifier("dbCenterComprehensive") DataSource dbCenterComprehensive,
-                                              @Qualifier("dbCenterOnest") DataSource dbCenterOnest,
-                                              @Qualifier("dbCenterTranmanager") DataSource dbCenterTranmanager) {
-        DynamicDataSource dynamicDataSource = new DynamicDataSource();
-        //设置默认数据源
-        dynamicDataSource.setDefaultTargetDataSource(master);
-        //配置多数据源
-        Map<Object, Object> map = new HashMap<>();
-        map.put("master", master);
-        map.put("db-system", dbSystemData);
-        map.put("db-center-tranmanager", dbCenterTranmanager);
-        map.put("db-center-data", dbCenterData);
-        map.put("db-center-message", dbCenterMessage);
-        map.put("db-center-event", dbCenterEvent);
-        map.put("db-center-monitor", dbCenterMonitor);
-        map.put("db-center-task", dbCenterTask);
-        map.put("db-center-evaluation", dbCenterEvaluation);
-        map.put("db-center-fire", dbCenterFire);
-        map.put("db-center-straw", dbCenterStraw);
-        map.put("db-center-pests", dbCenterPests);
-        map.put("db-center-comprehensive", dbCenterComprehensive);
-        map.put("db-center-onest", dbCenterOnest);
-        dynamicDataSource.setTargetDataSources(map);
-        return dynamicDataSource;
-    }
-}

+ 0 - 14
src/main/java/com/sooka/sponest/mobile/base/database/MyDataSource.java

@@ -1,14 +0,0 @@
-package com.sooka.sponest.mobile.base.database;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({
-        ElementType.METHOD
-})
-public @interface MyDataSource {
-    String value() default "";
-}