Browse Source

新增根据ip查询信息

wangliang 2 years ago
parent
commit
c5b26bd45c

+ 12 - 16
pom.xml

@@ -44,13 +44,14 @@
         <commons.version>3.10</commons.version>
         <commons.codec.version>1.15</commons.codec.version>
         <jackson.version>2.11.0</jackson.version>
-<!--        <ehcache.version>2.10.6</ehcache.version>-->
+        <!--        <ehcache.version>2.10.6</ehcache.version>-->
         <swagger2-bootstrap.version>1.9.6</swagger2-bootstrap.version>
         <jetbrains.version>13.0</jetbrains.version>
         <tencentyun.version>1.1</tencentyun.version>
         <tencentyun.sdk.version>3.1.322</tencentyun.sdk.version>
         <version-plugin.version>2.8.1</version-plugin.version>
         <googleBar.version>3.4.0</googleBar.version>
+        <ip2region.version>2.6.5</ip2region.version>
     </properties>
 
     <dependencyManagement>
@@ -102,11 +103,11 @@
                 <artifactId>springfox-swagger2</artifactId>
                 <version>${swagger2.version}</version>
             </dependency>
-<!--            <dependency>-->
-<!--                <groupId>com.github.xiaoymin</groupId>-->
-<!--                <artifactId>swagger-bootstrap-ui</artifactId>-->
-<!--                <version>${swagger2-bootstrap.version}</version>-->
-<!--            </dependency>-->
+            <!--            <dependency>-->
+            <!--                <groupId>com.github.xiaoymin</groupId>-->
+            <!--                <artifactId>swagger-bootstrap-ui</artifactId>-->
+            <!--                <version>${swagger2-bootstrap.version}</version>-->
+            <!--            </dependency>-->
             <dependency>
                 <groupId>io.springfox</groupId>
                 <artifactId>springfox-swagger-ui</artifactId>
@@ -256,16 +257,11 @@
                 <artifactId>tencentcloud-sdk-java</artifactId>
                 <version>${tencentyun.sdk.version}</version>
             </dependency>
-<!--            <dependency>-->
-<!--                <groupId>com.google.zxing</groupId>-->
-<!--                <artifactId>core</artifactId>-->
-<!--                <version>${googleBar.version}</version>-->
-<!--            </dependency>-->
-<!--            <dependency>-->
-<!--                <groupId>com.google.zxing</groupId>-->
-<!--                <artifactId>javase</artifactId>-->
-<!--                <version>${googleBar.version}</version>-->
-<!--            </dependency>-->
+            <dependency>
+                <groupId>org.lionsoul</groupId>
+                <artifactId>ip2region</artifactId>
+                <version>${ip2region.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

+ 2 - 1
themis-admin/src/main/java/com/qmth/themis/admin/api/TBUserController.java

@@ -569,11 +569,12 @@ public class TBUserController {
                         @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
                         @ApiParam(value = "角色", required = false) @RequestParam(required = false) String roleCode,
                         @ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Integer enable,
+                        @ApiParam(value = "机构名称", required = false) @RequestParam(required = false) String orgName,
                         @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                         @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         IPage<TBUserDto> tbUserIPage = tbUserService
-                .userQuery(new Page<>(pageNumber, pageSize), id, loginName, name, roleCode, enable, tbUser.getOrgId());
+                .userQuery(new Page<>(pageNumber, pageSize), id, loginName, name, roleCode, enable, tbUser.getOrgId(), orgName);
         tbUserIPage.getRecords().forEach(s -> {
             if (Objects.nonNull(s.getRoleNameStr())) {
                 s.setRoleName(Arrays.asList(s.getRoleNameStr().split(",")));

+ 2 - 3
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamController.java

@@ -280,6 +280,7 @@ public class TEExamController {
                         @ApiParam(value = "考试批次模式", required = false) @RequestParam(required = false) String mode,
                         @ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Integer enable,
                         @ApiParam(value = "类型(区分实时监考台和考务)", required = false) @RequestParam(required = false) String type,
+                        @ApiParam(value = "查询是否结束监考", required = false) @RequestParam(required = false) Boolean finished,
                         @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) int pageNumber,
                         @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.SELECT_PAGE_SIZE_MAX) int pageSize) {
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
@@ -287,9 +288,7 @@ public class TEExamController {
         if (authDto.getRoleCodes().toString().contains(RoleEnum.INSPECTION.name())) {
             userId = null;
         }
-        return ResultUtil.ok(teExamService
-                .examQuery(new Page<>(pageNumber, pageSize), userId, id, code, name, mode, enable, tbUser.getOrgId(),
-                        type));
+        return ResultUtil.ok(teExamService.examQuery(new Page<>(pageNumber, pageSize), userId, id, code, name, mode, enable, tbUser.getOrgId(), type, finished));
     }
 
     @ApiOperation(value = "根据考试批次编码查询考场接口")

+ 1 - 0
themis-admin/src/main/java/com/qmth/themis/admin/start/StartRunning.java

@@ -21,6 +21,7 @@ public class StartRunning implements CommandLineRunner {
     public void run(String... args) throws Exception {
         log.info("服务器启动时执行 start");
         SystemConstant.initTempFiles();
+        SystemConstant.getSearcher();
         log.info("服务器启动时执行 end");
     }
 }

+ 10 - 0
themis-business/src/main/java/com/qmth/themis/business/constant/SystemConstant.java

@@ -15,6 +15,8 @@ import com.qmth.themis.common.enums.ExceptionResultEnum;
 import com.qmth.themis.common.enums.Platform;
 import com.qmth.themis.common.enums.Source;
 import com.qmth.themis.common.exception.BusinessException;
+import com.qmth.themis.common.util.IpUtil;
+import org.lionsoul.ip2region.xdb.Searcher;
 
 import java.io.File;
 import java.security.NoSuchAlgorithmException;
@@ -83,6 +85,7 @@ public class SystemConstant {
     /**
      * 系统相关
      */
+    public static volatile Searcher SEARCHER = null;
     public static final String SYS_CONFIG_KEY_CHARSETS = "sys.txt.charset";
     public static final String METHOD = "post";
     public static final int PAGE_SIZE_MIN = 10;
@@ -494,6 +497,13 @@ public class SystemConstant {
     //        return map;
     //    }
 
+    /**
+     * 获取searcher
+     */
+    public static void getSearcher() {
+        SEARCHER = Objects.isNull(SEARCHER) ? IpUtil.getSearcher() : SEARCHER;
+    }
+
     /**
      * 初始化附件文件路径
      */

+ 2 - 2
themis-business/src/main/java/com/qmth/themis/business/dao/TBUserMapper.java

@@ -1,6 +1,5 @@
 package com.qmth.themis.business.dao;
 
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.themis.business.base.CustomBaseMapper;
 import com.qmth.themis.business.dto.response.TBUserDto;
@@ -30,7 +29,8 @@ public interface TBUserMapper extends CustomBaseMapper<TBUser> {
      * @param role
      * @param enable
      * @param orgId
+     * @param orgName
      * @return
      */
-    IPage<TBUserDto> userQuery(IPage<Map> iPage, @Param("id") Long id, @Param("loginName") String loginName, @Param("name") String name, @Param("role") String role, @Param("enable") Integer enable, @Param("orgId") Long orgId);
+    IPage<TBUserDto> userQuery(IPage<Map> iPage, @Param("id") Long id, @Param("loginName") String loginName, @Param("name") String name, @Param("role") String role, @Param("enable") Integer enable, @Param("orgId") Long orgId, @Param("orgName") String orgName);
 }

+ 2 - 1
themis-business/src/main/java/com/qmth/themis/business/dao/TEExamMapper.java

@@ -36,9 +36,10 @@ public interface TEExamMapper extends BaseMapper<TEExam> {
      * @param enable
      * @param orgId
      * @param type
+     * @param finished
      * @return
      */
-    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, @Param("userId") Long userId, @Param("id") Long id, @Param("code") String code, @Param("name") String name, @Param("mode") String mode, @Param("enable") Integer enable, @Param("orgId") Long orgId, @Param("type") String type);
+    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, @Param("userId") Long userId, @Param("id") Long id, @Param("code") String code, @Param("name") String name, @Param("mode") String mode, @Param("enable") Integer enable, @Param("orgId") Long orgId, @Param("type") String type, @Param("finished") Boolean finished);
 
     /**
      * 根据考试批次编码查询考场接口

+ 2 - 1
themis-business/src/main/java/com/qmth/themis/business/service/TBUserService.java

@@ -26,7 +26,8 @@ public interface TBUserService extends IService<TBUser> {
      * @param role
      * @param enable
      * @param orgId
+     * @param orgName
      * @return
      */
-    IPage<TBUserDto> userQuery(IPage<Map> iPage, Long id, String loginName, String name, String role, Integer enable, Long orgId);
+    IPage<TBUserDto> userQuery(IPage<Map> iPage, Long id, String loginName, String name, String role, Integer enable, Long orgId, String orgName);
 }

+ 2 - 1
themis-business/src/main/java/com/qmth/themis/business/service/TEExamService.java

@@ -39,9 +39,10 @@ public interface TEExamService extends IService<TEExam> {
      * @param enable
      * @param orgId
      * @param type
+     * @param finished
      * @return
      */
-    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long userId, Long id, String code, String name, String mode, Integer enable, Long orgId, String type);
+    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long userId, Long id, String code, String name, String mode, Integer enable, Long orgId, String type, Boolean finished);
 
     /**
      * 根据考试批次编码查询考场接口

+ 3 - 2
themis-business/src/main/java/com/qmth/themis/business/service/impl/TBUserServiceImpl.java

@@ -34,10 +34,11 @@ public class TBUserServiceImpl extends ServiceImpl<TBUserMapper, TBUser> impleme
      * @param role
      * @param enable
      * @param orgId
+     * @param orgName
      * @return
      */
     @Override
-    public IPage<TBUserDto> userQuery(IPage<Map> iPage, Long id, String loginName, String name, String role, Integer enable, Long orgId) {
-        return tbUserMapper.userQuery(iPage, id, loginName, name, role, enable, orgId);
+    public IPage<TBUserDto> userQuery(IPage<Map> iPage, Long id, String loginName, String name, String role, Integer enable, Long orgId, String orgName) {
+        return tbUserMapper.userQuery(iPage, id, loginName, name, role, enable, orgId, orgName);
     }
 }

+ 3 - 2
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamServiceImpl.java

@@ -129,13 +129,14 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
      * @param enable
      * @param orgId
      * @param type
+     * @param finished
      * @return
      */
     @SuppressWarnings("rawtypes")
     @Override
     public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long userId, Long id, String code, String name,
-                                           String mode, Integer enable, Long orgId, String type) {
-        return teExamMapper.examQuery(iPage, userId, id, code, name, mode, enable, orgId, type);
+                                           String mode, Integer enable, Long orgId, String type, Boolean finished) {
+        return teExamMapper.examQuery(iPage, userId, id, code, name, mode, enable, orgId, type, finished);
     }
 
     /**

+ 5 - 7
themis-business/src/main/resources/mapper/TBUserMapper.xml

@@ -18,13 +18,7 @@
             from
             (
             select
-                tbu.org_id as orgId,tbu.id, tbu.mobile_number as mobileNumber, tbu.login_name as loginName, tbu.name, group_concat(tbr.role_code) as roleCodeStr, group_concat(tbr.role_name) as roleNameStr, tbu.enable,(
-            select
-            t.name
-            from
-            t_b_org t
-            where
-            t.id = tbu.org_id) as orgName,(
+                tbu.org_id as orgId,tbu.id, tbu.mobile_number as mobileNumber, tbu.login_name as loginName, tbu.name, group_concat(tbr.role_code) as roleCodeStr, group_concat(tbr.role_name) as roleNameStr, tbu.enable,tbo.name as orgName,(
             select
             t.name
             from
@@ -43,6 +37,7 @@
             tbur.user_id = tbu.id
             left join t_b_role tbr on
             tbr.role_code = tbur.role_code
+            left join t_b_org tbo on tbo.id = tbu.org_id
             <where>
                 <if test="id != null and id != ''">
                     and tbu.id = #{id}
@@ -59,6 +54,9 @@
                 <if test="orgId != null and orgId != ''">
                     and tbu.org_id = #{orgId}
                 </if>
+                <if test="orgName != null and orgName != ''">
+                    and tbo.name like concat('%', #{orgName}, '%')
+                </if>
             </where> group by tbu.org_id,tbu.id,tbu.mobile_number,tbu.login_name,tbu.name,tbu.enable) t
             <where>
                 t.roleCodeStr <![CDATA[ <> ]]> 'SUPER_ADMIN'

+ 23 - 11
themis-business/src/main/resources/mapper/TEExamMapper.xml

@@ -7,7 +7,7 @@
         t.id as examId
         from
         t_e_exam t
-        <where> 1 = 1
+        <where>1 = 1
             and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
             and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
             and t.enable = 1
@@ -82,11 +82,14 @@
         where
         t1.id = t.update_id) as updateName
         from t_e_exam t
-        <where> 1 = 1
+        <where>1 = 1
             <if test="type != null and type != '' and type == 'monitor'">
                 and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
                 and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
             </if>
+            <if test="finished != null and finished != '' and finished == 1">
+                and t.monitor_status = 'FINISHED'
+            </if>
             <if test="userId != null and userId != ''">
                 and t.enable = 1
                 and EXISTS(
@@ -118,7 +121,8 @@
             <if test="enable != null and enable != '' or enable == 0">
                 and t.enable = #{enable}
             </if>
-        </where> ) t
+        </where>
+        ) t
         <if test="type != null and type != '' and type == 'monitor'">
             left join t_e_exam_student tees on tees.exam_id = t.id
         </if>
@@ -141,7 +145,7 @@
     </select>
 
     <select id="examroomQuery" resultType="java.util.HashMap">
-     select
+        select
         distinct tees.room_code as roomCode,
         tees.room_name as roomName
         from
@@ -170,8 +174,10 @@
         group_concat(distinct teea.id) as examActivityId,
         <!--FLOOR((teea.finish_time - teea.start_time) / (24*60*60*1000)) as diffSum1,
         FLOOR(((teea.finish_time - teea.start_time) / (24*60*60*1000) - (unix_timestamp(current_timestamp()) * 1000 - teea.start_time) / (24*60*60*1000))) as reallyTime1,-->
-        datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as diffSum,
-        datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) -
+        datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time /
+        1000,'%Y-%m-%d %H:%i:%s')) as diffSum,
+        datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time /
+        1000,'%Y-%m-%d %H:%i:%s')) -
         datediff(now(),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as reallyTime
         from
         t_e_exam_student tees
@@ -216,7 +222,7 @@
         t_b_exam_invigilate_user tbeiu
         left join t_e_exam_student tees on
         tees.room_code = tbeiu.room_code and tees.exam_id = tbeiu.exam_id
-        <where> 1 = 1
+        <where>1 = 1
             <if test="userId != null and userId != ''">
                 and tbeiu.user_id = #{userId}
             </if>
@@ -233,11 +239,15 @@
     </select>
 
     <update id="updateInvigilateMonitorStatus">
-    	update t_e_exam set monitor_status=#{monitorStatus} where id=#{examId}
+        update t_e_exam
+        set monitor_status=#{monitorStatus}
+        where id = #{examId}
     </update>
 
     <update id="updateScoreStatus">
-    	update t_e_exam set score_status=#{scoreStatus} where id=#{examId}
+        update t_e_exam
+        set score_status=#{scoreStatus}
+        where id = #{examId}
     </update>
 
     <select id="examQueryForOpen" resultType="com.qmth.themis.business.bean.admin.OpenExamBean">
@@ -253,13 +263,15 @@
         t_e_exam t
         WHERE t.enable=1
         <if test="id != null">
-            AND	t.id = #{id}
+            AND t.id = #{id}
         </if>
         <if test="code != null and code !='' ">
             AND t.code = #{code}
         </if>
     </select>
     <update id="updateScoreProgress">
-    	update t_e_exam set progress=#{progress} where id=#{examId}
+        update t_e_exam
+        set progress=#{progress}
+        where id = #{examId}
     </update>
 </mapper>

+ 4 - 0
themis-common/pom.xml

@@ -94,5 +94,9 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.lionsoul</groupId>
+            <artifactId>ip2region</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 134 - 3
themis-common/src/main/java/com/qmth/themis/common/util/IpUtil.java

@@ -1,10 +1,18 @@
 package com.qmth.themis.common.util;
 
-import javax.servlet.http.HttpServletRequest;
-
+import com.qmth.themis.common.exception.BusinessException;
 import org.apache.commons.lang3.StringUtils;
+import org.lionsoul.ip2region.xdb.Searcher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.File;
+import java.net.URL;
+import java.util.Objects;
 
 public class IpUtil {
+    private final static Logger log = LoggerFactory.getLogger(IpUtil.class);
 
     /**
      * 获取过程ip(默认不包含代理ip)
@@ -54,5 +62,128 @@ public class IpUtil {
         }
         return ip;
     }
-    
+
+//    /**
+//     * 根据IP地址获取城市
+//     *
+//     * @param ip 如果放在服务器读取不了,两种方式
+//     *           1.可以在服务器上创建文件,ip2region.db这个放在文件里面,然后开始读取
+//     *           2.可以整个配置文件,在配置配置目录,然后读取配置文件
+//     * @return
+//     */
+//    public static String getCityInfo(String ip) throws IOException {
+//        URL url = IpUtil.class.getClassLoader().getResource("ip2region.db");
+//        File file = Objects.nonNull(url) ? new File(url.getFile()) : null;
+//        if (Objects.isNull(file)) {
+//            return null;
+//        }
+//        if (!file.exists()) {
+//            log.error("Error: Invalid ip2region.db file, filePath:" + file.getPath());
+//            return null;
+//        }
+//        //查询算法
+//        int algorithm = DbSearcher.BTREE_ALGORITHM; //B-tree
+//        //DbSearcher.BINARY_ALGORITHM //Binary
+//        //DbSearcher.MEMORY_ALGORITYM //Memory
+//        try {
+//            DbConfig config = new DbConfig();
+//            DbSearcher searcher = new DbSearcher(config, file.getPath());
+//            Method method;
+//            switch (algorithm) {
+//                case DbSearcher.BTREE_ALGORITHM:
+//                    method = searcher.getClass().getMethod("btreeSearch", String.class);
+//                    break;
+//                case DbSearcher.BINARY_ALGORITHM:
+//                    method = searcher.getClass().getMethod("binarySearch", String.class);
+//                    break;
+//                case DbSearcher.MEMORY_ALGORITYM:
+//                    method = searcher.getClass().getMethod("memorySearch", String.class);
+//                    break;
+//                default:
+//                    return null;
+//            }
+//            DataBlock dataBlock;
+//            if (!Util.isIpAddress(ip)) {
+//                log.error("Error: Invalid ip address");
+//                return null;
+//            }
+//            dataBlock = (DataBlock) method.invoke(searcher, ip);
+//            return dataBlock.getRegion();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        return null;
+//    }
+
+    /**
+     * 获取全局searcher
+     *
+     * @return
+     */
+    public static Searcher getSearcher() {
+        URL url = IpUtil.class.getClassLoader().getResource("ip2region.xdb");
+        File file = Objects.nonNull(url) ? new File(url.getFile()) : null;
+        if (Objects.isNull(file)) {
+            return null;
+        }
+        if (!file.exists()) {
+            log.error("Error: Invalid ip2region.xdb file, filePath:{}", file.getPath());
+            return null;
+        }
+        // 1、从 dbPath 加载整个 xdb 到内存。
+        byte[] cBuff;
+        try {
+            cBuff = Searcher.loadContentFromFile(file.getPath());
+        } catch (Exception e) {
+            log.error("加载ip离线数据失败", e);
+            if (e instanceof BusinessException) {
+                throw new BusinessException(e.getMessage());
+            } else {
+                throw new RuntimeException(e);
+            }
+        }
+
+        // 2、使用上述的 cBuff 创建一个完全基于内存的查询对象。
+        Searcher searcher;
+        try {
+            searcher = Searcher.newWithBuffer(cBuff);
+        } catch (Exception e) {
+            log.error("failed to create content cached searcher", e);
+            if (e instanceof BusinessException) {
+                throw new BusinessException(e.getMessage());
+            } else {
+                throw new RuntimeException(e);
+            }
+        }
+        return searcher;
+    }
+
+    /**
+     * 获取ip信息
+     *
+     * @param searcher
+     * @param ip
+     * @return
+     */
+    public static String getIpInfo(Searcher searcher, String ip) {
+        String region = null;
+        // 3、查询
+        try {
+            long start = System.currentTimeMillis();
+            region = searcher.search(ip);
+            long end = System.currentTimeMillis();
+            log.info("region: {}, ioCount: {}, 耗时: {} 秒", region, searcher.getIOCount(), (end - start) / 1000);
+        } catch (Exception e) {
+            log.error("failed to search", e);
+            if (e instanceof BusinessException) {
+                throw new BusinessException(e.getMessage());
+            } else {
+                throw new RuntimeException(e);
+            }
+        }
+        // 4、关闭资源 - 该 searcher 对象可以安全用于并发,等整个服务关闭的时候再关闭 searcher
+        // searcher.close();
+        // 备注:并发使用,用整个 xdb 数据缓存创建的查询对象可以安全的用于并发,也就是你可以把这个 searcher 对象做成全局对象去跨线程访问。
+        return region;
+    }
 }

BIN
themis-common/src/main/resources/ip2region.xdb


+ 1 - 0
themis-exam/src/main/java/com/qmth/themis/exam/start/StartRunning.java

@@ -49,6 +49,7 @@ public class StartRunning implements CommandLineRunner {
 //        rocketMessageConsumer.setRocketMQConsumer(nameServer, dictionaryConfig.mqConfigDomain().getMap().get(MqGroupEnum.WEBSOCKET_OE_GROUP.name()), dictionaryConfig.mqConfigDomain().getTopic(), MqTagEnum.OE_IM_BROADCASTING.name() + "||" + MqTagEnum.OE_IM_CLUSTERING.name() + "||" + MqTagEnum.OE_LIVENESS_VERIFY.name() + "||" + MqTagEnum.OE_MONITOR_FINISH.name() + "||" + MqTagEnum.OE_WARNING_FINISH.name() + "||" + MqTagEnum.OE_WEBSOCKET_MOBILE_ANSWER_READY.name() + "||" + MqTagEnum.OE_WEBSOCKET_MOBILE_ANSWER_UPLOAD.name() + "||" + MqTagEnum.OE_WEBSOCKET_EXAM_STOP.name() + "||" + MqTagEnum.MONITOR_START.name() + "||" + MqTagEnum.MONITOR_STOP.name() + "||" + MqTagEnum.OE_WEBSOCKET_MOBILE_MONITOR_STATUS.name(), MessageModel.CLUSTERING, SpringContextHolder.getBean(WebSocketOeServer.class));
 //        rocketMessageConsumer.setRocketMQConsumer(nameServer, dictionaryConfig.mqConfigDomain().getMap().get(MqGroupEnum.WEBSOCKET_OE_MOBILE_GROUP.name()), dictionaryConfig.mqConfigDomain().getTopic(), MqTagEnum.EXAM_STOP.name() + "||" + MqTagEnum.EXAM_START.name(), MessageModel.CLUSTERING, SpringContextHolder.getBean(WebSocketMobileServer.class));
         SystemConstant.initTempFiles();
+        SystemConstant.getSearcher();
         log.info("服务器启动时执行 end");
     }
 }