wangliang 2 лет назад
Родитель
Сommit
8d6bb20c09

+ 1 - 5
themis-admin/src/main/java/com/qmth/themis/admin/api/SysController.java

@@ -30,7 +30,6 @@ import com.tencentcloudapi.vod.v20180717.models.MediaBasicInfo;
 import com.tencentcloudapi.vod.v20180717.models.MediaInfo;
 import com.tencentcloudapi.vod.v20180717.models.MediaInfo;
 import com.tencentcloudapi.vod.v20180717.models.SearchMediaResponse;
 import com.tencentcloudapi.vod.v20180717.models.SearchMediaResponse;
 import io.swagger.annotations.*;
 import io.swagger.annotations.*;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.CollectionUtils;
@@ -124,9 +123,6 @@ public class SysController {
     @Resource
     @Resource
     TMTencentVideoMessageService tmTencentVideoMessageService;
     TMTencentVideoMessageService tmTencentVideoMessageService;
 
 
-    @Value(value = "${app.version}")
-    private String version;
-
     @ApiOperation(value = "同步机构接口")
     @ApiOperation(value = "同步机构接口")
     @RequestMapping(value = "/sync/org", method = RequestMethod.POST)
     @RequestMapping(value = "/sync/org", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "菜单信息", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "菜单信息", response = Result.class)})
@@ -266,7 +262,7 @@ public class SysController {
     public Result queryByOrgCode(@ApiParam(value = "机构code", required = true) @RequestParam String code) {
     public Result queryByOrgCode(@ApiParam(value = "机构code", required = true) @RequestParam String code) {
         Optional.ofNullable(code).orElseThrow(() -> new BusinessException(ExceptionResultEnum.ORG_CODE_IS_NULL));
         Optional.ofNullable(code).orElseThrow(() -> new BusinessException(ExceptionResultEnum.ORG_CODE_IS_NULL));
         Map<String, Object> map = new HashMap<>();
         Map<String, Object> map = new HashMap<>();
-        map.put(SystemConstant.VERSION, version);
+        map.put(SystemConstant.VERSION, SystemConstant.VERSION_VALUE);
         if (!Objects.equals(code.toUpperCase(), SystemConstant.ADMIN)) {
         if (!Objects.equals(code.toUpperCase(), SystemConstant.ADMIN)) {
             TBOrg tbOrg = themisCacheService.addOrgCodeCache(code);
             TBOrg tbOrg = themisCacheService.addOrgCodeCache(code);
             Optional.ofNullable(tbOrg).orElseThrow(() -> new BusinessException(ExceptionResultEnum.ORG_NO));
             Optional.ofNullable(tbOrg).orElseThrow(() -> new BusinessException(ExceptionResultEnum.ORG_NO));

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

@@ -30,7 +30,6 @@ import com.qmth.themis.common.util.ResultUtil;
 import io.swagger.annotations.*;
 import io.swagger.annotations.*;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.dao.DuplicateKeyException;
 import org.springframework.dao.DuplicateKeyException;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
@@ -82,9 +81,6 @@ public class TBUserController {
     @Resource
     @Resource
     TBSessionService tbSessionService;
     TBSessionService tbSessionService;
 
 
-    @Value(value = "${app.version}")
-    private String version;
-
     @ApiOperation(value = "用户登录接口")
     @ApiOperation(value = "用户登录接口")
     @RequestMapping(value = "/login/account", method = RequestMethod.POST)
     @RequestMapping(value = "/login/account", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "用户信息", response = TBUser.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "用户信息", response = TBUser.class)})
@@ -226,7 +222,7 @@ public class TBUserController {
         map.put(SystemConstant.ACCOUNT, user);
         map.put(SystemConstant.ACCOUNT, user);
         map.put(SystemConstant.SESSION_ID, sessionId);
         map.put(SystemConstant.SESSION_ID, sessionId);
         map.put("roleCodes", authDto.getRoleCodes());
         map.put("roleCodes", authDto.getRoleCodes());
-        map.put(SystemConstant.VERSION, version);
+        map.put(SystemConstant.VERSION, SystemConstant.VERSION_VALUE);
         if (Objects.nonNull(authDto.getTbOrg())) {
         if (Objects.nonNull(authDto.getTbOrg())) {
             Map orgMap = new HashMap();
             Map orgMap = new HashMap();
             orgMap.put(SystemConstant.NAME, authDto.getTbOrg().getName());
             orgMap.put(SystemConstant.NAME, authDto.getTbOrg().getName());

+ 0 - 1
themis-admin/src/main/resources/application.properties

@@ -17,7 +17,6 @@ server.tomcat.uri-encoding=UTF-8
 
 
 #\u9879\u76EE\u540D\u79F0
 #\u9879\u76EE\u540D\u79F0
 spring.application.name=themis-admin
 spring.application.name=themis-admin
-app.version=@project.version@
 
 
 #\u6570\u636E\u6E90\u914D\u7F6E
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.host=localhost

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

@@ -385,6 +385,7 @@ public class SystemConstant {
     public final static String REDIS_ACTIVITY_CODE_SEQUENCE = "redis:seq:activity:code:";
     public final static String REDIS_ACTIVITY_CODE_SEQUENCE = "redis:seq:activity:code:";
 
 
     public static final String VERSION = "version";
     public static final String VERSION = "version";
+    public static final String VERSION_VALUE = "1.2.6.1";
 
 
     /**
     /**
      * session过期时间
      * session过期时间

+ 1 - 6
themis-exam/src/main/java/com/qmth/themis/exam/api/TEStudentController.java

@@ -1,6 +1,5 @@
 package com.qmth.themis.exam.api;
 package com.qmth.themis.exam.api;
 
 
-import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.qmth.themis.business.annotation.ApiJsonObject;
 import com.qmth.themis.business.annotation.ApiJsonObject;
 import com.qmth.themis.business.annotation.ApiJsonProperty;
 import com.qmth.themis.business.annotation.ApiJsonProperty;
@@ -44,7 +43,6 @@ import io.swagger.annotations.*;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.validation.BindingResult;
 import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -111,9 +109,6 @@ public class TEStudentController {
     @Resource
     @Resource
     MqUtil mqUtil;
     MqUtil mqUtil;
 
 
-    @Value(value = "${app.version}")
-    private String version;
-
     @ApiOperation(value = "学生登录接口")
     @ApiOperation(value = "学生登录接口")
     @RequestMapping(value = "/login", method = RequestMethod.POST)
     @RequestMapping(value = "/login", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "学生信息", response = TEExamResultDto.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "学生信息", response = TEExamResultDto.class)})
@@ -292,7 +287,7 @@ public class TEStudentController {
         //        map.put(SystemConstant.ACCESS_TOKEN, test);
         //        map.put(SystemConstant.ACCESS_TOKEN, test);
         map.put(SystemConstant.STUDENT_ACCOUNT, teStudent);
         map.put(SystemConstant.STUDENT_ACCOUNT, teStudent);
         map.put(SystemConstant.SESSION_ID, sessionId);
         map.put(SystemConstant.SESSION_ID, sessionId);
-        map.put(SystemConstant.VERSION, version);
+        map.put(SystemConstant.VERSION, SystemConstant.VERSION_VALUE);
         return ResultUtil.ok(map);
         return ResultUtil.ok(map);
     }
     }
 
 

+ 0 - 1
themis-exam/src/main/resources/application.properties

@@ -9,7 +9,6 @@ server.tomcat.uri-encoding=UTF-8
 
 
 #\u9879\u76EE\u540D\u79F0
 #\u9879\u76EE\u540D\u79F0
 spring.application.name=themis-exam
 spring.application.name=themis-exam
-app.version=@project.version@
 
 
 #\u6570\u636E\u6E90\u914D\u7F6E
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.host=localhost

+ 0 - 1
themis-task/src/main/resources/application.properties

@@ -9,7 +9,6 @@ server.tomcat.uri-encoding=UTF-8
 
 
 #\u9879\u76EE\u540D\u79F0
 #\u9879\u76EE\u540D\u79F0
 spring.application.name=themis-task
 spring.application.name=themis-task
-app.version=@project.version@
 
 
 #\u6570\u636E\u6E90\u914D\u7F6E
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.host=localhost