Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
241121f8
Commit
241121f8
authored
Jul 10, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加门户license验证
parent
cf3ad0e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
10 deletions
+36
-10
portal-manager/src/main/java/com/mortals/xhx/module/cipher/web/CipherController.java
...a/com/mortals/xhx/module/cipher/web/CipherController.java
+35
-9
portal-manager/src/main/resources/bootstrap.yml
portal-manager/src/main/resources/bootstrap.yml
+1
-1
No files found.
portal-manager/src/main/java/com/mortals/xhx/module/cipher/web/CipherController.java
View file @
241121f8
...
...
@@ -2,34 +2,31 @@ package com.mortals.xhx.module.cipher.web;
import
cn.hutool.core.date.DateUtil
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.base.framework.config.LicenseHandler
;
import
com.mortals.xhx.common.utils.CipherUtil
;
import
com.mortals.xhx.common.utils.DecodeUtil
;
import
com.mortals.xhx.common.utils.LicenseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
*
@Author: LiHuaZhi
* @
Description:
*
*/
*
授权文件上传与检测
* @
author: zxfei
*
@date: 2024/7/10 9:54
*/
@RestController
@RequestMapping
(
"/cipher"
)
@Slf4j
public
class
CipherController
{
@Value
(
"${sys.license.key}"
)
private
String
keyPath
;
...
...
@@ -75,4 +72,33 @@ public class CipherController {
}
@RequestMapping
(
value
=
"upload"
)
@UnAuth
public
String
doFileUpload
(
MultipartFile
file
)
{
/* Map<String, Object> model = new HashMap<>();
String jsonStr = "";
try {
// String filePath = uploadService.saveFileUpload(file, prePath, getCurUser());
model.put("url", filePath);
model.put("fileName", file.getOriginalFilename());
model.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonStr = JSONObject.toJSONString(model);
} catch (AppException e) {
log.error("上传异常",e);
model.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
model.put(KEY_RESULT_MSG, e.getMessage());
jsonStr = JSONObject.toJSONString(model);
} catch (Exception e) {
// doException(request, "上传文件", new HashMap<>(3), e);
// model.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
// model.put(KEY_RESULT_MSG, "文件上传失败");
jsonStr = JSONObject.toJSONString(model);
}
log.info("uploadResp==>{}",jsonStr);
return jsonStr;*/
return
""
;
}
}
portal-manager/src/main/resources/bootstrap.yml
View file @
241121f8
...
...
@@ -48,5 +48,5 @@ sys:
pub
:
/home/license/license.pub
log
:
/home/license
license
:
enable
:
tru
e
enable
:
fals
e
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment