This commit is contained in:
zhaohengkun 2024-10-10 11:31:36 +08:00
commit 174abc172c
3 changed files with 22 additions and 2 deletions

View File

@ -1222,7 +1222,7 @@ export default {
.app-container {
width: 100%;
height: 100vh;
//height: 100vh;
background: #f6f8f9;
margin: 0;
padding: 0;

View File

@ -1251,8 +1251,21 @@ export default {
noUseTimeType: [
{required: true, message: "请选择不适用时间段", trigger: "blur"},
],
// suitTimeSlotFront: [
// {required: true, message: "", trigger: "blur"},
// ],
//
suitTimeSlotFront: [
{required: true, message: "请选择适用时间段", trigger: "blur"},
{
validator: (rule, value, callback) => {
if (!this.form2.suitTimeSlotFront || !this.form2.suitTimeSlotAfter) {
callback(new Error("请选择完整的适用时间段"));
} else {
callback();
}
},
trigger: "blur"
}
],
noUseDate: [
{required: true, message: "请选择不适用时间段", trigger: "blur"},

View File

@ -233,6 +233,13 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
return null;
}
/**
* 判断当前时间是否在活动时间范围内
* @param activeStartTime
* @param activeEndTime
* @param now
* @return
*/
private boolean isTimeBetween(Date activeStartTime, Date activeEndTime, DateTime now) {
if (now.isAfterOrEquals(activeStartTime) && now.isBeforeOrEquals(activeEndTime)) {
return true;