mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 19:51:56 +08:00
赛会选择球队1
This commit is contained in:
@@ -5,6 +5,7 @@ import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.system.domain.vo.CompetitionOfTeamVo;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -94,12 +95,28 @@ public class CompetitionOfTeamController extends BaseController
|
||||
return toAjax(competitionOfTeamService.updateCompetitionOfTeam(competitionOfTeam));
|
||||
}
|
||||
@RequiresPermissions("system:competitionOfTeam:batchEditById")
|
||||
@Log(title = "赛会中-参赛队伍", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "赛会中-参赛队伍批量修改", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/batchEditById")
|
||||
public AjaxResult batchEditById(@RequestBody List<CompetitionOfTeam> list)
|
||||
{
|
||||
return toAjax(competitionOfTeamService.batchUpdateCompetitionOfTeam(list));
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:competitionOfTeam:removeTeamGroup")
|
||||
@Log(title = "赛会中-参赛队伍移除分组", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/removeTeamGroup/{ids}")
|
||||
public AjaxResult removeTeamGroup(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(competitionOfTeamService.removeTeamGroup(ids));
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:competitionOfTeam:intoTeamGroup")
|
||||
@Log(title = "赛会中-参赛队伍移入分组", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/intoTeamGroup/{competitionGroup}")
|
||||
public AjaxResult intoTeamGroup(@PathVariable String competitionGroup,@RequestBody List<Long> ids)
|
||||
{
|
||||
return toAjax(competitionOfTeamService.intoTeamGroup(competitionGroup,ids));
|
||||
}
|
||||
/**
|
||||
* 删除赛会中-参赛队伍
|
||||
*/
|
||||
|
||||
@@ -59,4 +59,8 @@ public interface CompetitionOfTeamMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompetitionOfTeamByIds(Long[] ids);
|
||||
|
||||
int removeTeamGroup(Long[] ids);
|
||||
|
||||
int intoTeamGroup(String competitionGroup, List<Long> ids);
|
||||
}
|
||||
|
||||
@@ -66,4 +66,8 @@ public interface ICompetitionOfTeamService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompetitionOfTeamById(Long id);
|
||||
|
||||
int removeTeamGroup(Long[] ids);
|
||||
|
||||
int intoTeamGroup(String competitionGroup,List<Long> ids);
|
||||
}
|
||||
|
||||
@@ -101,4 +101,14 @@ public class CompetitionOfTeamServiceImpl implements ICompetitionOfTeamService
|
||||
{
|
||||
return competitionOfTeamMapper.deleteCompetitionOfTeamById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int removeTeamGroup(Long[] ids) {
|
||||
return competitionOfTeamMapper.removeTeamGroup(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intoTeamGroup(String competitionGroup, List<Long> ids) {
|
||||
return competitionOfTeamMapper.intoTeamGroup(competitionGroup,ids);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,6 +109,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="removeTeamGroup">
|
||||
update competition_of_team set competition_group = null where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="intoTeamGroup">
|
||||
update competition_of_team set competition_group = #{competitionGroup} where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteCompetitionOfTeamById" parameterType="Long">
|
||||
delete from competition_of_team where id = #{id}
|
||||
|
||||
Reference in New Issue
Block a user