Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
micro_app
gk
Commits
3c86a56a
Commit
3c86a56a
authored
Nov 26, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(markNoSelect): 自助选号处理+预约发枪保留1位小数
parent
415faf80
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
7 deletions
+120
-7
CommonController.java
...va/com/dlbridge/jadp/plugins/common/CommonController.java
+32
-0
gunRule.jsp
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
+2
-1
markNoSelect.jsp
src/main/webapp/WEB-INF/views/cmpt/markNoSelect.jsp
+86
-6
No files found.
src/main/java/com/dlbridge/jadp/plugins/common/CommonController.java
View file @
3c86a56a
...
@@ -154,6 +154,38 @@ public class CommonController {
...
@@ -154,6 +154,38 @@ public class CommonController {
return
Result
.
fail
().
setMsg
(
"文件上传失败"
);
return
Result
.
fail
().
setMsg
(
"文件上传失败"
);
}
}
@PostMapping
(
"uploadSelectMarkNoBg"
)
@ApiOperation
(
value
=
"选号背景上传"
)
public
Result
<?>
uploadGunRuleBg
(
@RequestPart
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"gCmptId"
)
Integer
gCmptId
)
{
try
{
// 检查文件大小是否超过1MB
long
maxFileSize
=
5
*
1024
*
1024
;
// 1MB
if
(
file
.
getSize
()
>
maxFileSize
)
{
return
Result
.
fail
().
setMsg
(
"上传文件大小不能超过5MB"
);
}
String
originalFilename
=
file
.
getOriginalFilename
();
if
(
originalFilename
==
null
||
originalFilename
.
isEmpty
())
{
return
Result
.
fail
().
setMsg
(
"文件名不能为空"
);
}
assert
originalFilename
!=
null
;
// 检查文件名中是否包含点号
int
lastIndex
=
originalFilename
.
lastIndexOf
(
"."
);
if
(
lastIndex
==
-
1
)
{
// 如果没有后缀名,直接返回报错信息
return
Result
.
fail
().
setMsg
(
"上传的文件没有后缀名,请检查文件"
);
}
String
objectName
=
"micro/"
+
gCmptId
+
"_cmptId/mark_no_bg.png"
;
String
filePath
=
aliOssUtil
.
upload
(
file
.
getBytes
(),
objectName
);
log
.
info
(
"文件上传名: {} 保存的文件名:{}"
,
originalFilename
,
filePath
);
return
Result
.
success
().
setContent
(
filePath
);
}
catch
(
IOException
e
)
{
log
.
error
(
"文件上传失败:{}"
,
e
);
}
return
Result
.
fail
().
setMsg
(
"文件上传失败"
);
}
/**
/**
* 检查文件的魔数是否与扩展名匹配
* 检查文件的魔数是否与扩展名匹配
...
...
src/main/webapp/WEB-INF/views/cmpt/gunRule.jsp
View file @
3c86a56a
...
@@ -241,7 +241,8 @@
...
@@ -241,7 +241,8 @@
<
/n-form-item
>
<
/n-form-item
>
<
n
-
form
-
item
label
=
"关门时间"
path
=
"cutOffTime"
>
<
n
-
form
-
item
label
=
"关门时间"
path
=
"cutOffTime"
>
<
n
-
input
-
number
:
min
=
"1"
<
n
-
input
-
number
:
min
=
"1"
:
max
=
"200"
v
-
model
:
value
=
"gunRuleValue.cutOffTime"
placeholder
=
"请输入关门时间"
>
:
precision
=
"1"
:
max
=
"500"
v
-
model
:
value
=
"gunRuleValue.cutOffTime"
placeholder
=
"请输入关门时间"
>
<
template
#
suffix
>
<
template
#
suffix
>
小时
小时
<
/template
>
<
/template
>
...
...
src/main/webapp/WEB-INF/views/cmpt/markNoSelect.jsp
View file @
3c86a56a
This diff is collapsed.
Click to expand it.
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