Compare commits
2 Commits
b8f7311e67
...
fd952b5462
Author | SHA1 | Date | |
---|---|---|---|
|
fd952b5462 | ||
|
1dab7230f3 |
@ -35,6 +35,6 @@ public class HitCompetitionAPI extends BaseController
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public AjaxResult getCompetition(HitCompetition competition){
|
public AjaxResult getCompetition(HitCompetition competition){
|
||||||
startPage();
|
startPage();
|
||||||
return success(competitionService.selectHitCompetitionList(competition));
|
return success(competitionService.selectHitCompetitionListByTime(competition));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,14 @@ public interface IHitCompetitionService extends IService<HitCompetition>
|
|||||||
*/
|
*/
|
||||||
public List<HitCompetition> selectHitCompetitionList(HitCompetition hitCompetition);
|
public List<HitCompetition> selectHitCompetitionList(HitCompetition hitCompetition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询大赛信息列表
|
||||||
|
*
|
||||||
|
* @param hitCompetition 大赛信息
|
||||||
|
* @return 大赛信息集合
|
||||||
|
*/
|
||||||
|
public List<HitCompetition> selectHitCompetitionListByTime(HitCompetition hitCompetition);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增大赛信息
|
* 新增大赛信息
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.cms.service.impl;
|
package com.ruoyi.cms.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.lang.Snowflake;
|
import cn.hutool.core.lang.Snowflake;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.cms.domain.HitCompetition;
|
import com.ruoyi.cms.domain.HitCompetition;
|
||||||
import com.ruoyi.cms.mapper.HitCompetitionMapper;
|
import com.ruoyi.cms.mapper.HitCompetitionMapper;
|
||||||
@ -9,6 +10,7 @@ import com.ruoyi.common.utils.DateUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -47,6 +49,17 @@ public class HitCompetitionServiceImpl extends ServiceImpl<HitCompetitionMapper,
|
|||||||
return baseMapper.selectHitCompetitionList(hitCompetition);
|
return baseMapper.selectHitCompetitionList(hitCompetition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询大赛信息列表
|
||||||
|
*
|
||||||
|
* @param hitCompetition 大赛信息
|
||||||
|
* @return 大赛信息集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<HitCompetition> selectHitCompetitionListByTime(HitCompetition hitCompetition){
|
||||||
|
return baseMapper.selectList(new QueryWrapper<HitCompetition>().gt("reg_end_time", new Date()));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增大赛信息
|
* 新增大赛信息
|
||||||
*
|
*
|
||||||
|
@ -161,6 +161,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="报名时间" prop="inRegDate">
|
<el-form-item label="报名时间" prop="inRegDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
@input="changeDate"
|
||||||
format="yyyy-MM-dd HH:mm"
|
format="yyyy-MM-dd HH:mm"
|
||||||
:picker-options="pickerOptions"
|
:picker-options="pickerOptions"
|
||||||
v-model="form.inRegDate"
|
v-model="form.inRegDate"
|
||||||
@ -172,6 +173,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="大赛时间" prop="inCpDate">
|
<el-form-item label="大赛时间" prop="inCpDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
@input="changeDate"
|
||||||
format="yyyy-MM-dd HH:mm"
|
format="yyyy-MM-dd HH:mm"
|
||||||
:picker-options="pickerOptions"
|
:picker-options="pickerOptions"
|
||||||
v-model="form.inCpDate"
|
v-model="form.inCpDate"
|
||||||
@ -335,6 +337,7 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改大赛信息";
|
this.title = "修改大赛信息";
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
@ -402,7 +405,7 @@ export default {
|
|||||||
},
|
},
|
||||||
judgeRegTime(){
|
judgeRegTime(){
|
||||||
if (this.form.regEndTime > this.form.cpBeginTime){
|
if (this.form.regEndTime > this.form.cpBeginTime){
|
||||||
this.$modal.msgError("新增失败,报名结束时间在大赛开始时间之前")
|
this.$modal.msgError((!this.form.id ? "新增" : "修改") + "失败,报名结束时间在大赛开始时间之前")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
@ -421,7 +424,11 @@ export default {
|
|||||||
let s = date.getSeconds();
|
let s = date.getSeconds();
|
||||||
s = s < 10 ? "0" + s : s;
|
s = s < 10 ? "0" + s : s;
|
||||||
return y + "-" + MM + "-" + d + " " + h + ":" + m;
|
return y + "-" + MM + "-" + d + " " + h + ":" + m;
|
||||||
}
|
},
|
||||||
|
changeDate() {
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -61,7 +61,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
tabClick(url,id){
|
tabClick(url,id){
|
||||||
console.log(url,id)
|
if (url === 'home') url = "gw";
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: url,
|
name: url,
|
||||||
query:{ id: id }
|
query:{ id: id }
|
||||||
|
Loading…
Reference in New Issue
Block a user