diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionController.java new file mode 100644 index 00000000..7b44b859 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionController.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.Competition; +import com.ruoyi.system.service.ICompetitionService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 比赛信息Controller + * + * @author ruoyi + * @date 2022-11-02 + */ +@RestController +@RequestMapping("/competition") +public class CompetitionController extends BaseController +{ + @Autowired + private ICompetitionService competitionService; + + /** + * 查询比赛信息列表 + */ + @RequiresPermissions("system:competition:list") + @GetMapping("/list") + public TableDataInfo list(Competition competition) + { + startPage(); + List list = competitionService.selectCompetitionList(competition); + return getDataTable(list); + } + + /** + * 导出比赛信息列表 + */ + @RequiresPermissions("system:competition:export") + @Log(title = "比赛信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Competition competition) + { + List list = competitionService.selectCompetitionList(competition); + ExcelUtil util = new ExcelUtil(Competition.class); + util.exportExcel(response, list, "比赛信息数据"); + } + + /** + * 获取比赛信息详细信息 + */ + @RequiresPermissions("system:competition:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(competitionService.selectCompetitionById(id)); + } + + /** + * 新增比赛信息 + */ + @RequiresPermissions("system:competition:add") + @Log(title = "比赛信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Competition competition) + { + return toAjax(competitionService.insertCompetition(competition)); + } + + /** + * 修改比赛信息 + */ + @RequiresPermissions("system:competition:edit") + @Log(title = "比赛信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Competition competition) + { + return toAjax(competitionService.updateCompetition(competition)); + } + + /** + * 删除比赛信息 + */ + @RequiresPermissions("system:competition:remove") + @Log(title = "比赛信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(competitionService.deleteCompetitionByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionVsController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionVsController.java new file mode 100644 index 00000000..11c0730f --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CompetitionVsController.java @@ -0,0 +1,100 @@ +package com.ruoyi.system.controller; + +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.web.page.TableDataInfo; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.system.domain.Competition; +import com.ruoyi.system.service.ICompetitionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * @author 吴一博 + * @date 2022年11月02日 15:43 + * @Description + */ +/** + * 约战Controller + * @date 2022-11-02 + */ +@RestController +@RequestMapping("/vs") +public class CompetitionVsController extends BaseController { + @Autowired + private ICompetitionService competitionService; + + /** + * 查询约战列表 + */ + @RequiresPermissions("system:vs:list") + @GetMapping("/list") + public TableDataInfo list(Competition competition) + { + startPage(); + List list = competitionService.selectCompetitionList(competition); + return getDataTable(list); + } + + /** + * 导出约战列表 + */ + @RequiresPermissions("system:vs:export") + @Log(title = "约战", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Competition competition) + { + List list = competitionService.selectCompetitionList(competition); + ExcelUtil util = new ExcelUtil(Competition.class); + util.exportExcel(response, list, "约战数据"); + } + + /** + * 获取约战详细信息 + */ + @RequiresPermissions("system:vs:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(competitionService.selectCompetitionById(id)); + } + + /** + * 新增约战 + */ + @RequiresPermissions("system:vs:add") + @Log(title = "约战", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Competition competition) + { + return toAjax(competitionService.insertCompetition(competition)); + } + + /** + * 修改约战 + */ + @RequiresPermissions("system:vs:edit") + @Log(title = "约战", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Competition competition) + { + return toAjax(competitionService.updateCompetition(competition)); + } + + /** + * 删除约战 + */ + @RequiresPermissions("system:vs:remove") + @Log(title = "约战", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(competitionService.deleteCompetitionByIds(ids)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Competition.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Competition.java new file mode 100644 index 00000000..21eea9d8 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Competition.java @@ -0,0 +1,593 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 比赛信息对象 competition + * + * @author ruoyi + * @date 2022-11-02 + */ +public class Competition extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private Long id; + + /** 主队ID */ + @Excel(name = "主队ID") + private Long mainTeamId; + + /** 主队名 */ + @Excel(name = "主队名") + private String mainTeamName; + + /** 客队ID */ + @Excel(name = "客队ID") + private Long guestTeamId; + + /** 客队名 */ + @Excel(name = "客队名") + private String guestTeamName; + + /** 赛事编号 */ + @Excel(name = "赛事编号") + private String competitionCode; + + /** 比赛名称 */ + @Excel(name = "比赛名称") + private String competitionName; + + /** 是否指定对手 */ + @Excel(name = "是否指定对手") + private Integer designated; + + /** 比赛类型,1,2,3,4,5,6 */ + @Excel(name = "比赛类型,1,2,3,4,5,6") + private Long competitionType; + + /** 比赛时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "比赛时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date competitionTime; + + /** 球场ID */ + @Excel(name = "球场ID") + private Long buildingId; + + /** 球场名称 */ + @Excel(name = "球场名称") + private String buildingName; + + /** 比赛地址 */ + @Excel(name = "比赛地址") + private String competitionAddress; + + /** 发起人ID */ + @Excel(name = "发起人ID") + private Long founder; + + /** 比赛状态 */ + @Excel(name = "比赛状态") + private Integer status; + + /** 城市编码 */ + @Excel(name = "城市编码") + private String cityCode; + + /** 城市名称 */ + @Excel(name = "城市名称") + private String cityName; + + /** 最大参与人数 */ + @Excel(name = "最大参与人数") + private Long maxPlayer; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdTime; + + /** 最后修改时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后修改时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastUpdatedTime; + + /** 创建人 */ + @Excel(name = "创建人") + private String createdBy; + + /** 最后修改人 */ + @Excel(name = "最后修改人") + private String modifiedBy; + + /** 是否删除 */ + @Excel(name = "是否删除") + private Long isDeleted; + + /** 经度 */ + @Excel(name = "经度") + private Long longitude; + + /** 纬度 */ + @Excel(name = "纬度") + private Long latitude; + + /** 比赛性质(0=约战;1=赛事) */ + @Excel(name = "比赛性质", readConverterExp = "0==约战;1=赛事") + private Integer competitionNature; + + /** 报名开始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "报名开始时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date enrollBeginTime; + + /** 报名结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "报名结束时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date enrollEndTime; + + /** 赛事联系人 */ + @Excel(name = "赛事联系人") + private String contacts; + + /** 赛事联系人电话区号 */ + @Excel(name = "赛事联系人电话区号") + private String contactsAreaCode; + + /** 赛事联系人电话 */ + @Excel(name = "赛事联系人电话") + private String contactsTel; + + /** 比赛开始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "比赛开始时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date competitionBeginTime; + + /** 比赛结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "比赛结束时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date competitionEndTime; + + /** 主办方 */ + @Excel(name = "主办方") + private String organizer; + + /** 承办方 */ + @Excel(name = "承办方") + private String undertake; + + /** 赛会背景图 */ + @Excel(name = "赛会背景图") + private String competitionBackImg; + + /** 创建人userId */ + @Excel(name = "创建人userId") + private Long createdId; + + /** 审核状态0=待审核;1=已审核;-1=审核不过 */ + @Excel(name = "审核状态0=待审核;1=已审核;-1=审核不过") + private Long auditStatus; + + /** 身高隐藏 0不隐藏 1=隐藏 */ + @Excel(name = "身高隐藏 0不隐藏 1=隐藏") + private Integer heightHide; + + /** 赞助商 */ + @Excel(name = "赞助商") + private String sponsor; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setMainTeamId(Long mainTeamId) + { + this.mainTeamId = mainTeamId; + } + + public Long getMainTeamId() + { + return mainTeamId; + } + public void setMainTeamName(String mainTeamName) + { + this.mainTeamName = mainTeamName; + } + + public String getMainTeamName() + { + return mainTeamName; + } + public void setGuestTeamId(Long guestTeamId) + { + this.guestTeamId = guestTeamId; + } + + public Long getGuestTeamId() + { + return guestTeamId; + } + public void setGuestTeamName(String guestTeamName) + { + this.guestTeamName = guestTeamName; + } + + public String getGuestTeamName() + { + return guestTeamName; + } + public void setCompetitionCode(String competitionCode) + { + this.competitionCode = competitionCode; + } + + public String getCompetitionCode() + { + return competitionCode; + } + public void setCompetitionName(String competitionName) + { + this.competitionName = competitionName; + } + + public String getCompetitionName() + { + return competitionName; + } + public void setDesignated(Integer designated) + { + this.designated = designated; + } + + public Integer getDesignated() + { + return designated; + } + public void setCompetitionType(Long competitionType) + { + this.competitionType = competitionType; + } + + public Long getCompetitionType() + { + return competitionType; + } + public void setCompetitionTime(Date competitionTime) + { + this.competitionTime = competitionTime; + } + + public Date getCompetitionTime() + { + return competitionTime; + } + public void setBuildingId(Long buildingId) + { + this.buildingId = buildingId; + } + + public Long getBuildingId() + { + return buildingId; + } + public void setBuildingName(String buildingName) + { + this.buildingName = buildingName; + } + + public String getBuildingName() + { + return buildingName; + } + public void setCompetitionAddress(String competitionAddress) + { + this.competitionAddress = competitionAddress; + } + + public String getCompetitionAddress() + { + return competitionAddress; + } + public void setFounder(Long founder) + { + this.founder = founder; + } + + public Long getFounder() + { + return founder; + } + public void setStatus(Integer status) + { + this.status = status; + } + + public Integer getStatus() + { + return status; + } + public void setCityCode(String cityCode) + { + this.cityCode = cityCode; + } + + public String getCityCode() + { + return cityCode; + } + public void setCityName(String cityName) + { + this.cityName = cityName; + } + + public String getCityName() + { + return cityName; + } + public void setMaxPlayer(Long maxPlayer) + { + this.maxPlayer = maxPlayer; + } + + public Long getMaxPlayer() + { + return maxPlayer; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setLastUpdatedTime(Date lastUpdatedTime) + { + this.lastUpdatedTime = lastUpdatedTime; + } + + public Date getLastUpdatedTime() + { + return lastUpdatedTime; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setModifiedBy(String modifiedBy) + { + this.modifiedBy = modifiedBy; + } + + public String getModifiedBy() + { + return modifiedBy; + } + public void setIsDeleted(Long isDeleted) + { + this.isDeleted = isDeleted; + } + + public Long getIsDeleted() + { + return isDeleted; + } + public void setLongitude(Long longitude) + { + this.longitude = longitude; + } + + public Long getLongitude() + { + return longitude; + } + public void setLatitude(Long latitude) + { + this.latitude = latitude; + } + + public Long getLatitude() + { + return latitude; + } + public void setCompetitionNature(Integer competitionNature) + { + this.competitionNature = competitionNature; + } + + public Integer getCompetitionNature() + { + return competitionNature; + } + public void setEnrollBeginTime(Date enrollBeginTime) + { + this.enrollBeginTime = enrollBeginTime; + } + + public Date getEnrollBeginTime() + { + return enrollBeginTime; + } + public void setEnrollEndTime(Date enrollEndTime) + { + this.enrollEndTime = enrollEndTime; + } + + public Date getEnrollEndTime() + { + return enrollEndTime; + } + public void setContacts(String contacts) + { + this.contacts = contacts; + } + + public String getContacts() + { + return contacts; + } + public void setContactsAreaCode(String contactsAreaCode) + { + this.contactsAreaCode = contactsAreaCode; + } + + public String getContactsAreaCode() + { + return contactsAreaCode; + } + public void setContactsTel(String contactsTel) + { + this.contactsTel = contactsTel; + } + + public String getContactsTel() + { + return contactsTel; + } + public void setCompetitionBeginTime(Date competitionBeginTime) + { + this.competitionBeginTime = competitionBeginTime; + } + + public Date getCompetitionBeginTime() + { + return competitionBeginTime; + } + public void setCompetitionEndTime(Date competitionEndTime) + { + this.competitionEndTime = competitionEndTime; + } + + public Date getCompetitionEndTime() + { + return competitionEndTime; + } + public void setOrganizer(String organizer) + { + this.organizer = organizer; + } + + public String getOrganizer() + { + return organizer; + } + public void setUndertake(String undertake) + { + this.undertake = undertake; + } + + public String getUndertake() + { + return undertake; + } + public void setCompetitionBackImg(String competitionBackImg) + { + this.competitionBackImg = competitionBackImg; + } + + public String getCompetitionBackImg() + { + return competitionBackImg; + } + public void setCreatedId(Long createdId) + { + this.createdId = createdId; + } + + public Long getCreatedId() + { + return createdId; + } + public void setAuditStatus(Long auditStatus) + { + this.auditStatus = auditStatus; + } + + public Long getAuditStatus() + { + return auditStatus; + } + public void setHeightHide(Integer heightHide) + { + this.heightHide = heightHide; + } + + public Integer getHeightHide() + { + return heightHide; + } + public void setSponsor(String sponsor) + { + this.sponsor = sponsor; + } + + public String getSponsor() + { + return sponsor; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("mainTeamId", getMainTeamId()) + .append("mainTeamName", getMainTeamName()) + .append("guestTeamId", getGuestTeamId()) + .append("guestTeamName", getGuestTeamName()) + .append("competitionCode", getCompetitionCode()) + .append("competitionName", getCompetitionName()) + .append("designated", getDesignated()) + .append("competitionType", getCompetitionType()) + .append("competitionTime", getCompetitionTime()) + .append("buildingId", getBuildingId()) + .append("buildingName", getBuildingName()) + .append("competitionAddress", getCompetitionAddress()) + .append("founder", getFounder()) + .append("status", getStatus()) + .append("cityCode", getCityCode()) + .append("cityName", getCityName()) + .append("maxPlayer", getMaxPlayer()) + .append("createdTime", getCreatedTime()) + .append("lastUpdatedTime", getLastUpdatedTime()) + .append("createdBy", getCreatedBy()) + .append("modifiedBy", getModifiedBy()) + .append("isDeleted", getIsDeleted()) + .append("longitude", getLongitude()) + .append("latitude", getLatitude()) + .append("remark", getRemark()) + .append("competitionNature", getCompetitionNature()) + .append("enrollBeginTime", getEnrollBeginTime()) + .append("enrollEndTime", getEnrollEndTime()) + .append("contacts", getContacts()) + .append("contactsAreaCode", getContactsAreaCode()) + .append("contactsTel", getContactsTel()) + .append("competitionBeginTime", getCompetitionBeginTime()) + .append("competitionEndTime", getCompetitionEndTime()) + .append("organizer", getOrganizer()) + .append("undertake", getUndertake()) + .append("competitionBackImg", getCompetitionBackImg()) + .append("createdId", getCreatedId()) + .append("auditStatus", getAuditStatus()) + .append("heightHide", getHeightHide()) + .append("sponsor", getSponsor()) + .toString(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMapper.java new file mode 100644 index 00000000..c08de9b6 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CompetitionMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.Competition; + +/** + * 比赛信息Mapper接口 + * + * @author ruoyi + * @date 2022-11-02 + */ +public interface CompetitionMapper +{ + /** + * 查询比赛信息 + * + * @param id 比赛信息主键 + * @return 比赛信息 + */ + public Competition selectCompetitionById(Long id); + + /** + * 查询比赛信息列表 + * + * @param competition 比赛信息 + * @return 比赛信息集合 + */ + public List selectCompetitionList(Competition competition); + + /** + * 新增比赛信息 + * + * @param competition 比赛信息 + * @return 结果 + */ + public int insertCompetition(Competition competition); + + /** + * 修改比赛信息 + * + * @param competition 比赛信息 + * @return 结果 + */ + public int updateCompetition(Competition competition); + + /** + * 删除比赛信息 + * + * @param id 比赛信息主键 + * @return 结果 + */ + public int deleteCompetitionById(Long id); + + /** + * 批量删除比赛信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCompetitionByIds(Long[] ids); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionService.java new file mode 100644 index 00000000..343f34ac --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ICompetitionService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.Competition; + +/** + * 比赛信息Service接口 + * + * @author ruoyi + * @date 2022-11-02 + */ +public interface ICompetitionService +{ + /** + * 查询比赛信息 + * + * @param id 比赛信息主键 + * @return 比赛信息 + */ + public Competition selectCompetitionById(Long id); + + /** + * 查询比赛信息列表 + * + * @param competition 比赛信息 + * @return 比赛信息集合 + */ + public List selectCompetitionList(Competition competition); + + /** + * 新增比赛信息 + * + * @param competition 比赛信息 + * @return 结果 + */ + public int insertCompetition(Competition competition); + + /** + * 修改比赛信息 + * + * @param competition 比赛信息 + * @return 结果 + */ + public int updateCompetition(Competition competition); + + /** + * 批量删除比赛信息 + * + * @param ids 需要删除的比赛信息主键集合 + * @return 结果 + */ + public int deleteCompetitionByIds(Long[] ids); + + /** + * 删除比赛信息信息 + * + * @param id 比赛信息主键 + * @return 结果 + */ + public int deleteCompetitionById(Long id); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionServiceImpl.java new file mode 100644 index 00000000..beb1e1dd --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CompetitionServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.CompetitionMapper; +import com.ruoyi.system.domain.Competition; +import com.ruoyi.system.service.ICompetitionService; + +/** + * 比赛信息Service业务层处理 + * + * @author ruoyi + * @date 2022-11-02 + */ +@Service +public class CompetitionServiceImpl implements ICompetitionService +{ + @Autowired + private CompetitionMapper competitionMapper; + + /** + * 查询比赛信息 + * + * @param id 比赛信息主键 + * @return 比赛信息 + */ + @Override + public Competition selectCompetitionById(Long id) + { + return competitionMapper.selectCompetitionById(id); + } + + /** + * 查询比赛信息列表 + * + * @param competition 比赛信息 + * @return 比赛信息 + */ + @Override + public List selectCompetitionList(Competition competition) + { + return competitionMapper.selectCompetitionList(competition); + } + + /** + * 新增比赛信息 + * + * @param competition 比赛信息 + * @return 结果 + */ + @Override + public int insertCompetition(Competition competition) + { + return competitionMapper.insertCompetition(competition); + } + + /** + * 修改比赛信息 + * + * @param competition 比赛信息 + * @return 结果 + */ + @Override + public int updateCompetition(Competition competition) + { + return competitionMapper.updateCompetition(competition); + } + + /** + * 批量删除比赛信息 + * + * @param ids 需要删除的比赛信息主键 + * @return 结果 + */ + @Override + public int deleteCompetitionByIds(Long[] ids) + { + return competitionMapper.deleteCompetitionByIds(ids); + } + + /** + * 删除比赛信息信息 + * + * @param id 比赛信息主键 + * @return 结果 + */ + @Override + public int deleteCompetitionById(Long id) + { + return competitionMapper.deleteCompetitionById(id); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMapper.xml new file mode 100644 index 00000000..1c26f250 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CompetitionMapper.xml @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, main_team_id, main_team_name, guest_team_id, guest_team_name, competition_code, competition_name, designated, competition_type, competition_time, building_id, building_name, competition_address, founder, status, city_code, city_name, max_player, created_time, last_updated_time, created_by, modified_by, is_deleted, longitude, latitude, remark, competition_nature, enroll_begin_time, enroll_end_time, contacts, contacts_area_code, contacts_tel, competition_begin_time, competition_end_time, organizer, undertake, competition_back_img, created_id, audit_status, height_hide, sponsor from competition + + + + + + + + insert into competition + + main_team_id, + main_team_name, + guest_team_id, + guest_team_name, + competition_code, + competition_name, + designated, + competition_type, + competition_time, + building_id, + building_name, + competition_address, + founder, + status, + city_code, + city_name, + max_player, + created_time, + last_updated_time, + created_by, + modified_by, + is_deleted, + longitude, + latitude, + remark, + competition_nature, + enroll_begin_time, + enroll_end_time, + contacts, + contacts_area_code, + contacts_tel, + competition_begin_time, + competition_end_time, + organizer, + undertake, + competition_back_img, + created_id, + audit_status, + height_hide, + sponsor, + + + #{mainTeamId}, + #{mainTeamName}, + #{guestTeamId}, + #{guestTeamName}, + #{competitionCode}, + #{competitionName}, + #{designated}, + #{competitionType}, + #{competitionTime}, + #{buildingId}, + #{buildingName}, + #{competitionAddress}, + #{founder}, + #{status}, + #{cityCode}, + #{cityName}, + #{maxPlayer}, + #{createdTime}, + #{lastUpdatedTime}, + #{createdBy}, + #{modifiedBy}, + #{isDeleted}, + #{longitude}, + #{latitude}, + #{remark}, + #{competitionNature}, + #{enrollBeginTime}, + #{enrollEndTime}, + #{contacts}, + #{contactsAreaCode}, + #{contactsTel}, + #{competitionBeginTime}, + #{competitionEndTime}, + #{organizer}, + #{undertake}, + #{competitionBackImg}, + #{createdId}, + #{auditStatus}, + #{heightHide}, + #{sponsor}, + + + + + update competition + + main_team_id = #{mainTeamId}, + main_team_name = #{mainTeamName}, + guest_team_id = #{guestTeamId}, + guest_team_name = #{guestTeamName}, + competition_code = #{competitionCode}, + competition_name = #{competitionName}, + designated = #{designated}, + competition_type = #{competitionType}, + competition_time = #{competitionTime}, + building_id = #{buildingId}, + building_name = #{buildingName}, + competition_address = #{competitionAddress}, + founder = #{founder}, + status = #{status}, + city_code = #{cityCode}, + city_name = #{cityName}, + max_player = #{maxPlayer}, + created_time = #{createdTime}, + last_updated_time = #{lastUpdatedTime}, + created_by = #{createdBy}, + modified_by = #{modifiedBy}, + is_deleted = #{isDeleted}, + longitude = #{longitude}, + latitude = #{latitude}, + remark = #{remark}, + competition_nature = #{competitionNature}, + enroll_begin_time = #{enrollBeginTime}, + enroll_end_time = #{enrollEndTime}, + contacts = #{contacts}, + contacts_area_code = #{contactsAreaCode}, + contacts_tel = #{contactsTel}, + competition_begin_time = #{competitionBeginTime}, + competition_end_time = #{competitionEndTime}, + organizer = #{organizer}, + undertake = #{undertake}, + competition_back_img = #{competitionBackImg}, + created_id = #{createdId}, + audit_status = #{auditStatus}, + height_hide = #{heightHide}, + sponsor = #{sponsor}, + + where id = #{id} + + + + delete from competition where id = #{id} + + + + delete from competition where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/competition.js b/ruoyi-ui/src/api/system/competition.js new file mode 100644 index 00000000..35af9a04 --- /dev/null +++ b/ruoyi-ui/src/api/system/competition.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询比赛信息列表 +export function listCompetition(query) { + return request({ + url: '/system/competition/list', + method: 'get', + params: query + }) +} + +// 查询比赛信息详细 +export function getCompetition(id) { + return request({ + url: '/system/competition/' + id, + method: 'get' + }) +} + +// 新增比赛信息 +export function addCompetition(data) { + return request({ + url: '/system/competition', + method: 'post', + data: data + }) +} + +// 修改比赛信息 +export function updateCompetition(data) { + return request({ + url: '/system/competition', + method: 'put', + data: data + }) +} + +// 删除比赛信息 +export function delCompetition(id) { + return request({ + url: '/system/competition/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/vs.js b/ruoyi-ui/src/api/system/vs.js new file mode 100644 index 00000000..6d3c8fb2 --- /dev/null +++ b/ruoyi-ui/src/api/system/vs.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询约战列表 +export function listVs(query) { + return request({ + url: '/system/vs/list', + method: 'get', + params: query + }) +} + +// 查询约战详细 +export function getVs(id) { + return request({ + url: '/system/vs/' + id, + method: 'get' + }) +} + +// 新增约战 +export function addVs(data) { + return request({ + url: '/system/vs', + method: 'post', + data: data + }) +} + +// 修改约战 +export function updateVs(data) { + return request({ + url: '/system/vs', + method: 'put', + data: data + }) +} + +// 删除约战 +export function delVs(id) { + return request({ + url: '/system/vs/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/system/basketBallTeam/index.vue b/ruoyi-ui/src/views/system/basketBallTeam/index.vue index 19f6570f..62696a25 100644 --- a/ruoyi-ui/src/views/system/basketBallTeam/index.vue +++ b/ruoyi-ui/src/views/system/basketBallTeam/index.vue @@ -91,7 +91,7 @@ - + + + diff --git a/ruoyi-ui/src/views/system/vs/index.vue b/ruoyi-ui/src/views/system/vs/index.vue new file mode 100644 index 00000000..7c5e0ede --- /dev/null +++ b/ruoyi-ui/src/views/system/vs/index.vue @@ -0,0 +1,539 @@ + + +