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
b536575d
Commit
b536575d
authored
Jul 28, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(claimer): 免责模块优化和修复
parent
3332bb26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
709 additions
and
203 deletions
+709
-203
CmptMapper.xml
.../com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
+1
-1
RichText.java
...va/com/dlbridge/jadp/plugins/cmpt/dao/model/RichText.java
+1
-1
BannerService.java
...com/dlbridge/jadp/plugins/cmpt/service/BannerService.java
+1
-1
DisclaimerController.java
.../dlbridge/jadp/plugins/cmpt/web/DisclaimerController.java
+32
-0
ResourcesController.java
...m/dlbridge/jadp/plugins/cmpt/web/ResourcesController.java
+1
-0
CommonController.java
...va/com/dlbridge/jadp/plugins/common/CommonController.java
+29
-0
disClaimer.jsp
src/main/webapp/WEB-INF/views/cmpt/disClaimer.jsp
+407
-0
news.jsp
src/main/webapp/WEB-INF/views/cmpt/news.jsp
+2
-2
outter-link.jsp
src/main/webapp/WEB-INF/views/cmpt/outter-link.jsp
+11
-6
service.jsp
src/main/webapp/WEB-INF/views/cmpt/service.jsp
+19
-9
sure-letter.jsp
src/main/webapp/WEB-INF/views/cmpt/sure-letter.jsp
+197
-182
menu.jsp
src/main/webapp/WEB-INF/views/common/menu.jsp
+8
-1
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/CmptMapper.xml
View file @
b536575d
...
...
@@ -19,7 +19,7 @@
<result
property=
"sort"
column=
"sort"
></result>
</resultMap>
<select
id=
"queryCmptBycmptId"
resultType=
"Cmpt"
>
<select
id=
"queryCmptBycmptId"
resultType=
"
com.dlbridge.jadp.plugins.cmpt.dao.model.
Cmpt"
>
SELECT
cmpt_id cmptId,
cmpt_name as cmptName,
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/RichText.java
View file @
b536575d
...
...
@@ -8,7 +8,7 @@ public class RichText {
private
Integer
id
;
private
Integer
userId
;
private
Integer
cmptId
;
// 类型配置(1 网页 2 小程序(appId,path) 3 短连接(#小程序://) 4 页面(小程序) 5文档word,pdf 6 图片 png 7 定位)
// 类型配置(1 网页 2 小程序(appId,path) 3 短连接(#小程序://) 4 页面(小程序) 5文档word,pdf 6 图片 png 7 定位
8 微信文章
)
private
Integer
type
;
// 分类id
private
Integer
moduleId
;
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/BannerService.java
View file @
b536575d
...
...
@@ -101,7 +101,7 @@ public class BannerService {
if
(
partner
!=
null
&&
StringUtils
.
isNotBlank
(
partner
.
getPartnerId
())){
partnerId
=
partner
.
getPartnerId
();
// 限制其他赛事的处理
if
(
partnerId
!=
GEEXEK_PARTNER_ID
){
if
(
Objects
.
equals
(
partnerId
,
GEEXEK_PARTNER_ID
)||!
Objects
.
equals
(
banner
.
getCmptId
(),
GK_CMPT_ID
)
){
return
null
;
}
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/DisclaimerController.java
0 → 100644
View file @
b536575d
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
web
;
import
com.dlbridge.jadp.common.interceptor.PageView
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.servlet.ModelAndView
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
@RequestMapping
(
value
=
"/gk/disClaimer/"
)
@RestController
@ApiIgnore
@Log4j2
public
class
DisclaimerController
{
@Resource
private
CmptService
cmptService
;
@RequestMapping
(
"index/{cmptId}"
)
@PageView
public
ModelAndView
index
(
@PathVariable
(
"cmptId"
)
Integer
cmptId
,
ModelAndView
mv
)
{
Cmpt
cmpt
=
cmptService
.
queryCmptBycmptId
(
cmptId
);
mv
.
setViewName
(
"cmpt/disClaimer"
);
mv
.
addObject
(
"cmpt"
,
cmpt
);
return
mv
;
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ResourcesController.java
View file @
b536575d
...
...
@@ -113,6 +113,7 @@ public class ResourcesController {
// 修改为小程序页面路径 by 2025-06-12
obj
.
put
(
"page"
,
"pages/race/raceHome"
);
obj
.
put
(
"width"
,
"1280"
);
obj
.
put
(
"check_path"
,
false
);
String
partnerId
=
cmptService
.
getPartnerId
(
cmptid
);
try
{
// 重新获取小程序access_token
...
...
src/main/java/com/dlbridge/jadp/plugins/common/CommonController.java
View file @
b536575d
...
...
@@ -3,6 +3,8 @@ package com.dlbridge.jadp.plugins.common;
import
cn.hutool.http.HttpUtil
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt
;
import
com.dlbridge.jadp.plugins.cmpt.service.CmptService
;
import
com.dlbridge.jadp.plugins.cmpt.utils.AliOssUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -12,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
com.neusoft.www.utils.web.Result
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.util.*
;
...
...
@@ -22,6 +25,9 @@ import java.util.*;
@Slf4j
public
class
CommonController
{
@Resource
private
CmptService
cmptService
;
// 定义允许上传的文件类型及其对应的魔数
private
static
final
Map
<
String
,
byte
[]>
ALLOWED_FILE_TYPES
=
new
HashMap
<>();
static
{
...
...
@@ -96,6 +102,29 @@ public class CommonController {
return
Result
.
fail
().
setMsg
(
"文件上传失败"
);
}
@PostMapping
(
"/uploadClaimer"
)
@ApiOperation
(
value
=
"参赛声明上传"
)
public
Result
<?>
uploadClaimer
(
@RequestPart
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"gCmptId"
)
Integer
gCmptId
)
{
try
{
String
originalFilename
=
file
.
getOriginalFilename
();
assert
originalFilename
!=
null
;
// 检查文件名中是否包含点号
int
lastIndex
=
originalFilename
.
lastIndexOf
(
"."
);
if
(
lastIndex
==
-
1
)
{
// 如果没有后缀名,直接返回报错信息
return
Result
.
fail
().
setMsg
(
"上传的文件没有后缀名,请检查文件"
);
}
String
objectName
=
"micro/"
+
gCmptId
+
"_cmptId/mianze.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
(
"文件上传失败"
);
}
/**
* 检查文件的魔数是否与扩展名匹配
* @param fileBytes 文件字节数组
...
...
src/main/webapp/WEB-INF/views/cmpt/disClaimer.jsp
0 → 100644
View file @
b536575d
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/cmpt/news.jsp
View file @
b536575d
...
...
@@ -454,7 +454,7 @@
<div
class=
"label-box"
style=
"margin-left: 40px;margin-top: 20px;margin-bottom: 20px;"
>
<select
id=
"openType"
>
<option
value=
"
0"
>
文本
</option>
<option
value=
"
8"
>
推文内容
</option>
<option
value=
"1"
>
h5
</option>
<option
value=
"2"
>
小程序
</option>
<option
value=
"3"
>
短链接
</option>
...
...
@@ -462,6 +462,7 @@
<option
value=
"5"
>
文档
</option>
<option
value=
"6"
>
图片
</option>
<option
value=
"7"
>
地图
</option>
<option
value=
"0"
>
文本
</option>
</select>
</div>
</div>
...
...
@@ -537,7 +538,6 @@
<label
for=
""
>
内容编辑
<span
style=
"color:#ce3939"
>
*
</span></label>
<div
id=
"container"
style=
"float: right"
></div>
</div>
<span
id=
"save"
class=
"save"
>
保存
</span>
</div>
</div>
...
...
src/main/webapp/WEB-INF/views/cmpt/outter-link.jsp
View file @
b536575d
...
...
@@ -220,7 +220,6 @@
<span>
添加外链项
</span>
</div>
</div>
<div
style=
"margin-top: -10px;margin-bottom: 50px"
>
<table
style=
"width: 100%"
class=
"rule-field"
>
<colgroup>
...
...
@@ -415,10 +414,10 @@
dialog
:
false
,
// 子类目 类型配置(1 网页 2 小程序(appId,path) 3 短链接(#小程序://) 4 页面(小程序) 5文档word,pdf 6 图片 png)
typeDesc
:
{
0
:
{
label
:
'文本'
,
placeholder
:
'请
输入文本
内容'
,
desc
:
'
富文本
内容'
,
8
:
{
label
:
'
推文
文本'
,
placeholder
:
'请
复制推文文本的
内容'
,
desc
:
'
请复制推文文本的
内容'
,
},
1
:
{
label
:
'网页'
,
...
...
@@ -454,7 +453,13 @@
label
:
'经纬度'
,
placeholder
:
'请输入经纬度,逗号隔开'
,
desc
:
'请输入文本内容'
,
}
},
0
:
{
label
:
'文本'
,
placeholder
:
'请输入文本内容'
,
desc
:
'富文本内容'
,
},
},
typeOptions
:
[
{
...
...
src/main/webapp/WEB-INF/views/cmpt/service.jsp
View file @
b536575d
...
...
@@ -410,7 +410,7 @@
placeholder=
"请输入小程序appId"
>
</div>
</div>
<div
class=
"func"
v-if=
"
service.type != 0
"
>
<div
class=
"func"
v-if=
"
![0,8].includes(service.type)
"
>
<span
class=
"title-new"
>
{{typeDesc[service.type].label}}
</span>
<div>
<input
class=
"input"
type=
"text"
v-model=
"service.path"
...
...
@@ -581,10 +581,11 @@
// 子类目 类型配置(1 网页 2 小程序(appId,path) 3 短链接(#小程序://) 4 页面(小程序) 5文档word,pdf 6 图片 png)
typeDesc
:
{
0
:
{
label
:
'文本'
,
placeholder
:
'请输入
富文本下
的内容'
,
8
:
{
label
:
'
推文
文本'
,
placeholder
:
'请输入
推文文本
的内容'
,
},
1
:
{
label
:
'网页'
,
placeholder
:
'请输入网页地址'
,
...
...
@@ -612,13 +613,18 @@
7
:
{
label
:
'地图'
,
placeholder
:
'请输入地址和经纬度'
,
}
},
0
:
{
label
:
'文本'
,
placeholder
:
'请输入富文本下的内容'
,
},
},
typeOptions
:
[
{
name
:
'文本'
,
value
:
0
,
name
:
'
推文
文本'
,
value
:
8
,
},
{
name
:
'H5'
,
value
:
1
,
...
...
@@ -646,6 +652,10 @@
{
name
:
'地图'
,
value
:
7
,
},
{
name
:
'文本'
,
value
:
0
,
}
],
statusType
:
{
...
...
@@ -935,7 +945,7 @@
layer
.
msg
(
'上传成功'
,
{
icon
:
1
,
time
:
1500
});
this
.
$forceUpdate
();
// 强制更新视图
}
else
{
layer
.
msg
(
res
.
msg
,
{
icon
:
2
});
layer
.
msg
(
res
.
msg
,
{
icon
:
2
});
}
},
beforeSend
:
()
=>
{
...
...
@@ -976,7 +986,7 @@
layer
.
msg
(
'上传成功'
,
{
icon
:
1
,
time
:
1500
});
this
.
$forceUpdate
();
// 强制更新视图
}
else
{
layer
.
msg
(
res
.
msg
,
{
icon
:
2
});
layer
.
msg
(
res
.
msg
,
{
icon
:
2
});
}
},
beforeSend
:
()
=>
{
...
...
src/main/webapp/WEB-INF/views/cmpt/sure-letter.jsp
View file @
b536575d
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/common/menu.jsp
View file @
b536575d
...
...
@@ -390,6 +390,13 @@
<span
class=
"menu-txt"
>
发枪预约
</span>
</a>
</li>
<li
class=
"disClaimer menu-sub-item"
>
<a
href=
"/gk/disClaimer/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"left-arrow"
></span>
<span
class=
"menu-txt"
>
免责声明
</span>
</a>
</li>
</ul>
</li>
</ul>
...
...
@@ -452,7 +459,7 @@
var
classes
=
[
'cmptSetting'
,
'nameList'
,
'manual'
,
'contact'
,
'manage'
,
'route'
,
'road'
,
'equip'
,
'photo'
,
'news'
,
'cert'
,
'data'
,
'banner'
,
'score'
,
'auto'
,
'scan'
,
'review'
,
'customer'
,
'rule'
,
'outter-link'
,
'sure-letter'
,
'rankSetting'
,
'service'
,
"module"
,
"swiper"
,
"bag"
,
"invoice"
,
"markNoSelect"
,
"feedback"
,
"markNoRule"
,
"gunRule"
];
'outter-link'
,
'sure-letter'
,
'rankSetting'
,
'service'
,
"module"
,
"swiper"
,
"bag"
,
"invoice"
,
"markNoSelect"
,
"feedback"
,
"markNoRule"
,
"gunRule"
,
"disClaimer"
];
let
url
=
document
.
location
.
href
;
var
done
=
false
;
for
(
var
i
in
classes
)
{
...
...
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