记得上下班打卡 | git大法好,push需谨慎

Commit e58516fd authored by wangyifan's avatar wangyifan

艺人检索功能

parent 51f1f38b
......@@ -10,6 +10,10 @@
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>艺人ID:</label>
<input type="text" name="artistId" placeholder="请输入艺人ID"/>
</li>
<li>
<label>艺人名称:</label>
<input type="text" name="artistName" placeholder="请输入艺人名称"/>
......@@ -24,6 +28,12 @@
<option value="4">品牌方</option>
</select>
</li>
<li class="select-time">
<label>入驻时间:</label>
<input type="text" class="time-input" id="beginDate" name="beginDate" placeholder="开始日期"/>
<span>-</span>
<input type="text" class="time-input" id="endDate" name="endDate" placeholder="结束日期"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
......@@ -123,6 +133,31 @@
};
$.table.init(options);
// 初始化日期选择器
layui.use('laydate', function(){
var laydate = layui.laydate;
// 开始日期
laydate.render({
elem: '#beginDate',
format: 'yyyy-MM-dd',
type: 'date',
done: function(value, date){
// 可以在这里添加日期选择后的逻辑
}
});
// 结束日期
laydate.render({
elem: '#endDate',
format: 'yyyy-MM-dd',
type: 'date',
done: function(value, date){
// 可以在这里添加日期选择后的逻辑
}
});
});
});
// 单条删除
......
......@@ -146,39 +146,11 @@
color: #999;
font-style: italic;
}
.action-buttons {
display: flex;
justify-content: center;
gap: 15px;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #e9ecef;
}
.btn-custom {
min-width: 100px;
}
.btn-back {
background-color: #6c757d;
border-color: #6c757d;
color: white;
}
.btn-back:hover {
background-color: #5a6268;
border-color: #545b62;
color: white;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox">
<div class="ibox-title">
<h5>艺人详情</h5>
</div>
<div class="ibox-content" th:object="${ArtistVo}">
<div class="artist-detail-container">
<!-- 基本信息 -->
......@@ -311,13 +283,6 @@
暂无关联商品信息
</div>
</div>
<!-- 操作按钮 -->
<div class="action-buttons">
<button type="button" class="btn btn-custom btn-back" onclick="$.modal.close()">
<i class="fa fa-arrow-left"></i> 返回
</button>
</div>
</div>
</div>
</div>
......
......@@ -23,12 +23,21 @@
FROM kylin_artist a
<where>
a.status = 1
<if test="artistId != null and artistId != ''">
AND a.artist_id = #{artistId}
</if>
<if test="artistName != null and artistName != ''">
AND a.artist_name LIKE CONCAT('%', #{artistName}, '%')
</if>
<if test="artistType != null and artistType != ''">
AND a.artist_type = #{artistType}
</if>
<if test="beginDate != null and beginDate != ''">
AND DATE(a.created_at) &gt;= #{beginDate}
</if>
<if test="endDate != null and endDate != ''">
AND DATE(a.created_at) &lt;= #{endDate}
</if>
</where>
ORDER BY a.sort DESC, a.mid DESC
</select>
......
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