mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 19:51:56 +08:00
赛会选择球队
This commit is contained in:
@@ -3,6 +3,8 @@ package com.ruoyi.system.controller;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.system.domain.vo.CompetitionOfTeamVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -40,10 +42,10 @@ public class CompetitionOfTeamController extends BaseController
|
||||
*/
|
||||
@RequiresPermissions("system:competitionOfTeam:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CompetitionOfTeam competitionOfTeam)
|
||||
public TableDataInfo list(CompetitionOfTeamVo competitionOfTeam)
|
||||
{
|
||||
startPage();
|
||||
List<CompetitionOfTeam> list = competitionOfTeamService.selectCompetitionOfTeamList(competitionOfTeam);
|
||||
List<CompetitionOfTeamVo> list = competitionOfTeamService.selectCompetitionOfTeamList(competitionOfTeam);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -91,7 +93,13 @@ public class CompetitionOfTeamController extends BaseController
|
||||
{
|
||||
return toAjax(competitionOfTeamService.updateCompetitionOfTeam(competitionOfTeam));
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:competitionOfTeam:batchEditById")
|
||||
@Log(title = "赛会中-参赛队伍", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult batchEditById(@RequestBody List<CompetitionOfTeam> list)
|
||||
{
|
||||
return toAjax(competitionOfTeamService.batchUpdateCompetitionOfTeam(list));
|
||||
}
|
||||
/**
|
||||
* 删除赛会中-参赛队伍
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import com.ruoyi.system.domain.CompetitionOfTeam;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 吴一博
|
||||
* @date 2022年11月11日 11:12
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class CompetitionOfTeamVo extends CompetitionOfTeam {
|
||||
/** 球队logo */
|
||||
private String teamLogo;
|
||||
private String defaultPicture;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.CompetitionOfTeam;
|
||||
import com.ruoyi.system.domain.vo.CompetitionOfTeamVo;
|
||||
|
||||
/**
|
||||
* 赛会中-参赛队伍Mapper接口
|
||||
@@ -25,7 +26,7 @@ public interface CompetitionOfTeamMapper
|
||||
* @param competitionOfTeam 赛会中-参赛队伍
|
||||
* @return 赛会中-参赛队伍集合
|
||||
*/
|
||||
public List<CompetitionOfTeam> selectCompetitionOfTeamList(CompetitionOfTeam competitionOfTeam);
|
||||
public List<CompetitionOfTeamVo> selectCompetitionOfTeamList(CompetitionOfTeam competitionOfTeam);
|
||||
|
||||
/**
|
||||
* 新增赛会中-参赛队伍
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.CompetitionOfTeam;
|
||||
import com.ruoyi.system.domain.vo.CompetitionOfTeamVo;
|
||||
|
||||
/**
|
||||
* 赛会中-参赛队伍Service接口
|
||||
@@ -25,7 +26,7 @@ public interface ICompetitionOfTeamService
|
||||
* @param competitionOfTeam 赛会中-参赛队伍
|
||||
* @return 赛会中-参赛队伍集合
|
||||
*/
|
||||
public List<CompetitionOfTeam> selectCompetitionOfTeamList(CompetitionOfTeam competitionOfTeam);
|
||||
public List<CompetitionOfTeamVo> selectCompetitionOfTeamList(CompetitionOfTeam competitionOfTeam);
|
||||
|
||||
/**
|
||||
* 新增赛会中-参赛队伍
|
||||
@@ -42,6 +43,13 @@ public interface ICompetitionOfTeamService
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCompetitionOfTeam(CompetitionOfTeam competitionOfTeam);
|
||||
/**
|
||||
* 修改赛会中-参赛队伍
|
||||
*
|
||||
* @param list 赛会中-参赛队伍
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchUpdateCompetitionOfTeam(List<CompetitionOfTeam> list);
|
||||
|
||||
/**
|
||||
* 批量删除赛会中-参赛队伍
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.system.domain.vo.CompetitionOfTeamVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.CompetitionOfTeamMapper;
|
||||
@@ -38,7 +40,7 @@ public class CompetitionOfTeamServiceImpl implements ICompetitionOfTeamService
|
||||
* @return 赛会中-参赛队伍
|
||||
*/
|
||||
@Override
|
||||
public List<CompetitionOfTeam> selectCompetitionOfTeamList(CompetitionOfTeam competitionOfTeam)
|
||||
public List<CompetitionOfTeamVo> selectCompetitionOfTeamList(CompetitionOfTeam competitionOfTeam)
|
||||
{
|
||||
return competitionOfTeamMapper.selectCompetitionOfTeamList(competitionOfTeam);
|
||||
}
|
||||
@@ -67,6 +69,15 @@ public class CompetitionOfTeamServiceImpl implements ICompetitionOfTeamService
|
||||
return competitionOfTeamMapper.updateCompetitionOfTeam(competitionOfTeam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchUpdateCompetitionOfTeam(List<CompetitionOfTeam> list) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
CompetitionOfTeam team = list.get(i);
|
||||
competitionOfTeamMapper.updateCompetitionOfTeam(team);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除赛会中-参赛队伍
|
||||
*
|
||||
|
||||
@@ -26,32 +26,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<sql id="selectCompetitionOfTeamVo">
|
||||
select id, competition_id, team_id, team_name, competition_group, created_time, status, last_updated_time, created_by, modified_by, is_deleted, remark, contacts, contacts_tel, contacts_area_code, serial_number from competition_of_team
|
||||
</sql>
|
||||
|
||||
<select id="selectCompetitionOfTeamList" parameterType="CompetitionOfTeam" resultMap="CompetitionOfTeamResult">
|
||||
<include refid="selectCompetitionOfTeamVo"/>
|
||||
<where>
|
||||
<if test="competitionId != null "> and competition_id = #{competitionId}</if>
|
||||
<if test="teamId != null "> and team_id = #{teamId}</if>
|
||||
<if test="teamName != null and teamName != ''"> and team_name like concat('%', #{teamName}, '%')</if>
|
||||
<if test="competitionGroup != null and competitionGroup != ''"> and competition_group = #{competitionGroup}</if>
|
||||
<if test="createdTime != null "> and created_time = #{createdTime}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="lastUpdatedTime != null "> and last_updated_time = #{lastUpdatedTime}</if>
|
||||
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
|
||||
<if test="modifiedBy != null and modifiedBy != ''"> and modified_by = #{modifiedBy}</if>
|
||||
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
|
||||
<if test="contacts != null and contacts != ''"> and contacts = #{contacts}</if>
|
||||
<if test="contactsTel != null and contactsTel != ''"> and contacts_tel = #{contactsTel}</if>
|
||||
<if test="contactsAreaCode != null and contactsAreaCode != ''"> and contacts_area_code = #{contactsAreaCode}</if>
|
||||
<if test="serialNumber != null "> and serial_number = #{serialNumber}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCompetitionOfTeamById" parameterType="Long" resultMap="CompetitionOfTeamResult">
|
||||
<include refid="selectCompetitionOfTeamVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectCompetitionOfTeamList" resultType="com.ruoyi.system.domain.vo.CompetitionOfTeamVo">
|
||||
select t.*,team.* from competition_of_team t left join basketball_team team on team.id = t.team_id
|
||||
<where>
|
||||
<if test="competitionId != null "> and t.competition_id = #{competitionId}</if>
|
||||
<if test="teamId != null "> and t.team_id = #{teamId}</if>
|
||||
<if test="teamName != null and teamName != ''"> and t.team_name like concat('%', #{teamName}, '%')</if>
|
||||
<if test="competitionGroup != null and competitionGroup != ''"> and t.competition_group = #{competitionGroup}</if>
|
||||
<if test="createdTime != null "> and t.created_time = #{createdTime}</if>
|
||||
<if test="status != null "> and t.status = #{status}</if>
|
||||
<if test="lastUpdatedTime != null "> and t.last_updated_time = #{lastUpdatedTime}</if>
|
||||
<if test="createdBy != null and createdBy != ''"> and t.created_by = #{createdBy}</if>
|
||||
<if test="modifiedBy != null and modifiedBy != ''"> and t.modified_by = #{modifiedBy}</if>
|
||||
<if test="isDeleted != null "> and t.is_deleted = #{isDeleted}</if>
|
||||
<if test="contacts != null and contacts != ''"> and t.contacts = #{contacts}</if>
|
||||
<if test="contactsTel != null and contactsTel != ''"> and t.contacts_tel = #{contactsTel}</if>
|
||||
<if test="contactsAreaCode != null and contactsAreaCode != ''"> and t.contacts_area_code = #{contactsAreaCode}</if>
|
||||
<if test="serialNumber != null "> and t.serial_number = #{serialNumber}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertCompetitionOfTeam" parameterType="CompetitionOfTeam" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into competition_of_team
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
Reference in New Issue
Block a user