Commit e565b772 authored by daniel's avatar daniel

feat(cmpt): 处理赛事是否在列表显示的功能

parent 8e6a6980
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
is_month_rank isMonthRank, is_month_rank isMonthRank,
cmpt_status cmptStatus, cmpt_status cmptStatus,
audit_status auditStatus, audit_status auditStatus,
is_year_rank isYearRank is_year_rank isYearRank,
show_in_list showInList
FROM `gk_cmpt` FROM `gk_cmpt`
WHERE cmpt_id = #{id} LIMIT 1 WHERE cmpt_id = #{id} LIMIT 1
</select> </select>
...@@ -51,7 +52,8 @@ ...@@ -51,7 +52,8 @@
create_date, create_date,
update_by, update_by,
update_date, update_date,
del_flag del_flag,
show_in_list
) VALUES ( ) VALUES (
#{cmptId}, #{cmptId},
#{cmptName}, #{cmptName},
...@@ -65,7 +67,8 @@ ...@@ -65,7 +67,8 @@
#{createDate}, #{createDate},
#{updateBy}, #{updateBy},
#{updateDate}, #{updateDate},
#{delFlag} #{delFlag},
#{showInList}
) )
</insert> </insert>
...@@ -78,7 +81,8 @@ ...@@ -78,7 +81,8 @@
create_date = #{createDate}, create_date = #{createDate},
update_by = #{updateBy}, update_by = #{updateBy},
update_date = #{updateDate}, update_date = #{updateDate},
del_flag = #{delFlag} del_flag = #{delFlag},
show_in_list = #{showInList}
WHERE cmpt_id = #{cmptId} WHERE cmpt_id = #{cmptId}
</update> </update>
...@@ -151,7 +155,7 @@ ...@@ -151,7 +155,7 @@
left join common.neuuser nu on nu.neuUserId = b.committeeNeuUserId left join common.neuuser nu on nu.neuUserId = b.committeeNeuUserId
left join raceenroll.competition c on b.gcmptid =c.cmptid left join raceenroll.competition c on b.gcmptid =c.cmptid
LEFT JOIN raceenroll.registerinfo cbf ON cbf.userId = nu.gUserId LEFT JOIN raceenroll.registerinfo cbf ON cbf.userId = nu.gUserId
where a.del_flag=0 where a.del_flag=0 AND a.show_in_list = 1
<include refid="cmpt-where-sql"/> <include refid="cmpt-where-sql"/>
</select> </select>
...@@ -181,7 +185,7 @@ ...@@ -181,7 +185,7 @@
left join common.neuuser nu on nu.neuUserId = b.committeeNeuUserId left join common.neuuser nu on nu.neuUserId = b.committeeNeuUserId
left join raceenroll.competition c on b.gcmptid =c.cmptid left join raceenroll.competition c on b.gcmptid =c.cmptid
LEFT JOIN raceenroll.registerinfo cbf ON cbf.userId = nu.gUserId LEFT JOIN raceenroll.registerinfo cbf ON cbf.userId = nu.gUserId
where a.del_flag=0 where a.del_flag=0 AND a.show_in_list = 1
<include refid="cmpt-where-sql"/> <include refid="cmpt-where-sql"/>
order by c.startTime desc order by c.startTime desc
limit #{page.offset},#{page.size} limit #{page.offset},#{page.size}
...@@ -296,6 +300,9 @@ ...@@ -296,6 +300,9 @@
<if test="isShowTab != null"> <if test="isShowTab != null">
is_show_tab=#{isShowTab}, is_show_tab=#{isShowTab},
</if> </if>
<if test="showInList != null">
show_in_list=#{showInList},
</if>
<if test="cmptName != null"> <if test="cmptName != null">
a.cmpt_name = #{cmptName}, a.cmpt_name = #{cmptName},
c.cmptName = #{cmptName}, c.cmptName = #{cmptName},
......
...@@ -80,4 +80,7 @@ public class Cmpt extends JaapRecord<Cmpt> { ...@@ -80,4 +80,7 @@ public class Cmpt extends JaapRecord<Cmpt> {
@ApiModelProperty(value = "是否显示底部tab页(1:显示,0:不显示)", notes = "是否显示底部tab页(1:显示,0:不显示)") @ApiModelProperty(value = "是否显示底部tab页(1:显示,0:不显示)", notes = "是否显示底部tab页(1:显示,0:不显示)")
private String isShowTab; private String isShowTab;
@ApiModelProperty(value = "是否显示在列表中(1:显示,0:不显示)", notes = "是否显示在列表中(1:显示,0:不显示)")
private int showInList;
} }
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<div> <div>
<span class="road-notice"></span> <span class="road-notice"></span>
<span <span
style="font-size: 16px;color: #ce3939;margin-left: 5px;font-weight: normal;">最多可放5个广告,至少要有1个广告才能启用此功能;可通过拖拽<img style="font-size: 16px;color: #ce3939;margin-left: 5px;font-weight: normal;">至少要有1个广告才能启用此功能;可通过拖拽<img
style="width: 17px; margin: 0px 5px;" src="/static/images/drag.png" style="width: 17px; margin: 0px 5px;" src="/static/images/drag.png"
alt="">进行排序</span> alt="">进行排序</span>
</div> </div>
......
...@@ -337,13 +337,29 @@ ...@@ -337,13 +337,29 @@
value="${cmpt.isShowTab ? 1 : 0}" /> value="${cmpt.isShowTab ? 1 : 0}" />
</div> </div>
</div> </div>
<div class="card-header d-flex align-items-center"> <div class="card-header d-flex align-items-center"
style="padding:0.5rem 3rem">
<h2 class="h3">短链接:</h2> <h2 class="h3">短链接:</h2>
<h3 id="shortLink"></h3> <h3 id="shortLink"></h3>
</div> </div>
<div class="card-header d-flex align-items-center"> <div class="card-header d-flex align-items-center"
style="padding:0.5rem 3rem">
适用于短信、邮件、网页、微信内等拉起小程序的业务场景 适用于短信、邮件、网页、微信内等拉起小程序的业务场景
</div> </div>
<div class="card-header d-flex align-items-center"
style="padding:0.5rem 3rem">
<h2 class="h3">是否在赛事列表中显示</h2>
<div style="margin-left: 20px;">
<label class="switch">
<input type="checkbox" id="showInList"
${cmpt.showInList==1 ? 'checked'
: '' }>
<span class="slider round"></span>
</label>
<input type="hidden" id="isShowInList"
value="${cmpt.showInList}" />
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
</n-upload> </n-upload>
</div> </div>
</n-card> </n-card>
<n-card title="选号底图"> <n-card title="选号底图(请先新增组别,才能上传)">
<n-alert title="未上传" v-if="!certExit" type="warning"> <n-alert title="未上传" v-if="!certExit" type="warning">
</n-alert> </n-alert>
<n-image <n-image
......
...@@ -2,11 +2,6 @@ ...@@ -2,11 +2,6 @@
const uploadUrl = '/api-common/v1/upload?folder=' + 'gk/banner' + '&cmptId=' + getCId() const uploadUrl = '/api-common/v1/upload?folder=' + 'gk/banner' + '&cmptId=' + getCId()
$(document).ready(function () { $(document).ready(function () {
$('.addTempalte').click(function () { $('.addTempalte').click(function () {
var length = $('#sortable .banner-item').length;
if (length >= 5) {
layer.msg('图片最多只能上传五张')
return;
}
$('.template .pic').trigger('click'); $('.template .pic').trigger('click');
}); });
......
...@@ -25,6 +25,11 @@ $(function () { ...@@ -25,6 +25,11 @@ $(function () {
// 根据 checkbox 状态更新隐藏 input 的值 // 根据 checkbox 状态更新隐藏 input 的值
$('#isShowInput').val(this.checked ? 1 : 0); $('#isShowInput').val(this.checked ? 1 : 0);
}); });
// by ggb 2026-04-08 是否显示 底部的tab
$('#showInList').change(function () {
// 根据 checkbox 状态更新隐藏 input 的值
$('#isShowInList').val(this.checked ? 1 : 0);
});
$('.savebtn').click(function () { $('.savebtn').click(function () {
...@@ -32,6 +37,7 @@ $(function () { ...@@ -32,6 +37,7 @@ $(function () {
let logo = $('#hdcmptLogo').val(); let logo = $('#hdcmptLogo').val();
let detailStyle = $('#detailStyle').val()?.trim(); let detailStyle = $('#detailStyle').val()?.trim();
let isShowTab = $('#isShowInput').val(); let isShowTab = $('#isShowInput').val();
let showInList = $('#isShowInList').val();
let cmptId = getCId(); let cmptId = getCId();
if (bg.length != 6) { if (bg.length != 6) {
layer.msg('请输入6位合法字符!'); layer.msg('请输入6位合法字符!');
...@@ -42,7 +48,8 @@ $(function () { ...@@ -42,7 +48,8 @@ $(function () {
cmptId, cmptId,
logo, logo,
cmptbgColor: "#" + bg, cmptbgColor: "#" + bg,
isShowTab isShowTab,
showInList
}; };
$.ajax({ $.ajax({
url: '/gk/cmpt/saveCmpt', url: '/gk/cmpt/saveCmpt',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment