更新10.14

This commit is contained in:
许允枞 2024-10-14 16:38:31 +08:00
parent b8d21aff62
commit ad9b4b1846
5 changed files with 47 additions and 2 deletions

View File

@ -108,6 +108,16 @@ public class HitCompetitionStudentInfoController extends BaseController {
{
return toAjax(hitCompetitionStudentInfoService.updateHitCompetitionStudentInfo(hitCompetitionStudentInfo));
}
/**
* 修改大赛学生编辑
*/
@Log(title = "大赛学生", businessType = BusinessType.UPDATE)
@PutMapping("editInfo")
public AjaxResult editInfo(@RequestBody HitCompetitionStudentInfo hitCompetitionStudentInfo)
{
return toAjax(hitCompetitionStudentInfoService.updateHitCompetitionStudentInfoUpdate(hitCompetitionStudentInfo));
}
/**
* 删除大赛学生

View File

@ -55,6 +55,13 @@ public interface IHitCompetitionStudentInfoService extends IService<HitCompetiti
* @return 结果
*/
public int updateHitCompetitionStudentInfo(HitCompetitionStudentInfo hitCompetitionStudentInfo);
/**
* 修改大赛学生
*
* @param hitCompetitionStudentInfo 大赛学生
* @return 结果
*/
public int updateHitCompetitionStudentInfoUpdate(HitCompetitionStudentInfo hitCompetitionStudentInfo);
/**
* 批量删除大赛学生

View File

@ -172,6 +172,25 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
return hitCompetitionStudentInfoMapper.updateHitCompetitionStudentInfo(hitCompetitionStudentInfo);
}
/**
* 修改大赛学生
*
* @param hitCompetitionStudentInfo 大赛学生
* @return 结果
*/
@Override
public int updateHitCompetitionStudentInfoUpdate(HitCompetitionStudentInfo hitCompetitionStudentInfo) {
LambdaQueryWrapper<HitCompetitionStudentInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(HitCompetitionStudentInfo::getSchoolName, hitCompetitionStudentInfo.getSchoolName());
queryWrapper.eq(HitCompetitionStudentInfo::getIsPreliminary,true);
DateTime now = DateUtil.date();
DateTime dateTime = DateUtil.beginOfYear(now);
DateTime dateTime1 = DateUtil.endOfYear(now);
queryWrapper.between(HitCompetitionStudentInfo::getCreateTime, dateTime, dateTime1);
hitCompetitionStudentInfo.setUpdateTime(DateUtils.getNowDate());
return hitCompetitionStudentInfoMapper.updateHitCompetitionStudentInfo(hitCompetitionStudentInfo);
}
/**
* 批量删除大赛学生
*

View File

@ -41,6 +41,15 @@ export function updateInfo(data) {
})
}
// 修改大赛学生
export function editInfo(data) {
return request({
url: '/system/hit_stu_info/editInfo',
method: 'put',
data: data
})
}
// 删除大赛学生
export function delInfo(id) {
return request({

View File

@ -193,7 +193,7 @@
</template>
<script>
import {listInfo, getInfo, delInfo, addInfo, updateInfo, updateTime, byId} from "@/api/hit/stuInfo";
import {listInfo, getInfo, delInfo, addInfo, updateInfo, updateTime, byId, editInfo} from "@/api/hit/stuInfo";
import { getToken } from "@/utils/auth";
export default {
name: "Info",
@ -396,7 +396,7 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateInfo(this.form).then(response => {
editInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();