commit
5d2dfeb4d3
5
pom.xml
5
pom.xml
|
|
@ -190,6 +190,11 @@
|
|||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.5.3.1</version>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baidu.aip</groupId>
|
||||
<artifactId>java-sdk</artifactId>
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ public class CacheConstants
|
|||
/**
|
||||
* 缓存有效期,默认720(分钟)
|
||||
*/
|
||||
public final static long EXPIRATION = 720;
|
||||
public final static long EXPIRATION = 7200;
|
||||
|
||||
/**
|
||||
* 缓存刷新时间,默认120(分钟)
|
||||
*/
|
||||
public final static long REFRESH_TIME = 120;
|
||||
public final static long REFRESH_TIME = 1200;
|
||||
|
||||
/**
|
||||
* 密码最大错误次数
|
||||
|
|
|
|||
|
|
@ -96,6 +96,10 @@
|
|||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
|
|
@ -69,9 +70,9 @@ public class CompetitionController extends BaseController
|
|||
@Autowired
|
||||
private ICompetitionService competitionService;
|
||||
@Autowired
|
||||
private ICompetitionOfTeamService competitionOfTeamService;
|
||||
private IUserRoleService userRoleService;
|
||||
@Autowired
|
||||
private ICompetitionMembersService competitionMembersService;
|
||||
private ICompetitionSharePermissionsService competitionSharePermissionsService;
|
||||
@Autowired
|
||||
private IWxUserService wxUserService;
|
||||
|
||||
|
|
@ -132,9 +133,30 @@ public class CompetitionController extends BaseController
|
|||
@ResponseBody
|
||||
@ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取我参与过的比赛列表")
|
||||
public TableDataInfo getMyJoinCompetition(@RequestBody CompetitionVo entity) {
|
||||
startPage();
|
||||
//关键字word包含:球队名称、地点名称、球馆名称,支持模糊搜索;
|
||||
entity.setIsDeleted(0);
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
List<UserRole> userRoleList = userRoleService.selectRoleByUserId(user.getUserid());
|
||||
//查询登录用户的系统角色
|
||||
if(ObjectUtil.isNotNull(userRoleList) && userRoleList.size()>0) {
|
||||
List<String> roles = userRoleList.stream().map(UserRole::getRoleCode).collect(Collectors.toList());
|
||||
//如果是管理员就直接可以查看所有的赛事
|
||||
if (roles.contains("admin")) {
|
||||
entity.setUserId(null);
|
||||
entity.setFounder(null);
|
||||
}else {
|
||||
//todo 查询是否有分享的控制权赛会
|
||||
CompetitionSharePermissions permissions = new CompetitionSharePermissions();
|
||||
permissions.setUserId(user.getUserid());
|
||||
permissions.setIsDeleted(0);
|
||||
List<CompetitionSharePermissions> permissionsList = competitionSharePermissionsService.selectCompetitionSharePermissionsList(permissions);
|
||||
if(ObjectUtil.isNotNull(permissionsList)&&permissionsList.size()>0){
|
||||
List<Long> competitionIds = permissionsList.stream().map(CompetitionSharePermissions::getCompetitionId).collect(Collectors.toList());
|
||||
entity.setCompetitionIds(competitionIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
startPage();
|
||||
List<Competition> list = competitionService.getMyJoinCompetition(entity);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,14 @@ public class CompetitionOfTeamController extends BaseController
|
|||
{
|
||||
return toAjax(competitionOfTeamService.deleteCompetitionOfTeamByIds(ids));
|
||||
}
|
||||
|
||||
@PostMapping("/getMyJoinCompetitionTeam")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取【我】参与比赛的球队列表")
|
||||
public TableDataInfo getMyJoinCompetitionTeam(@RequestBody CompetitionOfTeamVo entity){
|
||||
startPage();
|
||||
List<CompetitionOfTeamVo> list =competitionOfTeamService.getMyJoinCompetitionTeam(entity);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"新增")
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
|
|
@ -222,23 +229,8 @@ public class CompetitionOfTeamController extends BaseController
|
|||
}
|
||||
@PostMapping("/getJoinCompetitionGroupTeam")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = ApiTerminal.wxMiniProgram+"获取赛事中参与的球队的分组数据")
|
||||
@ApiOperation(value = ApiTerminal.wxMiniProgram+"获取赛事中参与的球队的分组的积分情况")
|
||||
public AjaxResult getJoinCompetitionGroupTeam(@RequestBody CompetitionOfTeamVo entity){
|
||||
//关键字word包含:球队名称、地点名称、球馆名称,支持模糊搜索;
|
||||
// List<CompetitionOfTeamVo> competitionOfTeamVos = competitionOfTeamFeign.getJoinCompetitionGroupTeam(entity);
|
||||
// List<CompetitionOfTeamVo> isNotGroupList = list.stream().filter(a -> StringUtils.isEmpty(a.getCompetitionGroup())).collect(Collectors.toList());
|
||||
// List<CompetitionOfTeamVo> list1 = list.stream().filter(a -> !StringUtils.isEmpty(a.getCompetitionGroup())).collect(Collectors.toList());
|
||||
// //1.根据字符串类型日期分组,并按照日期升序排序,返回TreeMap<String,List>,map的key为字符串日期,value为list
|
||||
// TreeMap<String,List<CompetitionOfTeamVo>> dataGroupMap = list1.stream().collect(Collectors.groupingBy(a->a.getCompetitionGroup(), TreeMap::new,Collectors.toList()));
|
||||
// List<Map> listMap = new ArrayList<>();
|
||||
// for(Map.Entry<String, List<CompetitionOfTeamVo>> entry:dataGroupMap.entrySet()){
|
||||
// Map resMap =new HashMap();
|
||||
// resMap.put("competitionGroup",entry.getKey());
|
||||
// resMap.put("competitionOfTeamList",entry.getValue());
|
||||
// listMap.add(resMap);
|
||||
// }
|
||||
// maps.put("isGroup",listMap);
|
||||
// maps.put("isNotGroup",isNotGroupList);
|
||||
Map hashMap = new HashMap();
|
||||
List<CompetitionOfTeamGroupVo> competitionOfTeamGroupVoList = null;
|
||||
List<CompetitionOfTeamVo> competitionOfTeamVos = competitionOfTeamService.findCompetitionTeamGroupList(entity);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import java.util.Comparator;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.exception.ServiceException;
|
||||
|
|
@ -127,7 +128,8 @@ public class CompetitionResultController extends BaseController
|
|||
{
|
||||
return toAjax(competitionResultService.deleteCompetitionResultByIds(ids));
|
||||
}
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"球员数据-新增、编辑")
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"球员数据-新增,编辑")
|
||||
@Log(title = "赛会中球员比赛得分记录", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/insertOrUpdateMemberScore")
|
||||
@ResponseBody
|
||||
public AjaxResult insertOrUpdateMemberScore(@RequestBody CompetitionMembersScore request) throws Exception {
|
||||
|
|
@ -137,7 +139,7 @@ public class CompetitionResultController extends BaseController
|
|||
|
||||
//新增
|
||||
if(request.getId()==null){
|
||||
request.setCreatedBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
//request.setCreatedBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
request.setCreatedTime(new Date());
|
||||
competitionMembersScoreService.insertCompetitionMembersScore(request);
|
||||
} else {//编辑、
|
||||
|
|
@ -145,7 +147,7 @@ public class CompetitionResultController extends BaseController
|
|||
throw new ServiceException("id为空");
|
||||
}
|
||||
request.setLastUpdatedTime(new Date());
|
||||
request.setModifiedBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
//request.setModifiedBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
competitionMembersScoreService.updateCompetitionMembersScore(request);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
|
|
@ -158,34 +160,61 @@ public class CompetitionResultController extends BaseController
|
|||
throw new InvalidParameterException("赛会id不能为");
|
||||
}
|
||||
List<PersonalHonorResponse> honorResponseList = new ArrayList<>();
|
||||
|
||||
//查询赛会得分数据
|
||||
List<CompetitionMembersScore> membersScoreList = competitionMembersScoreService.getHonorList(competitionId,null);
|
||||
if(UtilTool.isNotNull(membersScoreList)){
|
||||
honorResponseList = new ArrayList<>();
|
||||
|
||||
CompetitionMembersScore membersScore = null;
|
||||
if(membersScoreList.size()>0){
|
||||
//3分王
|
||||
membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getThreePoints)).get();
|
||||
setHonorData(honorResponseList,membersScore,"3分王");
|
||||
List<CompetitionMembersScore> threePointList = membersScoreList.stream().filter(a -> a.getThreePoints().longValue() > 0).collect(Collectors.toList());
|
||||
if(threePointList.size()>0) {
|
||||
CompetitionMembersScore threePoint = threePointList.stream().max(Comparator.comparing(CompetitionMembersScore::getThreePoints)).get();
|
||||
setHonorData(honorResponseList, threePoint, "3分王");
|
||||
}else {
|
||||
setHonorData(honorResponseList, new CompetitionMembersScore(), "3分王");
|
||||
}
|
||||
//篮板王
|
||||
membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getBackboard)).get();
|
||||
setHonorData(honorResponseList,membersScore,"篮板王");
|
||||
List<CompetitionMembersScore> backboardList = membersScoreList.stream().filter(a -> a.getBackboard().longValue() > 0).collect(Collectors.toList());
|
||||
if(backboardList.size()>0){
|
||||
CompetitionMembersScore backboardMax = backboardList.stream().max(Comparator.comparing(CompetitionMembersScore::getBackboard)).get();
|
||||
setHonorData(honorResponseList,backboardMax,"篮板王");
|
||||
}else {
|
||||
setHonorData(honorResponseList,new CompetitionMembersScore(),"篮板王");
|
||||
}
|
||||
|
||||
//效率王
|
||||
// membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getThreePoints)).get();
|
||||
// setHonorData(membersScore,"效率王");
|
||||
//助攻王
|
||||
membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getAssists)).get();
|
||||
setHonorData(honorResponseList,membersScore,"助攻王");
|
||||
List<CompetitionMembersScore> assistsList = membersScoreList.stream().filter(a -> a.getAssists().longValue() > 0).collect(Collectors.toList());
|
||||
if(assistsList.size()>0){
|
||||
CompetitionMembersScore assists = assistsList.stream().max(Comparator.comparing(CompetitionMembersScore::getAssists)).get();
|
||||
setHonorData(honorResponseList,assists,"助攻王");
|
||||
}else {
|
||||
setHonorData(honorResponseList,new CompetitionMembersScore(),"助攻王");
|
||||
}
|
||||
//得分王
|
||||
membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getTotalScore)).get();
|
||||
setHonorData(honorResponseList,membersScore,"得分王");
|
||||
List<CompetitionMembersScore> totalScoreList = membersScoreList.stream().filter(a -> a.getTotalScore().longValue() > 0).collect(Collectors.toList());
|
||||
if(totalScoreList.size()>0){
|
||||
CompetitionMembersScore totalScore = totalScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getTotalScore)).get();
|
||||
setHonorData(honorResponseList,totalScore,"得分王");
|
||||
}else {
|
||||
setHonorData(honorResponseList,new CompetitionMembersScore(),"得分王");
|
||||
}
|
||||
//盖帽王
|
||||
membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getBlock)).get();
|
||||
setHonorData(honorResponseList,membersScore,"盖帽王");
|
||||
List<CompetitionMembersScore> blockList = membersScoreList.stream().filter(a -> a.getBlock().longValue() > 0).collect(Collectors.toList());
|
||||
if(blockList.size()>0){
|
||||
CompetitionMembersScore block = blockList.stream().max(Comparator.comparing(CompetitionMembersScore::getBlock)).get();
|
||||
setHonorData(honorResponseList,block,"盖帽王");
|
||||
}else {
|
||||
setHonorData(honorResponseList,new CompetitionMembersScore(),"盖帽王");
|
||||
}
|
||||
//抢断王
|
||||
membersScore = membersScoreList.stream().max(Comparator.comparing(CompetitionMembersScore::getSnatch)).get();
|
||||
setHonorData(honorResponseList,membersScore,"抢断王");
|
||||
List<CompetitionMembersScore> snatchList = membersScoreList.stream().filter(a -> a.getSnatch().longValue() > 0).collect(Collectors.toList());
|
||||
if(snatchList.size()>0){
|
||||
CompetitionMembersScore snatch = snatchList.stream().max(Comparator.comparing(CompetitionMembersScore::getSnatch)).get();
|
||||
setHonorData(honorResponseList,snatch,"抢断王");
|
||||
}else {
|
||||
setHonorData(honorResponseList,new CompetitionMembersScore(),"抢断王");
|
||||
}
|
||||
|
||||
}
|
||||
return getDataTable(honorResponseList);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,131 @@
|
|||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.swagger.apiConstants.ApiTerminal;
|
||||
import com.ruoyi.system.domain.vo.CompetitionSharePermissionsVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.CompetitionSharePermissions;
|
||||
import com.ruoyi.system.service.ICompetitionSharePermissionsService;
|
||||
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 2023-07-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/competitionPermissions")
|
||||
public class CompetitionSharePermissionsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICompetitionSharePermissionsService competitionSharePermissionsService;
|
||||
|
||||
/**
|
||||
* 查询赛会-权限分享列表
|
||||
*/
|
||||
@RequiresPermissions("system:competitionPermissions:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CompetitionSharePermissions competitionSharePermissions)
|
||||
{
|
||||
startPage();
|
||||
List<CompetitionSharePermissions> list = competitionSharePermissionsService.selectCompetitionSharePermissionsList(competitionSharePermissions);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出赛会-权限分享列表
|
||||
*/
|
||||
@RequiresPermissions("system:competitionPermissions:export")
|
||||
@Log(title = "赛会-权限分享", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CompetitionSharePermissions competitionSharePermissions)
|
||||
{
|
||||
List<CompetitionSharePermissions> list = competitionSharePermissionsService.selectCompetitionSharePermissionsList(competitionSharePermissions);
|
||||
ExcelUtil<CompetitionSharePermissions> util = new ExcelUtil<CompetitionSharePermissions>(CompetitionSharePermissions.class);
|
||||
util.exportExcel(response, list, "赛会-权限分享数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取赛会-权限分享详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:competitionPermissions:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(competitionSharePermissionsService.selectCompetitionSharePermissionsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增赛会-权限分享
|
||||
*/
|
||||
@RequiresPermissions("system:competitionPermissions:add")
|
||||
@Log(title = "赛会-权限分享", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CompetitionSharePermissions competitionSharePermissions)
|
||||
{
|
||||
return toAjax(competitionSharePermissionsService.insertCompetitionSharePermissions(competitionSharePermissions));
|
||||
}
|
||||
@ApiOperation(value = ApiTerminal.wxMiniProgram+"分页查询分享数据")
|
||||
@PostMapping("/getList")
|
||||
public TableDataInfo getList(@RequestBody CompetitionSharePermissions competitionSharePermissions)
|
||||
{
|
||||
startPage();
|
||||
List<CompetitionSharePermissions> list = competitionSharePermissionsService.getList(competitionSharePermissions);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 修改赛会-权限分享
|
||||
*/
|
||||
@RequiresPermissions("system:competitionPermissions:edit")
|
||||
@Log(title = "赛会-权限分享", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CompetitionSharePermissions competitionSharePermissions)
|
||||
{
|
||||
return toAjax(competitionSharePermissionsService.updateCompetitionSharePermissions(competitionSharePermissions));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除赛会-权限分享
|
||||
*/
|
||||
@RequiresPermissions("system:competitionPermissions:remove")
|
||||
@Log(title = "赛会-权限分享", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(competitionSharePermissionsService.deleteCompetitionSharePermissionsByIds(ids));
|
||||
}
|
||||
|
||||
@Log(title = ApiTerminal.wxMiniProgram+"赛会-批量分享赛会的控制权限", businessType = BusinessType.INSERT)
|
||||
@ApiOperation(value = ApiTerminal.wxMiniProgram+"批量分享赛会的控制权限")
|
||||
@PostMapping("/shareCompetitionPermissions")
|
||||
public AjaxResult shareCompetitionPermissions(@RequestBody CompetitionSharePermissions vo)
|
||||
{
|
||||
return AjaxResult.success(competitionSharePermissionsService.shareCompetitionPermissions(vo));
|
||||
}
|
||||
@Log(title = ApiTerminal.wxMiniProgram+"赛会-批量删除分享赛会的控制权限", businessType = BusinessType.DELETE)
|
||||
@ApiOperation(value = ApiTerminal.wxMiniProgram+"批量删除分享赛会的控制权限")
|
||||
@PostMapping("/delShareCompetitionPermissions")
|
||||
public AjaxResult delShareCompetitionPermissions(@RequestBody Long[] ids)
|
||||
{
|
||||
return AjaxResult.success(competitionSharePermissionsService.delShareCompetitionPermissions(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -2,24 +2,21 @@ package com.ruoyi.system.controller;
|
|||
|
||||
import java.security.InvalidParameterException;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.ruoyi.common.core.exception.CheckedException;
|
||||
import com.ruoyi.common.swagger.apiConstants.ApiTerminal;
|
||||
import com.ruoyi.system.domain.CompetitionResult;
|
||||
import com.ruoyi.system.domain.vo.CompetitionTeamIntegralVo;
|
||||
import com.ruoyi.system.domain.vo.CompetitionTeamVsTeamRequest;
|
||||
import com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo;
|
||||
import com.ruoyi.system.domain.vo.CompetitionUnifiedRecordVo;
|
||||
import com.ruoyi.system.domain.vo.*;
|
||||
import com.ruoyi.system.utils.UtilTool;
|
||||
import io.seata.core.model.Result;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
|
|
@ -111,6 +108,18 @@ public class CompetitionTeamVsTeamController extends BaseController
|
|||
{
|
||||
return toAjax(competitionTeamVsTeamService.deleteCompetitionTeamVsTeamByIds(ids));
|
||||
}
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"根据IDS批量删除")
|
||||
@DeleteMapping("/batchDeleteByIds")
|
||||
@ResponseBody
|
||||
public AjaxResult batchDeleteByIds(@RequestBody Ids ids) throws Exception {
|
||||
if(ObjectUtil.isNull(ids)){
|
||||
throw new InvalidParameterException("参数异常,非法操作!");
|
||||
}
|
||||
if(StringUtils.isEmpty(ids.getIdList())||ids.getIdList().size()==0){
|
||||
throw new InvalidParameterException("ids不能为空!");
|
||||
}
|
||||
return AjaxResult.success(competitionTeamVsTeamService.deleteBatchByIds(ids));
|
||||
}
|
||||
@Log(title = "赛会中球队VS球队比赛结果数据", businessType = BusinessType.OTHER)
|
||||
@ApiOperation("根据ID获取当前比赛赛程的所有统分结果")
|
||||
@GetMapping("/competitionUnifiedRecord/{id}")
|
||||
|
|
@ -119,7 +128,7 @@ public class CompetitionTeamVsTeamController extends BaseController
|
|||
}
|
||||
|
||||
@Log(title = "赛会中球队VS球队比赛结果数据2", businessType = BusinessType.OTHER)
|
||||
@ApiOperation("根据ID获取当前比赛赛程的所有统分结果2")
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"根据ID获取当前比赛赛程的所有统分结果2")
|
||||
@GetMapping("/getCompetitionVsRecordById/{id}")
|
||||
public AjaxResult getCompetitionVsRecordById(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(competitionTeamVsTeamService.getCompetitionVsRecordById(id));
|
||||
|
|
@ -149,10 +158,47 @@ public class CompetitionTeamVsTeamController extends BaseController
|
|||
@GetMapping("/competitionTeamIntegralList/{id}")
|
||||
@ResponseBody
|
||||
public TableDataInfo competitionTeamIntegralList(@PathVariable("id") Long id) throws Exception {
|
||||
List<CompetitionTeamIntegralVo> list = competitionTeamVsTeamService.getCompetitionTeamIntegralListById(id);
|
||||
CompetitionTeamIntegralVo vo = new CompetitionTeamIntegralVo();
|
||||
vo.setCompetitionId(id);
|
||||
List<CompetitionTeamIntegralVo> list = competitionTeamVsTeamService.getCompetitionTeamIntegralListById(vo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"根据赛会ID获取所有球队的积分排位")
|
||||
@PostMapping("/competitionTeamIntegralRanking")
|
||||
@ResponseBody
|
||||
public TableDataInfo competitionTeamIntegralRanking(@RequestBody CompetitionTeamIntegralVo vo) throws Exception {
|
||||
List<competitionTeamIntegralRankingVo> rankingVoList = new ArrayList<>();
|
||||
List<CompetitionTeamIntegralVo> list = competitionTeamVsTeamService.getCompetitionTeamIntegralListById(vo);
|
||||
Map<String, List<CompetitionTeamIntegralVo>> map = new HashMap<>();
|
||||
if(list.size()>0) {
|
||||
List<CompetitionTeamIntegralVo> notGroup = list.stream().filter(a -> ObjectUtil.isNull(a.getCompetitionGroup())).collect(Collectors.toList());
|
||||
List<CompetitionTeamIntegralVo> yesGroup = list.stream().filter(a -> ObjectUtil.isNotNull(a.getCompetitionGroup())).collect(Collectors.toList());
|
||||
if(yesGroup.size()>0) {
|
||||
map = yesGroup.stream().collect(
|
||||
Collectors.groupingBy(CompetitionTeamIntegralVo::getCompetitionGroup, HashMap::new,
|
||||
Collectors.collectingAndThen(Collectors.toList(),
|
||||
//正序
|
||||
//list1 -> list1.stream().sorted(Comparator.comparing(CompetitionTeamIntegralVo::getIntegral))
|
||||
//倒序
|
||||
list1 -> list1.stream().sorted(Comparator.comparing(CompetitionTeamIntegralVo::getIntegral).reversed())
|
||||
.collect(Collectors.toList())
|
||||
)));
|
||||
for (String key:map.keySet()){
|
||||
competitionTeamIntegralRankingVo rankingVo = new competitionTeamIntegralRankingVo();
|
||||
rankingVo.setCompetitionGroup(key);
|
||||
rankingVo.setIntegralList(map.get(key));
|
||||
rankingVoList.add(rankingVo);
|
||||
}
|
||||
}
|
||||
if(notGroup.size()>0){
|
||||
competitionTeamIntegralRankingVo rankingVo = new competitionTeamIntegralRankingVo();
|
||||
rankingVo.setCompetitionGroup("未分");
|
||||
rankingVo.setIntegralList(notGroup.stream().sorted(Comparator.comparing(CompetitionTeamIntegralVo::getIntegral).reversed()).collect(Collectors.toList()));
|
||||
rankingVoList.add(rankingVo);
|
||||
}
|
||||
}
|
||||
return getDataTable(rankingVoList);
|
||||
}
|
||||
|
||||
@PostMapping("/competitionScheduleSubmit")
|
||||
@ResponseBody
|
||||
|
|
|
|||
|
|
@ -127,6 +127,8 @@ public class SysUserController extends BaseController
|
|||
LoginUser sysUserVo = new LoginUser();
|
||||
sysUserVo.setSysUser(sysUser);
|
||||
sysUserVo.setRoles(roles);
|
||||
sysUserVo.setUserid(sysUser.getUserId());
|
||||
sysUserVo.setUsername(sysUser.getUserName());
|
||||
sysUserVo.setPermissions(permissions);
|
||||
return R.ok(sysUserVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.ruoyi.system.controller;
|
|||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.swagger.apiConstants.ApiTerminal;
|
||||
import com.ruoyi.system.api.domain.vo.WxAppletsCodeVo;
|
||||
import com.ruoyi.system.domain.vo.PhoneRequest;
|
||||
import com.ruoyi.system.service.WxAppletsService;
|
||||
import io.seata.core.model.Result;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -38,6 +40,33 @@ public class WxAppletsController {
|
|||
@Value("${image.domainName}")
|
||||
private String domainName;
|
||||
|
||||
@PostMapping("/getPhoneNumber")
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"微信小程序-获取用户手机号码")
|
||||
@ResponseBody
|
||||
public AjaxResult getPhoneNumber(@RequestBody PhoneRequest request) throws Exception {
|
||||
String tel="";
|
||||
// 授权成功
|
||||
if (request.getErrMsg().equals("getPhoneNumber:ok")) {
|
||||
tel = wxAppletsService.getPhoneNumber(request);
|
||||
}else{
|
||||
System.out.println("用户拒绝授权获取手机号码 userid="+request.getUserId());
|
||||
}
|
||||
return AjaxResult.success(tel);
|
||||
}
|
||||
|
||||
@PostMapping("/updatePhoneNumber")
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"更新获取用户手机号码")
|
||||
@ResponseBody
|
||||
public AjaxResult updatePhoneNumber(@RequestBody PhoneRequest request) throws Exception {
|
||||
String tel="";
|
||||
// 授权成功
|
||||
if (request.getErrMsg().equals("getPhoneNumber:ok")) {
|
||||
tel = wxAppletsService.updatePhoneNumber(request);
|
||||
}else{
|
||||
System.out.println("用户拒绝授权获取手机号码 userid="+request.getUserId());
|
||||
}
|
||||
return AjaxResult.success(tel);
|
||||
}
|
||||
@PostMapping("/getWxacodeunlimit")
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram +"微信小程序-获取小程序码")
|
||||
@ResponseBody
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ public class WxBuildingInfoController extends BaseController
|
|||
@ApiOperation(ApiTerminal.wxMiniProgram+"获取球场列表")
|
||||
@ResponseBody
|
||||
public TableDataInfo getBuildingByCity(@RequestBody WxBuildingInfo entity){
|
||||
startPage();
|
||||
List<WxBuildingInfo> list = wxBuildingInfoService.getBuildingByCity(entity);
|
||||
return getDataTable(list);
|
||||
|
||||
|
|
@ -191,6 +192,7 @@ public class WxBuildingInfoController extends BaseController
|
|||
@ResponseBody
|
||||
@ApiOperation(value = ApiTerminal.wxMiniProgram+"分页获取球场列表")
|
||||
public TableDataInfo getAllBuildingByCondition(@RequestBody BuildingInfoRequest entity){
|
||||
startPage();
|
||||
List<BuildingInfoResponse> list =wxBuildingInfoService.getAllBuildingByCondition(entity);
|
||||
for(BuildingInfoResponse response:list){
|
||||
if(1==response.getStatus()){
|
||||
|
|
|
|||
|
|
@ -120,6 +120,23 @@ public class WxUserController extends BaseController
|
|||
return toAjax(wxUserService.deleteWxUserByIds(ids));
|
||||
}
|
||||
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"根据用户id修改个人数据")
|
||||
@PostMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editInfo(@RequestBody WxUser wxUser)
|
||||
{
|
||||
return AjaxResult.success(wxUserService.updateWxUser(wxUser));
|
||||
}
|
||||
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"根据用户手机号查询个人数据")
|
||||
@PostMapping(value = "/getUserInfoBy")
|
||||
@ResponseBody
|
||||
public AjaxResult getUserInfoBy(@RequestBody WxUser wxUser)
|
||||
{
|
||||
return AjaxResult.success(wxUserService.getUserInfoBy(wxUser));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(ApiTerminal.wxMiniProgram+"根据用户id查询个人中心详情")
|
||||
@PostMapping("/detail/{userId}")
|
||||
@ResponseBody
|
||||
|
|
|
|||
|
|
@ -31,6 +31,16 @@ public class CompetitionMembersScore extends BaseEntity
|
|||
@Excel(name = "赛程id(competition_team_vs_team的ID)")
|
||||
private Long competitionVsId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "参赛人员记录id(competition_members的ID)", required = false)
|
||||
@Excel(name = "competition_members_id")
|
||||
private Long competitionMembersId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "competition_of_team_id(competition_of_team的主键ID)", required = false)
|
||||
@Excel(name = "competition_of_team_id")
|
||||
private Long competitionOfTeamId;
|
||||
|
||||
/** 球队ID */
|
||||
@Excel(name = "球队ID")
|
||||
private Long teamId;
|
||||
|
|
|
|||
|
|
@ -65,11 +65,11 @@ public class CompetitionOfTeam extends BaseEntity
|
|||
private Long isDeleted;
|
||||
|
||||
/** 联系人 */
|
||||
@Excel(name = "联系人")
|
||||
@Excel(name = "领队人")
|
||||
private String contacts;
|
||||
|
||||
/** 联系人电话 */
|
||||
@Excel(name = "联系人电话")
|
||||
@Excel(name = "领队人电话")
|
||||
private String contactsTel;
|
||||
|
||||
/** 联系人电话区号 */
|
||||
|
|
@ -79,5 +79,9 @@ public class CompetitionOfTeam extends BaseEntity
|
|||
/** 组内的序号 */
|
||||
@Excel(name = "组内的序号")
|
||||
private Integer serialNumber;
|
||||
@Excel(name = "球队logo")
|
||||
private String teamLogo;
|
||||
@Excel(name = "球队队长")
|
||||
private String captain;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ public class CompetitionResult extends BaseEntity
|
|||
@Excel(name = "赛程id(competition_team_vs_team的ID)")
|
||||
private Long competitionVsId;
|
||||
|
||||
@ApiModelProperty(value = "competition_of_team表的主键ID", required = false)
|
||||
private Long competitionOfTeamId;
|
||||
/** 球队ID */
|
||||
@Excel(name = "球队ID")
|
||||
private Long teamId;
|
||||
|
|
@ -98,7 +100,9 @@ public class CompetitionResult extends BaseEntity
|
|||
private Integer integral;
|
||||
@ApiModelProperty(value = "比赛结果", required = false)
|
||||
private String vsResult;
|
||||
|
||||
@ApiModelProperty(value = "比赛类型:0=循环赛,1=淘汰赛", required = false)
|
||||
private String vsType;
|
||||
@ApiModelProperty(value = "比赛总分", required = false)
|
||||
private Integer totalScore;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
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_share_permissions
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
@Data
|
||||
public class CompetitionSharePermissions extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 赛事id(competition的ID) */
|
||||
@Excel(name = "赛事id(competition的ID)")
|
||||
private Long competitionId;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 用户手机号 */
|
||||
@Excel(name = "用户手机号")
|
||||
private String userTel;
|
||||
|
||||
/** 用户姓名 */
|
||||
@Excel(name = "用户姓名")
|
||||
private String userName;
|
||||
|
||||
/** 状态(sys_data_status) */
|
||||
@Excel(name = "状态(sys_data_status)")
|
||||
private Long status;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
/** 能操作的功能 */
|
||||
@Excel(name = "能操作的功能")
|
||||
private String canSetType;
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import org.springframework.util.StringUtils;
|
|||
|
||||
public enum VsResultEnums {
|
||||
win("win", "胜"),
|
||||
flat("flat","平"),
|
||||
fail("fail", "负");
|
||||
|
||||
private String code;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.system.domain.CompetitionSharePermissions;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 吴一博
|
||||
* @date 2023年07月20日 17:47
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class CompetitionSharePermissionsVo {
|
||||
@ApiModelProperty(name = "赛事id(competition的ID)")
|
||||
private Long competitionId;
|
||||
@ApiModelProperty(name = "分享的人")
|
||||
List<CompetitionSharePermissions> sharePermissionList;
|
||||
}
|
||||
|
|
@ -11,10 +11,13 @@ import java.io.Serializable;
|
|||
*/
|
||||
@Data
|
||||
public class CompetitionTeamIntegralVo implements Serializable {
|
||||
private Long competitionId;
|
||||
private String teamName;
|
||||
private String teamLogo;
|
||||
private Integer win;
|
||||
private Integer fail;
|
||||
private Integer totalScore;
|
||||
private Integer integral;
|
||||
private String vsType;
|
||||
private String competitionGroup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,11 @@ public class CompetitionTeamVsTeamVo extends CompetitionTeamVsTeam {
|
|||
|
||||
@ApiModelProperty(value = "客队logo", required = false)
|
||||
private String guestTeamLogo;
|
||||
@ApiModelProperty(value = "客队队长openid", required = false)
|
||||
private String guestTeamOpenId;
|
||||
|
||||
@ApiModelProperty(value = "主队队长openid", required = false)
|
||||
private String mainTeamOpenId;
|
||||
@ApiModelProperty(value = "中文状态", required = false)
|
||||
private String statusName;
|
||||
@ApiModelProperty(value = "比赛日期", required = false)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.ruoyi.system.domain.vo;
|
|||
import com.ruoyi.system.domain.Competition;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
|
@ -16,4 +19,6 @@ public class CompetitionVo extends Competition {
|
|||
|
||||
@ApiModelProperty(value = "短信验证码", required = false)
|
||||
private String captcha;
|
||||
@ApiModelProperty(value = "赛会ID集合", required = false)
|
||||
private List<Long> competitionIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* guocai
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class Ids {
|
||||
|
||||
private String ids;
|
||||
/**
|
||||
* 前端传的ids 数组
|
||||
*/
|
||||
private List<Long> idList;
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 吴一博
|
||||
* @date 2023年07月19日 18:27
|
||||
* @Description
|
||||
*/
|
||||
@Data
|
||||
public class competitionTeamIntegralRankingVo {
|
||||
private String competitionGroup;
|
||||
public List<CompetitionTeamIntegralVo> integralList;
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package com.ruoyi.system.job;
|
||||
import com.ruoyi.system.domain.Competition;
|
||||
import com.ruoyi.system.domain.CompetitionTeamVsTeam;
|
||||
import com.ruoyi.system.domain.enums.CompetitionStatusEnum;
|
||||
import com.ruoyi.system.domain.enums.WxAppletsTemplateIdsEnum;
|
||||
import com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo;
|
||||
import com.ruoyi.system.domain.vo.TemplateDataVo;
|
||||
import com.ruoyi.system.domain.vo.WxMssVo;
|
||||
import com.ruoyi.system.service.ICompetitionService;
|
||||
import com.ruoyi.system.service.ICompetitionTeamVsTeamService;
|
||||
import com.ruoyi.system.service.WxAppletsService;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class CompetitionJobHandler {
|
||||
@Resource
|
||||
private ICompetitionService competitionService;
|
||||
|
||||
@Resource
|
||||
private ICompetitionTeamVsTeamService competitionTeamVsTeamService;
|
||||
|
||||
@Resource
|
||||
private WxAppletsService wxAppletsService;
|
||||
|
||||
/** 赛会状态修改
|
||||
* 根据比赛时间修改比赛完成-定时任务
|
||||
* @param param
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@XxlJob("competitionFinishJob")
|
||||
public ReturnT<String> execute(String param) throws Exception {
|
||||
competitionService.updateCompetitionFinish();
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据比赛时间修改比赛-队长完成-定时任务
|
||||
* @param param
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@XxlJob("competitionVsFinishJob")
|
||||
public ReturnT<String> competitionVsFinishJob(String param) throws Exception {
|
||||
CompetitionTeamVsTeam competitionTeamVsTeam = new CompetitionTeamVsTeam();
|
||||
competitionTeamVsTeamService.competitionVsTeamStatusUpdate(competitionTeamVsTeam);
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
/**
|
||||
* 根据 球队VS球队 推送给队长-定时任务
|
||||
* @param param
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@XxlJob("pushScheduleTeamVsTeamJob")
|
||||
public ReturnT<String> pushScheduleTeamVsTeamJob(String param) throws Exception {
|
||||
CompetitionTeamVsTeam competitionTeamVsTeam=new CompetitionTeamVsTeam();
|
||||
competitionTeamVsTeam.setIsDeleted(0);
|
||||
List<CompetitionTeamVsTeamVo> list = competitionTeamVsTeamService.getTodaySchedule(competitionTeamVsTeam);
|
||||
//循环推送消息
|
||||
for (CompetitionTeamVsTeamVo vo : list) {
|
||||
//主队
|
||||
if(!StringUtils.isEmpty(vo)&&!StringUtils.isEmpty(vo.getMainTeamOpenId())) {
|
||||
// Competition competition = competitionService.getById(vo.getCompetitionId());
|
||||
WxMssVo wxMssVo = new WxMssVo();
|
||||
wxMssVo.setTemplate_id(WxAppletsTemplateIdsEnum.COMPETITION_COURSE_REMIND.getCode());
|
||||
wxMssVo.setTouser(vo.getMainTeamOpenId());
|
||||
Map<String, TemplateDataVo> map = new HashMap<>();
|
||||
map.put("thing1", new TemplateDataVo(vo.getMainTeamName()+" VS "+vo.getGuestTeamName()));
|
||||
map.put("thing2", new TemplateDataVo(vo.getCompetitionDate() +" " +vo.getTheTime()));
|
||||
map.put("thing3", new TemplateDataVo(vo.getVsType()));
|
||||
map.put("thing4", new TemplateDataVo("你的球队今天有比赛哦,快去为自己的球队冲榜"));
|
||||
wxMssVo.setData(map);
|
||||
wxAppletsService.pushOneUser(wxMssVo);
|
||||
}
|
||||
//客队
|
||||
if(!StringUtils.isEmpty(vo)&&!StringUtils.isEmpty(vo.getGuestTeamOpenId())) {
|
||||
// Competition competition = competitionService.getById(vo.getCompetitionId());
|
||||
WxMssVo wxMssVo = new WxMssVo();
|
||||
wxMssVo.setTemplate_id(WxAppletsTemplateIdsEnum.COMPETITION_COURSE_REMIND.getCode());
|
||||
wxMssVo.setTouser(vo.getGuestTeamOpenId());
|
||||
Map<String, TemplateDataVo> map = new HashMap<>();
|
||||
map.put("thing1", new TemplateDataVo(vo.getMainTeamName()+" VS "+vo.getGuestTeamName()));
|
||||
map.put("thing2", new TemplateDataVo(vo.getCompetitionDate() +" " +vo.getTheTime()));
|
||||
map.put("thing3", new TemplateDataVo(vo.getVsType()));
|
||||
map.put("thing4", new TemplateDataVo("你的球队今天有比赛哦,快去为自己的球队冲榜"));
|
||||
wxMssVo.setData(map);
|
||||
wxAppletsService.pushOneUser(wxMssVo);
|
||||
}
|
||||
}
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
|
@ -66,4 +66,6 @@ public interface CompetitionMapper
|
|||
CompetitionExcleVo getTeamEnrollExcleImpData(Long competitionId, Long userId);
|
||||
|
||||
List<Competition> getMyJoinCompetition(CompetitionVo competition);
|
||||
|
||||
int updateCompetitionFinish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,4 +74,6 @@ public interface CompetitionOfTeamMapper
|
|||
CompetitionOfTeam selectOneByUserId(@Param("competitionId") Long competitionId,@Param("userId") String userId);
|
||||
|
||||
List<CompetitionOfTeamVo> getJoinCompetitionGroupTeam(CompetitionOfTeam ofTeam);
|
||||
|
||||
List<CompetitionOfTeamVo> getMyJoinCompetitionTeam(CompetitionOfTeamVo entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.CompetitionSharePermissions;
|
||||
|
||||
/**
|
||||
* 赛会-权限分享Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public interface CompetitionSharePermissionsMapper
|
||||
{
|
||||
/**
|
||||
* 查询赛会-权限分享
|
||||
*
|
||||
* @param id 赛会-权限分享主键
|
||||
* @return 赛会-权限分享
|
||||
*/
|
||||
public CompetitionSharePermissions selectCompetitionSharePermissionsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询赛会-权限分享列表
|
||||
*
|
||||
* @param competitionSharePermissions 赛会-权限分享
|
||||
* @return 赛会-权限分享集合
|
||||
*/
|
||||
public List<CompetitionSharePermissions> selectCompetitionSharePermissionsList(CompetitionSharePermissions competitionSharePermissions);
|
||||
|
||||
/**
|
||||
* 新增赛会-权限分享
|
||||
*
|
||||
* @param competitionSharePermissions 赛会-权限分享
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCompetitionSharePermissions(CompetitionSharePermissions competitionSharePermissions);
|
||||
|
||||
/**
|
||||
* 修改赛会-权限分享
|
||||
*
|
||||
* @param competitionSharePermissions 赛会-权限分享
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCompetitionSharePermissions(CompetitionSharePermissions competitionSharePermissions);
|
||||
|
||||
/**
|
||||
* 删除赛会-权限分享
|
||||
*
|
||||
* @param id 赛会-权限分享主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompetitionSharePermissionsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除赛会-权限分享
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompetitionSharePermissionsByIds(Long[] ids);
|
||||
|
||||
List<CompetitionSharePermissions> getList(CompetitionSharePermissions competitionSharePermissions);
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
import com.ruoyi.system.domain.CompetitionTeamVsTeam;
|
||||
import com.ruoyi.system.domain.vo.CompetitionTeamIntegralVo;
|
||||
import com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo;
|
||||
import com.ruoyi.system.service.ICompetitionResultService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
|
|
@ -75,5 +76,9 @@ public interface CompetitionTeamVsTeamMapper
|
|||
|
||||
List<CompetitionTeamVsTeamVo> getLatelySchedule(CompetitionTeamVsTeam competitionTeamVsTeam);
|
||||
|
||||
List<CompetitionTeamIntegralVo> getCompetitionTeamIntegralListById(@Param("id") Long id);
|
||||
List<CompetitionTeamIntegralVo> getCompetitionTeamIntegralListById(CompetitionTeamIntegralVo vo);
|
||||
|
||||
int competitionVsTeamStatusUpdate(CompetitionTeamVsTeam competitionTeamVsTeam);
|
||||
|
||||
List<CompetitionTeamVsTeamVo> getTodaySchedule(ICompetitionResultService competitionResultService);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,4 +60,6 @@ public interface UserRoleMapper
|
|||
public int deleteUserRoleByIds(Long[] ids);
|
||||
|
||||
UserRole selectByCode(String roleCode);
|
||||
|
||||
List<UserRole> selectRoleByUserId(Long userid);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,4 +63,6 @@ public interface WxUserMapper
|
|||
WxUser selectByOpenId(String openId);
|
||||
|
||||
List<WxUser> listByIds(@Param("userIds") List<Long> userIds);
|
||||
|
||||
WxUser getUserInfoBy(WxUser wxUser);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,4 +80,6 @@ public interface ICompetitionOfTeamService
|
|||
Boolean edit(CompetitionOfTeam entity);
|
||||
|
||||
List<CompetitionOfTeamVo> getJoinCompetitionGroupTeam(CompetitionOfTeam ofTeam);
|
||||
|
||||
List<CompetitionOfTeamVo> getMyJoinCompetitionTeam(CompetitionOfTeamVo entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,4 +87,6 @@ public interface ICompetitionService
|
|||
Boolean edit(Competition entity);
|
||||
|
||||
CompetitionExcleVo importExcleData(Long competitionId,Map<String, PictureData> maplist, Sheet sheet);
|
||||
//根据当前时间修改已经完成的赛会数据
|
||||
int updateCompetitionFinish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.CompetitionSharePermissions;
|
||||
import com.ruoyi.system.domain.vo.CompetitionSharePermissionsVo;
|
||||
|
||||
/**
|
||||
* 赛会-权限分享Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
public interface ICompetitionSharePermissionsService
|
||||
{
|
||||
/**
|
||||
* 查询赛会-权限分享
|
||||
*
|
||||
* @param id 赛会-权限分享主键
|
||||
* @return 赛会-权限分享
|
||||
*/
|
||||
public CompetitionSharePermissions selectCompetitionSharePermissionsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询赛会-权限分享列表
|
||||
*
|
||||
* @param competitionSharePermissions 赛会-权限分享
|
||||
* @return 赛会-权限分享集合
|
||||
*/
|
||||
public List<CompetitionSharePermissions> selectCompetitionSharePermissionsList(CompetitionSharePermissions competitionSharePermissions);
|
||||
|
||||
/**
|
||||
* 新增赛会-权限分享
|
||||
*
|
||||
* @param competitionSharePermissions 赛会-权限分享
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCompetitionSharePermissions(CompetitionSharePermissions competitionSharePermissions);
|
||||
|
||||
/**
|
||||
* 修改赛会-权限分享
|
||||
*
|
||||
* @param competitionSharePermissions 赛会-权限分享
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCompetitionSharePermissions(CompetitionSharePermissions competitionSharePermissions);
|
||||
|
||||
/**
|
||||
* 批量删除赛会-权限分享
|
||||
*
|
||||
* @param ids 需要删除的赛会-权限分享主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompetitionSharePermissionsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除赛会-权限分享信息
|
||||
*
|
||||
* @param id 赛会-权限分享主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCompetitionSharePermissionsById(Long id);
|
||||
|
||||
Boolean shareCompetitionPermissions(CompetitionSharePermissions vo);
|
||||
|
||||
Boolean delShareCompetitionPermissions(Long[] ids);
|
||||
|
||||
List<CompetitionSharePermissions> getList(CompetitionSharePermissions competitionSharePermissions);
|
||||
}
|
||||
|
|
@ -69,9 +69,15 @@ public interface ICompetitionTeamVsTeamService
|
|||
|
||||
Map<String, List<CompetitionTeamVsTeamVo>> getCompetitionSchedule(CompetitionTeamVsTeam entity);
|
||||
|
||||
List<CompetitionTeamIntegralVo> getCompetitionTeamIntegralListById(Long id);
|
||||
List<CompetitionTeamIntegralVo> getCompetitionTeamIntegralListById(CompetitionTeamIntegralVo vo);
|
||||
|
||||
Boolean competitionScheduleSubmit(List<CompetitionTeamVsTeamRequest> vsTeamRequestList);
|
||||
|
||||
Boolean competitionScoreSubmit(List<CompetitionResult> request);
|
||||
|
||||
Boolean deleteBatchByIds(Ids ids);
|
||||
|
||||
int competitionVsTeamStatusUpdate(CompetitionTeamVsTeam competitionTeamVsTeam);
|
||||
|
||||
List<CompetitionTeamVsTeamVo> getTodaySchedule(CompetitionTeamVsTeam competitionTeamVsTeam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ public interface IUserRoleService
|
|||
*/
|
||||
public int insertUserRole(UserRole userRole);
|
||||
|
||||
List<UserRole> selectRoleByUserId(Long userid);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
|
|
|
|||
|
|
@ -58,4 +58,6 @@ public interface IWxUserService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteWxUserById(Long id);
|
||||
|
||||
WxUser getUserInfoBy(WxUser wxUser);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,4 +144,12 @@ public class CompetitionOfTeamServiceImpl implements ICompetitionOfTeamService
|
|||
public List<CompetitionOfTeamVo> getJoinCompetitionGroupTeam(CompetitionOfTeam ofTeam) {
|
||||
return competitionOfTeamMapper.getJoinCompetitionGroupTeam(ofTeam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CompetitionOfTeamVo> getMyJoinCompetitionTeam(CompetitionOfTeamVo entity) {
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
entity.setUserId(user.getUserid());
|
||||
List<CompetitionOfTeamVo> list=competitionOfTeamMapper.getMyJoinCompetitionTeam(entity);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ public class CompetitionResultServiceImpl implements ICompetitionResultService
|
|||
CompetitionResultVo team = obj.getMainTeam();
|
||||
team.setCompetitionId(obj.getTeamVsTeamVo().getCompetitionId());
|
||||
team.setCompetitionVsId(obj.getTeamVsTeamVo().getId());
|
||||
team.setTeamId(obj.getTeamVsTeamVo().getMainTeamId());
|
||||
team.setCompetitionOfTeamId(obj.getTeamVsTeamVo().getMainTeamId());
|
||||
team.setTeamName(obj.getTeamVsTeamVo().getMainTeamName());
|
||||
competitionResultMapper.insertCompetitionResult(team);
|
||||
}else {
|
||||
|
|
@ -139,7 +139,7 @@ public class CompetitionResultServiceImpl implements ICompetitionResultService
|
|||
CompetitionResultVo team = obj.getGuestTeam();
|
||||
team.setCompetitionId(obj.getTeamVsTeamVo().getCompetitionId());
|
||||
team.setCompetitionVsId(obj.getTeamVsTeamVo().getId());
|
||||
team.setTeamId(obj.getTeamVsTeamVo().getGuestTeamId());
|
||||
team.setCompetitionOfTeamId(obj.getTeamVsTeamVo().getGuestTeamId());
|
||||
team.setTeamName(obj.getTeamVsTeamVo().getGuestTeamName());
|
||||
competitionResultMapper.insertCompetitionResult(team);
|
||||
}else {
|
||||
|
|
@ -156,9 +156,9 @@ public class CompetitionResultServiceImpl implements ICompetitionResultService
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean add(CompetitionResult entity) {
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
LoginUser user = new LoginUser();//SecurityUtils.getLoginUser();
|
||||
// entity.fillOperationInfo(user.getUserId().toString());
|
||||
entity.setCreatedBy(String.valueOf(user.getUserid()));
|
||||
// entity.setCreatedBy(String.valueOf(user.getUserid()));
|
||||
entity.setCreatedTime(new Date());
|
||||
competitionResultMapper.insertCompetitionResult(entity);
|
||||
this.calculateScore(entity,user);
|
||||
|
|
@ -204,7 +204,7 @@ public class CompetitionResultServiceImpl implements ICompetitionResultService
|
|||
//合计总分
|
||||
int score = oneNodeScore+twoNodeScore+threeNodeScore+fourNodeScore+fiveNodeScore+sixNodeScore;
|
||||
//主队
|
||||
if(teamVsTeam.getMainTeamId().equals(competitionResult.getTeamId())){
|
||||
if(teamVsTeam.getMainTeamId().equals(competitionResult.getCompetitionOfTeamId())){
|
||||
mainId = competitionResult.getId();
|
||||
mainScore = score;
|
||||
teamVsTeam.setMainTeamScore(score);
|
||||
|
|
@ -213,13 +213,13 @@ public class CompetitionResultServiceImpl implements ICompetitionResultService
|
|||
gustScore = score;
|
||||
teamVsTeam.setGuestTeamScore(score);
|
||||
//客队标识
|
||||
if(entity.getTeamId()==competitionResult.getTeamId()){
|
||||
if(entity.getCompetitionOfTeamId()==competitionResult.getCompetitionOfTeamId()){
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
|
||||
//设置更新人
|
||||
teamVsTeam.setModifiedBy(String.valueOf(user.getUserid()));
|
||||
//teamVsTeam.setModifiedBy(String.valueOf(user.getUserid()));
|
||||
teamVsTeam.setLastUpdatedTime(new Date());
|
||||
competitionTeamVsTeamMapper.updateCompetitionTeamVsTeam(teamVsTeam);
|
||||
}
|
||||
|
|
@ -266,7 +266,7 @@ public class CompetitionResultServiceImpl implements ICompetitionResultService
|
|||
}
|
||||
}
|
||||
}
|
||||
entity.setModifiedBy(String.valueOf(user.getUserid()));
|
||||
//entity.setModifiedBy(String.valueOf(user.getUserid()));
|
||||
entity.setLastUpdatedTime(new Date());
|
||||
competitionResultMapper.updateCompetitionResult(entity);
|
||||
}
|
||||
|
|
@ -274,8 +274,8 @@ public class CompetitionResultServiceImpl implements ICompetitionResultService
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean edit(CompetitionResult entity) {
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
entity.setModifiedBy(String.valueOf(user.getUserid()));
|
||||
LoginUser user = new LoginUser();
|
||||
// entity.setModifiedBy(String.valueOf(user.getUserid()));
|
||||
entity.setLastUpdatedTime(new Date());
|
||||
competitionResultMapper.updateCompetitionResult(entity);
|
||||
this.calculateScore(entity,user);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import java.util.concurrent.TimeUnit;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.crypto.digest.DigestUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
|
@ -343,17 +344,6 @@ public class CompetitionServiceImpl implements ICompetitionService
|
|||
|
||||
@Override
|
||||
public List<Competition> getMyJoinCompetition(CompetitionVo competition) {
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
//查询登录用户的系统角色
|
||||
List<UserRole> userRoles = userRoleMapper.selectUserRoleList(UserRole.builder().roleCode(UserRoles.ADMIN.code()).build());
|
||||
if(!StringUtils.isEmpty(userRoles) && userRoles.size()>0) {
|
||||
List<Long> userIds = userRoles.stream().map(UserRole::getUserId).collect(Collectors.toList());
|
||||
//如果是管理员就直接可以查看所有的赛事
|
||||
if (userIds.contains(user.getUserid())) {
|
||||
competition.setUserId(null);
|
||||
competition.setFounder(null);
|
||||
}
|
||||
}
|
||||
List<Competition> list=competitionMapper.getMyJoinCompetition(competition);
|
||||
for (Competition comp:list){
|
||||
if(competition.getCompetitionNature()==0){
|
||||
|
|
@ -480,7 +470,7 @@ public class CompetitionServiceImpl implements ICompetitionService
|
|||
if (StringUtils.isEmpty(competitionCode)) {
|
||||
throw new CheckedException("赛事编码不能为空");
|
||||
}
|
||||
System.out.println("赛事编码" + competitionCode);
|
||||
log.info("开始导入-->赛事编码:" + competitionCode);
|
||||
Row row5 = sheet.getRow(5);
|
||||
Cell cell5_1 = row5.getCell(0);
|
||||
if (cell5_1 == null) {
|
||||
|
|
@ -539,6 +529,10 @@ public class CompetitionServiceImpl implements ICompetitionService
|
|||
if (StringUtils.isEmpty(teamUserNum)) {
|
||||
throw new CheckedException("球队人数不能为空");
|
||||
}
|
||||
//todo 校验是否是整数
|
||||
if(!NumberUtil.isInteger(teamUserNum)){
|
||||
throw new CheckedException("球队人数必须是正整数");
|
||||
}
|
||||
//todo 获取到数据后,开始保存数据
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
String userId = null;
|
||||
|
|
@ -622,12 +616,20 @@ public class CompetitionServiceImpl implements ICompetitionService
|
|||
cell = row.getCell(4);
|
||||
if (cell != null) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
//todo 校验是否是整数
|
||||
if(!NumberUtil.isInteger(cell.getStringCellValue())){
|
||||
throw new CheckedException(membersVo.getRealName()+" 的身高必须是正整数");
|
||||
}
|
||||
membersVo.setHeight(new BigDecimal(cell.getStringCellValue()));
|
||||
}
|
||||
//体重
|
||||
cell = row.getCell(5);
|
||||
if (cell != null) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
//todo 校验是否是整数
|
||||
if(!NumberUtil.isInteger(cell.getStringCellValue())){
|
||||
throw new CheckedException(membersVo.getRealName()+" 的体重必须是正整数");
|
||||
}
|
||||
membersVo.setWeight(new BigDecimal(cell.getStringCellValue()));
|
||||
}
|
||||
//证件号码
|
||||
|
|
@ -688,4 +690,9 @@ public class CompetitionServiceImpl implements ICompetitionService
|
|||
}
|
||||
return excleVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateCompetitionFinish() {
|
||||
return competitionMapper.updateCompetitionFinish();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,134 @@
|
|||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.ruoyi.common.core.exception.CheckedException;
|
||||
import com.ruoyi.system.domain.vo.CompetitionSharePermissionsVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.CompetitionSharePermissionsMapper;
|
||||
import com.ruoyi.system.domain.CompetitionSharePermissions;
|
||||
import com.ruoyi.system.service.ICompetitionSharePermissionsService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 赛会-权限分享Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-07-20
|
||||
*/
|
||||
@Service
|
||||
public class CompetitionSharePermissionsServiceImpl implements ICompetitionSharePermissionsService
|
||||
{
|
||||
@Autowired
|
||||
private CompetitionSharePermissionsMapper competitionSharePermissionsMapper;
|
||||
|
||||
/**
|
||||
* 查询赛会-权限分享
|
||||
*
|
||||
* @param id 赛会-权限分享主键
|
||||
* @return 赛会-权限分享
|
||||
*/
|
||||
@Override
|
||||
public CompetitionSharePermissions selectCompetitionSharePermissionsById(Long id)
|
||||
{
|
||||
return competitionSharePermissionsMapper.selectCompetitionSharePermissionsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询赛会-权限分享列表
|
||||
*
|
||||
* @param competitionSharePermissions 赛会-权限分享
|
||||
* @return 赛会-权限分享
|
||||
*/
|
||||
@Override
|
||||
public List<CompetitionSharePermissions> selectCompetitionSharePermissionsList(CompetitionSharePermissions competitionSharePermissions)
|
||||
{
|
||||
return competitionSharePermissionsMapper.selectCompetitionSharePermissionsList(competitionSharePermissions);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增赛会-权限分享
|
||||
*
|
||||
* @param competitionSharePermissions 赛会-权限分享
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCompetitionSharePermissions(CompetitionSharePermissions competitionSharePermissions)
|
||||
{
|
||||
return competitionSharePermissionsMapper.insertCompetitionSharePermissions(competitionSharePermissions);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改赛会-权限分享
|
||||
*
|
||||
* @param competitionSharePermissions 赛会-权限分享
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCompetitionSharePermissions(CompetitionSharePermissions competitionSharePermissions)
|
||||
{
|
||||
return competitionSharePermissionsMapper.updateCompetitionSharePermissions(competitionSharePermissions);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除赛会-权限分享
|
||||
*
|
||||
* @param ids 需要删除的赛会-权限分享主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCompetitionSharePermissionsByIds(Long[] ids)
|
||||
{
|
||||
return competitionSharePermissionsMapper.deleteCompetitionSharePermissionsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除赛会-权限分享信息
|
||||
*
|
||||
* @param id 赛会-权限分享主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCompetitionSharePermissionsById(Long id)
|
||||
{
|
||||
return competitionSharePermissionsMapper.deleteCompetitionSharePermissionsById(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public Boolean shareCompetitionPermissions(CompetitionSharePermissions vo) {
|
||||
if(ObjectUtil.isNull(vo.getCompetitionId())){
|
||||
throw new CheckedException("competitionId不能为空");
|
||||
}if(ObjectUtil.isNull(vo.getUserId())){
|
||||
throw new CheckedException("userId不能为空");
|
||||
}if(ObjectUtil.isNull(vo.getUserTel())){
|
||||
throw new CheckedException("userTel不能为空");
|
||||
}
|
||||
CompetitionSharePermissions permissions= new CompetitionSharePermissions();
|
||||
permissions.setIsDeleted(0);
|
||||
permissions.setCompetitionId(vo.getCompetitionId());
|
||||
permissions.setUserTel(vo.getUserTel());
|
||||
permissions.setUserId(vo.getUserId());
|
||||
List<CompetitionSharePermissions> list = competitionSharePermissionsMapper.selectCompetitionSharePermissionsList(permissions);
|
||||
if(list.size()>0) {
|
||||
throw new CheckedException("手机号授权重复");
|
||||
}else {
|
||||
competitionSharePermissionsMapper.insertCompetitionSharePermissions(vo);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean delShareCompetitionPermissions(Long[] ids) {
|
||||
competitionSharePermissionsMapper.deleteCompetitionSharePermissionsByIds(ids);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CompetitionSharePermissions> getList(CompetitionSharePermissions competitionSharePermissions) {
|
||||
return competitionSharePermissionsMapper.getList(competitionSharePermissions);
|
||||
}
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ public class CompetitionTeamVsTeamServiceImpl implements ICompetitionTeamVsTeamS
|
|||
//组装队伍球员数据并排序
|
||||
if(competitionResultList!=null&&competitionResultList.size()>0){
|
||||
//组装主队数据
|
||||
List<CompetitionMembersScore> mainMembersScoreList = membersScoreList.stream().filter(CompetitionMembersScore -> CompetitionMembersScore.getTeamId()==competitionResultList.get(0).getTeamId()).collect(Collectors.toList());
|
||||
List<CompetitionMembersScore> mainMembersScoreList = membersScoreList.stream().filter(CompetitionMembersScore -> CompetitionMembersScore.getCompetitionOfTeamId()==competitionResultList.get(0).getCompetitionOfTeamId()).collect(Collectors.toList());
|
||||
//过滤首发球员
|
||||
List<CompetitionMembersScore> firstList = mainMembersScoreList.stream().filter(a -> a.getIsFirstLaunch() == 1).collect(Collectors.toList());
|
||||
firstList.sort((o1, o2) -> o2.getTotalScore().compareTo(o1.getTotalScore()));
|
||||
|
|
@ -150,7 +150,7 @@ public class CompetitionTeamVsTeamServiceImpl implements ICompetitionTeamVsTeamS
|
|||
competitionMembersScoreList.addAll(mainMembersScoreList);
|
||||
|
||||
//组装客队数据
|
||||
List<CompetitionMembersScore> gustMembersScoreList = membersScoreList.stream().filter(CompetitionMembersScore -> CompetitionMembersScore.getTeamId()==competitionResultList.get(1).getTeamId()).collect(Collectors.toList());
|
||||
List<CompetitionMembersScore> gustMembersScoreList = membersScoreList.stream().filter(CompetitionMembersScore -> CompetitionMembersScore.getCompetitionOfTeamId()==competitionResultList.get(1).getCompetitionOfTeamId()).collect(Collectors.toList());
|
||||
//过滤首发球员
|
||||
List<CompetitionMembersScore> gustFirstList = gustMembersScoreList.stream().filter(a -> a.getIsFirstLaunch() == 1).collect(Collectors.toList());
|
||||
gustFirstList.sort((o1, o2) -> o2.getTotalScore().compareTo(o1.getTotalScore()));
|
||||
|
|
@ -174,18 +174,18 @@ public class CompetitionTeamVsTeamServiceImpl implements ICompetitionTeamVsTeamS
|
|||
}
|
||||
//获取主队每节数据
|
||||
List<CompetitionResultVo> competitionResultList = competitionResultService.findByCompetitionVsId(competitionTeamVsTeamVo.getCompetitionId(),competitionTeamVsTeamVo.getId());
|
||||
Optional<CompetitionResultVo> main = competitionResultList.stream().filter(a -> a.getTeamId().equals(competitionTeamVsTeamVo.getMainTeamId())).findFirst();
|
||||
Optional<CompetitionResultVo> guest = competitionResultList.stream().filter(a -> a.getTeamId().equals(competitionTeamVsTeamVo.getGuestTeamId())).findFirst();
|
||||
Optional<CompetitionResultVo> main = competitionResultList.stream().filter(a -> a.getCompetitionOfTeamId().equals(competitionTeamVsTeamVo.getMainTeamId())).findFirst();
|
||||
Optional<CompetitionResultVo> guest = competitionResultList.stream().filter(a -> a.getCompetitionOfTeamId().equals(competitionTeamVsTeamVo.getGuestTeamId())).findFirst();
|
||||
List<CompetitionMembersScoreVo> membersScoreList = competitionMembersScoreMapper.findMembersScoreByCompetitionVsId(competitionTeamVsTeamVo.getCompetitionId(),competitionTeamVsTeamVo.getId());
|
||||
if(main.isPresent()){
|
||||
CompetitionResultVo resultVo = main.get();
|
||||
List<CompetitionMembersScoreVo> membersScores = membersScoreList.stream().filter(a -> a.getTeamId().equals(competitionTeamVsTeamVo.getMainTeamId())).collect(Collectors.toList());
|
||||
List<CompetitionMembersScoreVo> membersScores = membersScoreList.stream().filter(a -> a.getCompetitionOfTeamId().equals(competitionTeamVsTeamVo.getMainTeamId())).collect(Collectors.toList());
|
||||
resultVo.setMembersScoreList(membersScores);
|
||||
recordVo.setMainTeam(resultVo);
|
||||
}
|
||||
if(guest.isPresent()){
|
||||
CompetitionResultVo resultVo = guest.get();
|
||||
List<CompetitionMembersScoreVo> membersScores = membersScoreList.stream().filter(a -> a.getTeamId().equals(competitionTeamVsTeamVo.getGuestTeamId())).collect(Collectors.toList());
|
||||
List<CompetitionMembersScoreVo> membersScores = membersScoreList.stream().filter(a -> a.getCompetitionOfTeamId().equals(competitionTeamVsTeamVo.getGuestTeamId())).collect(Collectors.toList());
|
||||
resultVo.setMembersScoreList(membersScores);
|
||||
recordVo.setGuestTeam(resultVo);
|
||||
}
|
||||
|
|
@ -208,8 +208,8 @@ public class CompetitionTeamVsTeamServiceImpl implements ICompetitionTeamVsTeamS
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<CompetitionTeamIntegralVo> getCompetitionTeamIntegralListById(Long id) {
|
||||
return competitionTeamVsTeamMapper.getCompetitionTeamIntegralListById(id);
|
||||
public List<CompetitionTeamIntegralVo> getCompetitionTeamIntegralListById(CompetitionTeamIntegralVo vo) {
|
||||
return competitionTeamVsTeamMapper.getCompetitionTeamIntegralListById(vo);
|
||||
}
|
||||
@Transactional
|
||||
@Override
|
||||
|
|
@ -292,4 +292,21 @@ public class CompetitionTeamVsTeamServiceImpl implements ICompetitionTeamVsTeamS
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteBatchByIds(Ids ids) {
|
||||
Long[] idList = ids.getIdList().stream().toArray(Long[]::new);
|
||||
competitionTeamVsTeamMapper.deleteCompetitionTeamVsTeamByIds(idList);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int competitionVsTeamStatusUpdate(CompetitionTeamVsTeam competitionTeamVsTeam) {
|
||||
return competitionTeamVsTeamMapper.competitionVsTeamStatusUpdate(competitionTeamVsTeam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CompetitionTeamVsTeamVo> getTodaySchedule(CompetitionTeamVsTeam competitionTeamVsTeam) {
|
||||
return competitionTeamVsTeamMapper.getTodaySchedule(competitionResultService);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ public class UserRoleServiceImpl implements IUserRoleService
|
|||
return userRoleMapper.insertUserRole(userRole);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserRole> selectRoleByUserId(Long userid) {
|
||||
return userRoleMapper.selectRoleByUserId(userid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
|
|
|
|||
|
|
@ -74,12 +74,12 @@ public class WxAppletsServiceImpl implements WxAppletsService {
|
|||
JSONObject myJson = JSONObject.parseObject(json);
|
||||
log.info("获取AccessToken={}", JSON.toJSONString(myJson));
|
||||
//保存到缓存
|
||||
accessToken = myJson.get("access_token").toString();
|
||||
accessToken = String.valueOf(myJson.get("access_token"));
|
||||
Long expires_in=myJson.getLong("expires_in");
|
||||
redisService.setCacheObject(Constants.WX_APPLETS_REDIS_ACCESS_TOKEN_KEY,accessToken,expires_in-100, TimeUnit.SECONDS);
|
||||
return accessToken;
|
||||
}else {
|
||||
return (String) redisService.getCacheObject(Constants.WX_APPLETS_REDIS_ACCESS_TOKEN_KEY);
|
||||
return redisService.getCacheObject(Constants.WX_APPLETS_REDIS_ACCESS_TOKEN_KEY);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
|
@ -161,12 +162,11 @@ public class WxBuildingInfoServiceImpl implements IWxBuildingInfoService
|
|||
@Override
|
||||
public List<WxBuildingInfo> getAuditPage(WxBuildingInfo buildingInfo) {
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
System.out.println("user="+ JSON.toJSONString(user));
|
||||
// System.out.println("user="+ JSON.toJSONString(user));
|
||||
// 查询当前登录的用户的系统角色
|
||||
List<UserRole> userRoles = userRoleMapper.selectUserRoleList(UserRole.builder().userId(user.getUserid()).build());
|
||||
Set<String> userRoles = user.getRoles();//userRoleMapper.selectUserRoleList(UserRole.builder().userId(user.getUserid()).build());
|
||||
if(!StringUtils.isEmpty(userRoles)&&userRoles.size()>0){
|
||||
List<String> roleCodes = userRoles.stream().map(UserRole::getRoleCode).collect(Collectors.toList());
|
||||
if(roleCodes.contains("admin")){
|
||||
if(userRoles.contains("admin")){
|
||||
//查询所有
|
||||
buildingInfo.setCreatedId(null);
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -90,4 +90,9 @@ public class WxUserServiceImpl implements IWxUserService
|
|||
{
|
||||
return wxUserMapper.deleteWxUserById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxUser getUserInfoBy(WxUser wxUser) {
|
||||
return wxUserMapper.getUserInfoBy(wxUser);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 10.0.1.91:30005
|
||||
server-addr: 182.43.49.98:30005
|
||||
namespace: prod
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 10.0.1.91:30005
|
||||
server-addr: 182.43.49.98:30005
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
namespace: prod
|
||||
|
|
|
|||
|
|
@ -207,7 +207,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="userId != null ">
|
||||
AND EXISTS (select 1 from competition_members c WHERE c.user_id=#{userId} and t.id=c.competition_id)
|
||||
</if>
|
||||
order by t.competition_time desc
|
||||
<if test="competitionIds != null and competitionIds.size() > 0">
|
||||
union
|
||||
select * from competition t where 1=1
|
||||
<if test="competitionIds != null and competitionIds.size() > 0">
|
||||
and t.id in
|
||||
<foreach collection="competitionIds" item="competitionId" open=" (" separator="," close=")">
|
||||
#{competitionId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
AND t.status =#{status}
|
||||
</if>
|
||||
<if test="competitionNature != null ">
|
||||
AND t.competition_nature =#{competitionNature}
|
||||
</if>
|
||||
<if test="cityCode != null and cityCode != ''">
|
||||
AND t.city_code like CONCAT('%',#{cityCode},'%')
|
||||
</if>
|
||||
<if test="cityName != null and cityName != ''">
|
||||
AND t.city_name like CONCAT('%',#{cityName},'%')
|
||||
</if>
|
||||
<if test="mainTeamName != null and mainTeamName != ''">
|
||||
AND t.main_team_name like CONCAT('%',#{mainTeamName},'%')
|
||||
</if>
|
||||
<if test="guestTeamName != null and guestTeamName != ''">
|
||||
AND t.guest_team_name like CONCAT('%',#{guestTeamName},'%')
|
||||
</if>
|
||||
<if test="designated != null ">
|
||||
AND t.designated=#{designated}
|
||||
</if>
|
||||
<if test="competitionAddress != null and competitionAddress != '' ">
|
||||
AND t.competition_address like CONCAT('%',#{competitionAddress},'%')
|
||||
</if>
|
||||
<if test="buildingName != null and buildingName != '' ">
|
||||
AND t.building_name like CONCAT('%',#{buildingName},'%')
|
||||
</if>
|
||||
<if test="id != null ">
|
||||
AND t.id=#{id}
|
||||
</if>
|
||||
<if test="auditStatus != null ">
|
||||
AND t.audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="isDeleted != null ">
|
||||
AND t.is_deleted = #{isDeleted}
|
||||
</if>
|
||||
<if test="word != null and word != ''">
|
||||
AND (t.main_team_name like CONCAT('%',#{word},'%')
|
||||
or t.guest_team_name like CONCAT('%',#{word},'%')
|
||||
or t.building_name like CONCAT('%',#{word},'%')
|
||||
or t.competition_address like CONCAT('%',#{word},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
AND EXISTS (select 1 from competition_members c WHERE c.user_id=#{userId} and t.id=c.competition_id)
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertCompetition" parameterType="Competition" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
@ -344,6 +399,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateCompetitionFinish">
|
||||
update competition set status = 2 where status <> 2 and competition_end_time <![CDATA[ <= ]]> now()
|
||||
</update>
|
||||
|
||||
<delete id="deleteCompetitionById" parameterType="Long">
|
||||
delete from competition where id = #{id}
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</update>
|
||||
<update id="bindCompetitionMembersByTel">
|
||||
update competition_members set user_id = #{userId} where contacts_tel = #{contactsTel}
|
||||
update competition_members set user_id = #{userId} where contacts_tel = #{telephone}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCompetitionMembersById" parameterType="Long">
|
||||
|
|
|
|||
|
|
@ -32,10 +32,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="isDeleted" column="is_deleted" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="isFirstLaunch" column="is_first_launch" />
|
||||
<result property="competitionMembersId" column="competition_members_id"/>
|
||||
<result property="competitionOfTeamId" column="competition_of_team_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCompetitionMembersScoreVo">
|
||||
select id, competition_id, competition_vs_id, team_id, team_name, node_num, team_user_id, jersey_number, total_score, two_points, three_points, penalty, backboard, front_plate, back_plate, assists, snatch, block, fault, breaks, created_time, last_updated_time, created_by, modified_by, is_deleted, remark, is_first_launch from competition_members_score
|
||||
select id, competition_id, competition_vs_id, team_id, team_name, node_num, team_user_id, jersey_number, total_score, two_points, three_points, penalty, backboard, front_plate, back_plate, assists, snatch, block, fault, breaks, created_time, last_updated_time, created_by, modified_by, is_deleted, remark, is_first_launch,competition_of_team_id,competition_members_id from competition_members_score
|
||||
</sql>
|
||||
|
||||
<select id="selectCompetitionMembersScoreList" parameterType="CompetitionMembersScore" resultMap="CompetitionMembersScoreResult">
|
||||
|
|
@ -66,6 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="modifiedBy != null and modifiedBy != ''"> and modified_by = #{modifiedBy}</if>
|
||||
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
|
||||
<if test="isFirstLaunch != null "> and is_first_launch = #{isFirstLaunch}</if>
|
||||
<if test="competitionMembersId != null "> and competition_members_id = #{competitionMembersId}</if>
|
||||
<if test="competitionOfTeamId != null "> and competition_of_team_id = #{competitionOfTeamId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -77,35 +81,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
resultType="com.ruoyi.system.domain.vo.CompetitionMembersScoreVo">
|
||||
SELECT
|
||||
sco.id,
|
||||
vs.competition_id as competitionId,
|
||||
vs.id as competitionVsId,
|
||||
vs.competition_group as competitionGroup,
|
||||
vs.competition_id AS competitionId,
|
||||
vs.id AS competitionVsId,
|
||||
vs.competition_group AS competitionGroup,
|
||||
team.id AS teamId,
|
||||
member.user_id as teamUserId,
|
||||
cm.real_name as realName,
|
||||
team.team_name as teamName,
|
||||
sco.node_num as nodeNum,
|
||||
member.jersey_number as jerseyNumber,
|
||||
sco.total_score as totalScore,
|
||||
sco.two_points as twoPoints,
|
||||
sco.three_points as threePoints,
|
||||
member.user_id AS teamUserId,
|
||||
member.id as competitionMembersId,
|
||||
member.real_name AS realName,
|
||||
team.team_name AS teamName,
|
||||
team.id as competitionOfTeamId,
|
||||
sco.node_num AS nodeNum,
|
||||
member.jersey_number AS jerseyNumber,
|
||||
sco.total_score AS totalScore,
|
||||
sco.two_points AS twoPoints,
|
||||
sco.three_points AS threePoints,
|
||||
sco.penalty,
|
||||
sco.backboard,
|
||||
sco.front_plate as frontPlate,
|
||||
sco.back_plate as backPlate,
|
||||
sco.front_plate AS frontPlate,
|
||||
sco.back_plate AS backPlate,
|
||||
sco.assists,
|
||||
sco.snatch,
|
||||
sco.block,
|
||||
sco.fault,
|
||||
sco.breaks,
|
||||
IFNULL(sco.is_first_launch,0) AS isFirstLaunch
|
||||
IFNULL( sco.is_first_launch, 0 ) AS isFirstLaunch
|
||||
FROM
|
||||
competition_team_vs_team vs
|
||||
inner join basketball_team team on (vs.main_team_id=team.id or vs.guest_team_id=team.id) and team.IS_DELETED=0
|
||||
left join competition_members member on team.id = member.competition_team_id and member.IS_DELETED=0
|
||||
left join competition_members_score sco on (vs.id=sco.competition_vs_id and member.user_id = sco.team_user_id) and sco.is_deleted=0
|
||||
left join user_info userInfo on member.user_id = userInfo.id and userInfo.is_deleted=0
|
||||
left join competition_members cm on cm.user_id=userInfo.id and cm.is_deleted=0
|
||||
INNER JOIN competition_of_team team ON ( vs.main_team_id = team.id OR vs.guest_team_id = team.id )
|
||||
AND team.IS_DELETED = 0
|
||||
LEFT JOIN competition_members member ON team.id = member.competition_of_team_id
|
||||
AND member.IS_DELETED = 0
|
||||
LEFT JOIN competition_members_score sco ON ( vs.id = sco.competition_vs_id AND member.id = sco.competition_members_id )
|
||||
AND sco.is_deleted = 0
|
||||
LEFT JOIN user_info userInfo ON member.user_id = userInfo.id
|
||||
AND userInfo.is_deleted = 0
|
||||
LEFT JOIN competition_members cm ON cm.user_id = userInfo.id
|
||||
AND cm.is_deleted = 0
|
||||
WHERE 1 = 1 AND vs.is_deleted = 0
|
||||
<if test="competitionId != null ">
|
||||
AND vs.competition_Id = #{competitionId}
|
||||
|
|
@ -197,6 +208,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="isDeleted != null">is_deleted,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="isFirstLaunch != null">is_first_launch,</if>
|
||||
<if test="competitionMembersId != null">competition_members_id,</if>
|
||||
<if test="competitionOfTeamId != null">competition_of_team_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="competitionId != null">#{competitionId},</if>
|
||||
|
|
@ -225,6 +238,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="isDeleted != null">#{isDeleted},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="isFirstLaunch != null">#{isFirstLaunch},</if>
|
||||
<if test="competitionMembersId != null">#{competitionMembersId},</if>
|
||||
<if test="competitionOfTeamId != null">#{competitionOfTeamId},</if>
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -257,6 +273,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="isDeleted != null">is_deleted = #{isDeleted},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="isFirstLaunch != null">is_first_launch = #{isFirstLaunch},</if>
|
||||
<if test="competitionMembersId != null">competition_members_id =#{competitionMembersId},</if>
|
||||
<if test="competitionOfTeamId != null">competition_of_team_id=#{competitionOfTeamId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -21,10 +21,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="contactsTel" column="contacts_tel" />
|
||||
<result property="contactsAreaCode" column="contacts_area_code" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="teamLogo" column="team_logo"/>
|
||||
<result property="captain" column="captain"/>
|
||||
</resultMap>
|
||||
|
||||
<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
|
||||
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,team_logo,captain from competition_of_team
|
||||
</sql>
|
||||
<select id="selectCompetitionOfTeamById" parameterType="Long" resultMap="CompetitionOfTeamResult">
|
||||
<include refid="selectCompetitionOfTeamVo"/>
|
||||
|
|
@ -43,10 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<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="contacts != null and contacts != ''"> and t.contacts like concat('%',#{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>
|
||||
<if test="captain != null and captain != ''"> and t.captain like concat('%',#{captain}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getJoinCompetitionTeam" resultType="com.ruoyi.system.domain.vo.CompetitionOfTeamVo">
|
||||
|
|
@ -82,6 +85,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="contactsAreaCode != null and contactsAreaCode != ''">
|
||||
AND t.contacts_area_code like CONCAT('%',#{contactsAreaCode},'%')
|
||||
</if>
|
||||
<if test="captain != null and captain != ''">
|
||||
and t.captain like concat('%',#{captain}, '%')
|
||||
</if>
|
||||
order by t.created_time desc
|
||||
</select>
|
||||
<select id="findCompetitionTeamGroupList" resultType="com.ruoyi.system.domain.vo.CompetitionOfTeamVo">
|
||||
|
|
@ -117,6 +123,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="contactsAreaCode != null and contactsAreaCode != ''">
|
||||
AND t.contacts_area_code like CONCAT('%',#{contactsAreaCode},'%')
|
||||
</if>
|
||||
<if test="captain != null and captain != ''">
|
||||
and t.captain like concat('%',#{captain}, '%')
|
||||
</if>
|
||||
order by t.created_time desc
|
||||
|
||||
</select>
|
||||
|
|
@ -159,6 +168,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="contactsAreaCode != null and contactsAreaCode != ''">
|
||||
AND t.contacts_area_code like CONCAT('%',#{contactsAreaCode},'%')
|
||||
</if>
|
||||
<if test="captain != null and captain != ''">
|
||||
and t.captain like concat('%',#{captain}, '%')
|
||||
</if>
|
||||
order by t.created_time desc
|
||||
</select>
|
||||
<select id="getMyJoinCompetitionTeam" resultType="com.ruoyi.system.domain.vo.CompetitionOfTeamVo">
|
||||
select t.* from competition_of_team t where t.is_deleted = 0
|
||||
<if test="id != null ">
|
||||
AND t.id=#{id}
|
||||
</if>
|
||||
<if test="competitionId != null ">
|
||||
AND t.competition_id=#{competitionId}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
AND t.status =#{status}
|
||||
</if>
|
||||
<if test="teamId != null ">
|
||||
AND t.team_id =#{teamId}
|
||||
</if>
|
||||
<if test="competitionGroup != null ">
|
||||
AND t.competition_group =#{competitionGroup}
|
||||
</if>
|
||||
<if test="teamName != null and teamName != ''">
|
||||
AND t.team_name like CONCAT('%',#{teamName},'%')
|
||||
</if>
|
||||
<if test="contacts != null and contacts != ''">
|
||||
AND t.contacts like CONCAT('%',#{contacts},'%')
|
||||
</if>
|
||||
<if test="contactsTel != null and contactsTel != ''">
|
||||
AND t.contacts_tel like CONCAT('%',#{contactsTel},'%')
|
||||
</if>
|
||||
<if test="contactsAreaCode != null and contactsAreaCode != ''">
|
||||
AND t.contacts_area_code like CONCAT('%',#{contactsAreaCode},'%')
|
||||
</if>
|
||||
<if test="isDeleted != null ">
|
||||
AND t.is_deleted = #{isDeleted}
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
AND EXISTS (select 1 from competition_members c WHERE c.user_id=#{userId} and t.competition_id = c.competition_id and t.id=c.competition_of_team_id)
|
||||
</if>
|
||||
order by t.created_time desc
|
||||
</select>
|
||||
|
||||
|
|
@ -180,6 +229,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="contactsTel != null">contacts_tel,</if>
|
||||
<if test="contactsAreaCode != null">contacts_area_code,</if>
|
||||
<if test="serialNumber != null">serial_number,</if>
|
||||
<if test="teamLogo != null">team_logo,</if>
|
||||
<if test="captain != null">captain,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="competitionId != null">#{competitionId},</if>
|
||||
|
|
@ -197,6 +248,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="contactsTel != null">#{contactsTel},</if>
|
||||
<if test="contactsAreaCode != null">#{contactsAreaCode},</if>
|
||||
<if test="serialNumber != null">#{serialNumber},</if>
|
||||
<if test="teamLogo != null">#{teamLogo},</if>
|
||||
<if test="captain != null">#{captain},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -218,6 +271,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="contactsTel != null">contacts_tel = #{contactsTel},</if>
|
||||
<if test="contactsAreaCode != null">contacts_area_code = #{contactsAreaCode},</if>
|
||||
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||
<if test="teamLogo != null"> team_logo = #{teamLogo},</if>
|
||||
<if test="captain != null"> captain = #{captain},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="id" column="id" />
|
||||
<result property="competitionId" column="competition_id" />
|
||||
<result property="competitionVsId" column="competition_vs_id" />
|
||||
<result property="competitionOfTeamId" column="competition_of_team_id"/>
|
||||
<result property="teamId" column="team_id" />
|
||||
<result property="teamName" column="team_name" />
|
||||
<result property="oneNodeScore" column="one_node_score" />
|
||||
|
|
@ -24,11 +25,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="fourNodeScore" column="four_node_score" />
|
||||
<result property="fiveNodeScore" column="five_node_score" />
|
||||
<result property="sixNodeScore" column="six_node_score" />
|
||||
<result property="vsResult" column="vs_result"/>
|
||||
<result property="vsType" column="vs_type"/>
|
||||
<result property="integral" column="integral" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCompetitionResultVo">
|
||||
select id, competition_id, competition_vs_id, team_id, team_name, one_node_score, two_node_score, competition_group, status, created_time, last_updated_time, created_by, modified_by, is_deleted, remark, three_node_score, four_node_score, five_node_score, six_node_score, integral from competition_result
|
||||
select id, competition_id, competition_vs_id, team_id, team_name, one_node_score, two_node_score, competition_group, status, created_time, last_updated_time, created_by, modified_by, is_deleted, remark, three_node_score, four_node_score, five_node_score, six_node_score, integral,vs_result,competition_of_team_id,vs_result from competition_result
|
||||
</sql>
|
||||
|
||||
<select id="selectCompetitionResultList" parameterType="CompetitionResult" resultMap="CompetitionResultResult">
|
||||
|
|
@ -52,6 +55,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="fiveNodeScore != null "> and five_node_score = #{fiveNodeScore}</if>
|
||||
<if test="sixNodeScore != null "> and six_node_score = #{sixNodeScore}</if>
|
||||
<if test="integral != null "> and integral = #{integral}</if>
|
||||
<if test="vsResult != null "> and vs_result = #{vsResult}</if>
|
||||
<if test="vsType != null "> and vs_type = #{vsType}</if>
|
||||
<if test="competitionOfTeamId != null "> and competition_of_team_id = #{competitionOfTeamId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -63,8 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select rs.id,
|
||||
vs.competition_id as competitionId,
|
||||
vs.id as competitionVsId,
|
||||
team.id as competitionOfTeamId,
|
||||
vs.competition_group as competitionGroup,
|
||||
team.id as teamId,
|
||||
team.team_id as teamId,
|
||||
team.team_name as teamName,
|
||||
rs.one_node_score as oneNodeScore,
|
||||
rs.two_node_score as twoNodeScore,
|
||||
|
|
@ -72,10 +79,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
rs.four_node_score as fourNodeScore,
|
||||
rs.five_node_score as fiveNodeScore,
|
||||
rs.six_node_score as sixNodeScore,
|
||||
rs.vs_result,
|
||||
vs.vs_type,
|
||||
rs.integral
|
||||
from competition_team_vs_team vs
|
||||
inner join basketball_team team on (vs.main_team_id=team.id or vs.guest_team_id=team.id) and team.IS_DELETED=0
|
||||
left join competition_Result rs on (rs.competition_vs_id=vs.id and team.id = rs.team_id) and rs.is_deleted=0
|
||||
inner join competition_of_team team on (vs.main_team_id=team.id or vs.guest_team_id=team.id) and team.IS_DELETED=0
|
||||
left join competition_Result rs on (rs.competition_vs_id=vs.id and team.id = rs.competition_of_team_id) and rs.is_deleted=0
|
||||
where 1=1 and vs.is_deleted=0
|
||||
<if test="competitionId != null ">
|
||||
AND vs.competition_Id = #{competitionId}
|
||||
|
|
@ -107,6 +116,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="fiveNodeScore != null">five_node_score,</if>
|
||||
<if test="sixNodeScore != null">six_node_score,</if>
|
||||
<if test="integral != null">integral,</if>
|
||||
<if test="vsResult != null ">vs_result,</if>
|
||||
<if test="vsType != null ">vs_type,</if>
|
||||
<if test="competitionOfTeamId != null ">competition_of_team_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="competitionId != null">#{competitionId},</if>
|
||||
|
|
@ -128,6 +140,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="fiveNodeScore != null">#{fiveNodeScore},</if>
|
||||
<if test="sixNodeScore != null">#{sixNodeScore},</if>
|
||||
<if test="integral != null">#{integral},</if>
|
||||
<if test="vsResult != null ">#{vsResult},</if>
|
||||
<if test="vsType != null "> #{vsType},</if>
|
||||
<if test="competitionOfTeamId != null "> #{competitionOfTeamId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -153,6 +168,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="fiveNodeScore != null">five_node_score = #{fiveNodeScore},</if>
|
||||
<if test="sixNodeScore != null">six_node_score = #{sixNodeScore},</if>
|
||||
<if test="integral != null">integral = #{integral},</if>
|
||||
<if test="vsResult != null ">vs_result = #{vsResult},</if>
|
||||
<if test="vsType != null "> vs_type = #{vsType},</if>
|
||||
<if test="competitionOfTeamId != null "> competition_of_team_id = #{competitionOfTeamId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,119 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.CompetitionSharePermissionsMapper">
|
||||
|
||||
<resultMap type="CompetitionSharePermissions" id="CompetitionSharePermissionsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="competitionId" column="competition_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userTel" column="user_tel" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="isDeleted" column="is_deleted" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="canSetType" column="can_set_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCompetitionSharePermissionsVo">
|
||||
select id, create_time, competition_id, user_id, user_tel, user_name, status, update_time, create_by, update_by, is_deleted, remark, can_set_type from competition_share_permissions
|
||||
</sql>
|
||||
|
||||
<select id="selectCompetitionSharePermissionsList" parameterType="CompetitionSharePermissions" resultMap="CompetitionSharePermissionsResult">
|
||||
<include refid="selectCompetitionSharePermissionsVo"/>
|
||||
<where>
|
||||
<if test="competitionId != null "> and competition_id = #{competitionId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userTel != null and userTel != ''"> and user_tel = #{userTel}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
|
||||
<if test="canSetType != null and canSetType != ''"> and can_set_type = #{canSetType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCompetitionSharePermissionsById" parameterType="Long" resultMap="CompetitionSharePermissionsResult">
|
||||
<include refid="selectCompetitionSharePermissionsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCompetitionSharePermissions" parameterType="CompetitionSharePermissions" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into competition_share_permissions
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="competitionId != null">competition_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userTel != null and userTel != ''">user_tel,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="isDeleted != null">is_deleted,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="canSetType != null">can_set_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="competitionId != null">#{competitionId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userTel != null and userTel != ''">#{userTel},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="isDeleted != null">#{isDeleted},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="canSetType != null">#{canSetType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCompetitionSharePermissions" parameterType="CompetitionSharePermissions">
|
||||
update competition_share_permissions
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="competitionId != null">competition_id = #{competitionId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userTel != null and userTel != ''">user_tel = #{userTel},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="isDeleted != null">is_deleted = #{isDeleted},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="canSetType != null">can_set_type = #{canSetType},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCompetitionSharePermissionsById" parameterType="Long">
|
||||
delete from competition_share_permissions where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCompetitionSharePermissionsByIds" parameterType="String">
|
||||
delete from competition_share_permissions where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getList" resultType="com.ruoyi.system.domain.CompetitionSharePermissions">
|
||||
<include refid="selectCompetitionSharePermissionsVo"/>
|
||||
<where>
|
||||
<if test="competitionId != null "> and competition_id = #{competitionId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> AND user_name like CONCAT('%',#{userName},'%')</if>
|
||||
<if test="userTel != null and userTel != ''"> and user_tel like CONCAT('%',#{userTel},'%')</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
|
||||
<if test="canSetType != null and canSetType != ''"> and can_set_type = #{canSetType}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
t.competition_time as competitionTime,
|
||||
t.building_id as buildingId,
|
||||
t.building_name as buildingName,
|
||||
t.competition_address as competitionAddress,
|
||||
IFNULL(t.competition_address,b.ADDRESS) as competitionAddress,
|
||||
t.competition_group as competitionGroup,
|
||||
t.status,
|
||||
t.vs_type as vsType,
|
||||
|
|
@ -120,11 +120,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
DATE_FORMAT(t.competition_time,'%H:%i') AS theTime,
|
||||
t.remark as remark
|
||||
from competition_team_vs_team t
|
||||
LEFT JOIN basketball_team b1 ON b1.id = t.main_team_id
|
||||
left join basketball_team b2 on t.guest_team_id=b2.id
|
||||
LEFT JOIN competition_of_team b1 ON b1.id = t.main_team_id
|
||||
left join competition_of_team b2 on t.guest_team_id=b2.id
|
||||
left join building_info b on b.id = t.building_id
|
||||
where 1=1 AND t.id=#{id}
|
||||
AND t.is_deleted = 0
|
||||
LIMIT 1
|
||||
LIMIT 1;
|
||||
</select>
|
||||
<select id="getCompetitionSchedule" resultType="com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo">
|
||||
select
|
||||
|
|
@ -240,16 +241,117 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT
|
||||
ANY_VALUE ( t.team_name ) as teamName,
|
||||
any_value (team.team_logo) as teamLogo,
|
||||
any_value (team.competition_group) as competition_group,
|
||||
t.competition_of_team_id,
|
||||
sum(IF( t.vs_result = 'win', 1, 0 )) AS win,
|
||||
sum(IF( t.vs_result = 'fail', 1, 0 )) AS fail,
|
||||
sum(IFNULL( t.one_node_score, 0 )+ IFNULL( t.two_node_score, 0 )+ IFNULL( t.three_node_score, 0 )+ IFNULL( t.four_node_score, 0 )+ IFNULL( t.five_node_score, 0 )+ IFNULL( t.six_node_score, 0 )) AS totalScore,
|
||||
sum(t.integral) AS integral
|
||||
FROM competition_result t left join competition_of_team team on team.id = t.competition_of_team_id
|
||||
WHERE t.is_deleted = 0 AND t.competition_id = #{id}
|
||||
WHERE t.is_deleted = 0 AND t.competition_id = #{competitionId}
|
||||
<if test="vsType != null ">
|
||||
AND t.vs_type =#{vsType}
|
||||
</if>
|
||||
<if test="competitionGroup != null ">
|
||||
AND t.competition_group =#{competitionGroup}
|
||||
</if>
|
||||
GROUP BY t.competition_of_team_id
|
||||
ORDER BY sum(t.integral) desc
|
||||
</select>
|
||||
<select id="getTodaySchedule" resultType="com.ruoyi.system.domain.vo.CompetitionTeamVsTeamVo">
|
||||
select
|
||||
t.id as id,
|
||||
t.competition_id as competitionId,
|
||||
t.main_team_id as mainTeamId,
|
||||
b1.TEAM_NAME as mainTeamName,
|
||||
b1.team_logo as mainTeamLogo,
|
||||
t.guest_team_id as guestTeamId,
|
||||
b2.TEAM_NAME as guestTeamName,
|
||||
b2.team_logo as guestTeamLogo,
|
||||
t.competition_time as competitionTime,
|
||||
t.building_id as buildingId,
|
||||
t.building_name as buildingName,
|
||||
t.competition_address as competitionAddress,
|
||||
t.competition_group as competitionGroup,
|
||||
t.status,
|
||||
t.vs_type as vsType,
|
||||
t.created_time as createdTime,
|
||||
t.last_updated_time as lastUpdatedTime,
|
||||
t.created_by as createdBy,
|
||||
t.modified_by as modifiedBy,
|
||||
t.main_team_score as mainTeamScore,
|
||||
t.guest_team_score as guestTeamScore,
|
||||
t.is_deleted as isDeleted,
|
||||
DATE_FORMAT(t.competition_time,'%Y年%m月%d日') as competitionDate,
|
||||
CASE dayofweek(t.competition_time)
|
||||
WHEN 1 THEN
|
||||
'星期日'
|
||||
WHEN 2 THEN
|
||||
'星期一'
|
||||
WHEN 3 THEN
|
||||
'星期二'
|
||||
WHEN 4 THEN
|
||||
'星期三'
|
||||
WHEN 5 THEN
|
||||
'星期四'
|
||||
WHEN 6 THEN
|
||||
'星期五'
|
||||
WHEN 7 THEN
|
||||
'星期六'
|
||||
END as weekDayName,
|
||||
CASE t.status
|
||||
WHEN -1 THEN
|
||||
'已取消'
|
||||
WHEN 0 THEN
|
||||
'报名中'
|
||||
WHEN 1 THEN
|
||||
'比赛中'
|
||||
WHEN 2 THEN
|
||||
'已结束'
|
||||
END as statusName,
|
||||
DATE_FORMAT(t.competition_time,'%H:%i') AS theTime,
|
||||
t.remark as remark,
|
||||
u1.OPENID as guestTeamOpenId,
|
||||
u2.OPENID as mainTeamOpenId
|
||||
from competition_team_vs_team t
|
||||
LEFT JOIN competition_of_team b1 ON b1.id = t.main_team_id
|
||||
left join user_info u1 on u1.id=b1.created_by
|
||||
left join competition_of_team b2 on t.guest_team_id=b2.id
|
||||
left join user_info u2 on u2.id=b2.created_by
|
||||
where 1=1
|
||||
<![CDATA[ and to_days(competition_time) <= to_days(now()) ]]>
|
||||
<if test="comp.id != null ">
|
||||
AND t.id=#{comp.id}
|
||||
</if>
|
||||
<if test="comp.status != null ">
|
||||
AND t.status =#{comp.status}
|
||||
</if>
|
||||
<if test="comp.isDeleted != null ">
|
||||
AND t.is_deleted =#{comp.isDeleted}
|
||||
</if>
|
||||
<if test="comp.competitionId != null ">
|
||||
AND t.competition_id=#{comp.competitionId}
|
||||
</if>
|
||||
<if test="comp.buildingName != null and comp.buildingName != ''">
|
||||
AND t.building_name like CONCAT('%',#{comp.buildingName},'%')
|
||||
</if>
|
||||
<if test="comp.competitionGroup != null ">
|
||||
AND t.competition_group = #{comp.competitionGroup}
|
||||
</if>
|
||||
<if test="comp.mainTeamName != null and comp.mainTeamName != ''">
|
||||
AND t.main_team_name like CONCAT('%',#{comp.mainTeamName},'%')
|
||||
</if>
|
||||
<if test="comp.guestTeamName != null and comp.guestTeamName != ''">
|
||||
AND t.guest_team_name like CONCAT('%',#{comp.guestTeamName},'%')
|
||||
</if>
|
||||
<if test="comp.competitionAddress != null and comp.competitionAddress != '' ">
|
||||
AND t.competition_address like CONCAT('%',#{comp.competitionAddress},'%')
|
||||
</if>
|
||||
<if test="comp.buildingName != null and comp.buildingName != '' ">
|
||||
AND t.building_name like CONCAT('%',#{comp.buildingName},'%')
|
||||
</if>
|
||||
order by t.competition_time asc
|
||||
</select>
|
||||
|
||||
<insert id="insertCompetitionTeamVsTeam" parameterType="CompetitionTeamVsTeam" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into competition_team_vs_team
|
||||
|
|
@ -347,6 +449,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="batchNumber != null and batchNumber != ''"> and batch_number = #{batchNumber}</if>
|
||||
</where>
|
||||
</update>
|
||||
<update id="competitionVsTeamStatusUpdate">
|
||||
update competition_team_vs_team set status = 2 where status <> 2 and competition_time <![CDATA[ <= ]]> now()
|
||||
</update>
|
||||
|
||||
<delete id="deleteCompetitionTeamVsTeamById" parameterType="Long">
|
||||
delete from competition_team_vs_team where id = #{id}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectByCode" resultType="com.ruoyi.system.domain.UserRole">
|
||||
select * from user_role where role_code = #{roleCode} limit 1
|
||||
</select>
|
||||
<select id="selectRoleByUserId" resultType="com.ruoyi.system.domain.UserRole">
|
||||
select * from user_role where USER_ID = #{userId}
|
||||
</select>
|
||||
|
||||
<insert id="insertUserRole" parameterType="UserRole" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into user_role
|
||||
|
|
|
|||
|
|
@ -77,7 +77,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ORDER BY distance LIMIT 20
|
||||
</select>
|
||||
<select id="getBuildingByCity" resultType="com.ruoyi.system.domain.WxBuildingInfo">
|
||||
|
||||
select info.* from building_info info where info.is_deleted=0
|
||||
<if test="status != null and status != ''">
|
||||
AND info.status=#{status}
|
||||
</if>
|
||||
<if test="buildingName != null and buildingName != ''">
|
||||
AND info.building_name like CONCAT('%',#{buildingName},'%')
|
||||
</if>
|
||||
<if test="cityCode != null and cityCode != ''">
|
||||
AND info.city_code=#{cityCode}
|
||||
</if>
|
||||
<if test="isSupportlive != null and isSupportlive != ''">
|
||||
AND info.is_supportlive=#{isSupportlive}
|
||||
</if>
|
||||
<if test="createdId != null">
|
||||
AND created_id=#{createdId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getAllBuildingByCondition" resultType="com.ruoyi.system.domain.vo.BuildingInfoResponse">
|
||||
|
|
@ -98,19 +113,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND created_id=#{createdId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAuditPage" parameterType="WxBuildingInfo" resultMap="WxBuildingInfoResult">
|
||||
SELECT * FROM building_info where 1=1
|
||||
<select id="getAuditPage" resultType="com.ruoyi.system.domain.WxBuildingInfo">
|
||||
select info.* from building_info info where info.is_deleted=0
|
||||
<if test="status != null and status != ''">
|
||||
AND status=#{status}
|
||||
AND info.status=#{status}
|
||||
</if>
|
||||
<if test="buildingName != null and buildingName != ''">
|
||||
AND building_name like CONCAT('%',#{buildingName},'%')
|
||||
AND info.building_name like CONCAT('%',#{buildingName},'%')
|
||||
</if>
|
||||
<if test="createdBy != null and createdBy != ''">
|
||||
AND created_by=#{createdBy}
|
||||
<if test="cityCode != null and cityCode != ''">
|
||||
AND info.city_code=#{cityCode}
|
||||
</if>
|
||||
<if test="isSupportlive != null and isSupportlive != ''">
|
||||
AND info.is_supportlive=#{isSupportlive}
|
||||
</if>
|
||||
<if test="createdId != null">
|
||||
AND created_id=#{createdId}
|
||||
AND info.created_id=#{createdId}
|
||||
</if>
|
||||
<if test="createdBy != null and createdBy != ''">
|
||||
AND info.created_by=#{createdBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectWxUserVo">
|
||||
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, LOGIN_NAME, PASS_WORD, ROLE, OPENID, AVATAR, GENDER, USER_NAME, TELEPHONE, BIRTHDAY, HEIGHT, WEIGHT, TEAM_POSITION, TAG, ENABLED, UNIONID, OFFICIAL_ACCOUNT_OPENID, real_name from user_info
|
||||
select ID, IS_DELETED, CREATED_TIME, CREATED_BY, MODIFIED_BY, LAST_UPDATED_TIME, LOGIN_NAME, PASS_WORD, ROLE, OPENID, AVATAR, GENDER, USER_NAME, TELEPHONE, BIRTHDAY, HEIGHT, WEIGHT, TEAM_POSITION, TAG, ENABLED, UNIONID, OFFICIAL_ACCOUNT_OPENID,REAL_NAME from user_info
|
||||
</sql>
|
||||
|
||||
<select id="selectWxUserList" parameterType="WxUser" resultMap="WxUserResult">
|
||||
|
|
@ -75,6 +75,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getUserInfoBy" resultType="com.ruoyi.system.domain.WxUser">
|
||||
<include refid="selectWxUserVo"/>
|
||||
<where>
|
||||
<if test="isDeleted != null "> and IS_DELETED = #{isDeleted}</if>
|
||||
<if test="createdTime != null "> and CREATED_TIME = #{createdTime}</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="lastUpdatedTime != null "> and LAST_UPDATED_TIME = #{lastUpdatedTime}</if>
|
||||
<if test="loginName != null and loginName != ''"> and LOGIN_NAME like concat('%', #{loginName}, '%')</if>
|
||||
<if test="passWord != null and passWord != ''"> and PASS_WORD = #{passWord}</if>
|
||||
<if test="role != null and role != ''"> and ROLE = #{role}</if>
|
||||
<if test="openid != null and openid != ''"> and OPENID = #{openid}</if>
|
||||
<if test="avatar != null and avatar != ''"> and AVATAR = #{avatar}</if>
|
||||
<if test="gender != null and gender != ''"> and GENDER = #{gender}</if>
|
||||
<if test="userName != null and userName != ''"> and USER_NAME like concat('%', #{userName}, '%')</if>
|
||||
<if test="telephone != null and telephone != ''"> and TELEPHONE = #{telephone}</if>
|
||||
<if test="birthday != null "> and BIRTHDAY = #{birthday}</if>
|
||||
<if test="height != null "> and HEIGHT = #{height}</if>
|
||||
<if test="weight != null "> and WEIGHT = #{weight}</if>
|
||||
<if test="teamPosition != null and teamPosition != ''"> and TEAM_POSITION = #{teamPosition}</if>
|
||||
<if test="tag != null and tag != ''"> and TAG = #{tag}</if>
|
||||
<if test="enabled != null and enabled != ''"> and ENABLED = #{enabled}</if>
|
||||
<if test="unionid != null and unionid != ''"> and UNIONID = #{unionid}</if>
|
||||
<if test="officialAccountOpenid != null and officialAccountOpenid != ''"> and OFFICIAL_ACCOUNT_OPENID = #{officialAccountOpenid}</if>
|
||||
<if test="realName != null and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
|
||||
</where>
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertWxUser" parameterType="WxUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into user_info
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||
// 查询球场管理列表
|
||||
export function listWxBuilding(query) {
|
||||
return request({
|
||||
url: '/system/WxBuilding/list',
|
||||
url: '/system/wxBuildingInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
|
|
@ -12,7 +12,7 @@ export function listWxBuilding(query) {
|
|||
// 查询球场管理详细
|
||||
export function getWxBuilding(id) {
|
||||
return request({
|
||||
url: '/system/WxBuilding/' + id,
|
||||
url: '/system/wxBuildingInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@ export function getWxBuilding(id) {
|
|||
// 新增球场管理
|
||||
export function addWxBuilding(data) {
|
||||
return request({
|
||||
url: '/system/WxBuilding',
|
||||
url: '/system/wxBuildingInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
|
|
@ -36,7 +36,7 @@ export function batchUploadFiles(data,url) {
|
|||
// 修改球场管理
|
||||
export function updateWxBuilding(data) {
|
||||
return request({
|
||||
url: '/system/WxBuilding',
|
||||
url: '/system/wxBuildingInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export function listCompetition(query) {
|
|||
// 查询比赛信息详细
|
||||
export function getCompetition(id) {
|
||||
return request({
|
||||
url: '/system/competition/' + id,
|
||||
url: '/system/competition/getInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询赛会-权限分享列表
|
||||
export function listCompetitionPermissions(query) {
|
||||
return request({
|
||||
url: '/system/competitionPermissions/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询赛会-权限分享详细
|
||||
export function getCompetitionPermissions(id) {
|
||||
return request({
|
||||
url: '/system/competitionPermissions/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增赛会-权限分享
|
||||
export function addCompetitionPermissions(data) {
|
||||
return request({
|
||||
url: '/system/competitionPermissions',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改赛会-权限分享
|
||||
export function updateCompetitionPermissions(data) {
|
||||
return request({
|
||||
url: '/system/competitionPermissions',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除赛会-权限分享
|
||||
export function delCompetitionPermissions(id) {
|
||||
return request({
|
||||
url: '/system/competitionPermissions/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
|
@ -575,6 +575,8 @@ export default {
|
|||
status: null,
|
||||
isOpen: null,
|
||||
createdId: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -350,7 +350,9 @@ export default {
|
|||
createdTime: null,
|
||||
createdBy: null,
|
||||
modifiedBy: null,
|
||||
lastUpdatedTime: null
|
||||
lastUpdatedTime: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -257,7 +257,9 @@ export default {
|
|||
createdBy: null,
|
||||
modifiedBy: null,
|
||||
lastUpdatedTime: null,
|
||||
consultType: null
|
||||
consultType: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -255,6 +255,8 @@ export default {
|
|||
teamDes: null,
|
||||
buildId: null,
|
||||
createdId: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -296,7 +296,9 @@ export default {
|
|||
busType: null,
|
||||
page: null,
|
||||
width: null,
|
||||
useDesc: null
|
||||
useDesc: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -196,13 +196,13 @@
|
|||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:competition:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:competition:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
|
@ -226,7 +226,7 @@
|
|||
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="比赛名称" prop="competitionName" >
|
||||
<el-input v-model="form.competitionName" disabled />
|
||||
<el-input v-model="form.competitionName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="比赛球场" prop="buildingName">
|
||||
<el-select v-model="form.buildingName" filterable @change="changeBuildName" remote reserve-keyword
|
||||
|
|
@ -389,7 +389,9 @@ export default {
|
|||
createdId: null,
|
||||
auditStatus: null,
|
||||
heightHide: null,
|
||||
sponsor: null
|
||||
sponsor: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -471,7 +471,9 @@ export default {
|
|||
createdBy: null,
|
||||
modifiedBy: null,
|
||||
isDeleted: null,
|
||||
isFirstLaunch: null
|
||||
isFirstLaunch: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -486,7 +486,9 @@ export default {
|
|||
contacts: null,
|
||||
contactsAreaCode: null,
|
||||
personalPhoto: null,
|
||||
isFirstLaunch: null
|
||||
isFirstLaunch: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -317,7 +317,9 @@ export default {
|
|||
contacts: null,
|
||||
contactsTel: null,
|
||||
contactsAreaCode: null,
|
||||
serialNumber: null
|
||||
serialNumber: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,374 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="赛事id(competition的ID)" prop="competitionId">
|
||||
<el-input
|
||||
v-model="queryParams.competitionId"
|
||||
placeholder="请输入赛事id(competition的ID)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户ID" prop="userId">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入用户ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户手机号" prop="userTel">
|
||||
<el-input
|
||||
v-model="queryParams.userTel"
|
||||
placeholder="请输入用户手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户姓名" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入用户姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态(sys_data_status)" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态(sys_data_status)" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_data_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否删除" prop="isDeleted">
|
||||
<el-input
|
||||
v-model="queryParams.isDeleted"
|
||||
placeholder="请输入是否删除"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:competitionPermissions:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:competitionPermissions:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:competitionPermissions:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:competitionPermissions:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns" :pageName="$options.name" ></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="competitionPermissionsList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="id" v-if="columns[0].visible" show-overflow-tooltip />
|
||||
<el-table-column label="赛事id(competition的ID)" align="center" prop="competitionId" v-if="columns[2].visible" show-overflow-tooltip />
|
||||
<el-table-column label="用户ID" align="center" prop="userId" v-if="columns[3].visible" show-overflow-tooltip />
|
||||
<el-table-column label="用户手机号" align="center" prop="userTel" v-if="columns[4].visible" show-overflow-tooltip />
|
||||
<el-table-column label="用户姓名" align="center" prop="userName" v-if="columns[5].visible" show-overflow-tooltip />
|
||||
<el-table-column label="状态(sys_data_status)" align="center" prop="status" v-if="columns[6].visible" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_data_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否删除" align="center" prop="isDeleted" v-if="columns[10].visible" show-overflow-tooltip />
|
||||
<el-table-column label="备注说明" align="center" prop="remark" v-if="columns[11].visible" show-overflow-tooltip />
|
||||
<el-table-column label="能操作的功能" align="center" prop="canSetType" v-if="columns[12].visible" show-overflow-tooltip />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:competitionPermissions:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:competitionPermissions:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改赛会-权限分享对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="赛事id(competition的ID)" prop="competitionId">
|
||||
<el-input v-model="form.competitionId" placeholder="请输入赛事id(competition的ID)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户ID" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户手机号" prop="userTel">
|
||||
<el-input v-model="form.userTel" placeholder="请输入用户手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户姓名" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入用户姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态(sys_data_status)" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择状态(sys_data_status)">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_data_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否删除" prop="isDeleted">
|
||||
<el-input v-model="form.isDeleted" placeholder="请输入是否删除" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注说明" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCompetitionPermissions, getCompetitionPermissions, delCompetitionPermissions, addCompetitionPermissions, updateCompetitionPermissions } from "@/api/system/competitionPermissions";
|
||||
|
||||
export default {
|
||||
name: "CompetitionPermissions",
|
||||
dicts: ['sys_data_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 赛会-权限分享表格数据
|
||||
competitionPermissionsList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
competitionId: null,
|
||||
userId: null,
|
||||
userTel: null,
|
||||
userName: null,
|
||||
status: null,
|
||||
isDeleted: null,
|
||||
canSetType: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
competitionId: [
|
||||
{ required: true, message: "赛事id(competition的ID)不能为空", trigger: "blur" }
|
||||
],
|
||||
userTel: [
|
||||
{ required: true, message: "用户手机号不能为空", trigger: "blur" }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: "用户姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "状态(sys_data_status)不能为空", trigger: "change" }
|
||||
],
|
||||
},
|
||||
// 列表的列的显示隐藏设置
|
||||
columns:[
|
||||
{ key: 0, label: `id`, visible: true },
|
||||
{ key: 1, label: `创建时间`, visible: true },
|
||||
{ key: 2, label: `赛事id(competition的ID)`, visible: true },
|
||||
{ key: 3, label: `用户ID`, visible: true },
|
||||
{ key: 4, label: `用户手机号`, visible: true },
|
||||
{ key: 5, label: `用户姓名`, visible: true },
|
||||
{ key: 6, label: `状态(sys_data_status)`, visible: true },
|
||||
{ key: 7, label: `最后修改时间`, visible: true },
|
||||
{ key: 8, label: `创建人`, visible: true },
|
||||
{ key: 9, label: `最后修改人`, visible: true },
|
||||
{ key: 10, label: `是否删除`, visible: true },
|
||||
{ key: 11, label: `备注说明`, visible: true },
|
||||
{ key: 12, label: `能操作的功能`, visible: true },
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
//列表分页列的动态显示配置
|
||||
var columns = JSON.parse(localStorage.getItem(this.$options.name));
|
||||
if(columns){
|
||||
this.columns = columns;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询赛会-权限分享列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCompetitionPermissions(this.queryParams).then(response => {
|
||||
this.competitionPermissionsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
createTime: null,
|
||||
competitionId: null,
|
||||
userId: null,
|
||||
userTel: null,
|
||||
userName: null,
|
||||
status: null,
|
||||
updateTime: null,
|
||||
createBy: null,
|
||||
updateBy: null,
|
||||
isDeleted: null,
|
||||
remark: null,
|
||||
canSetType: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加赛会-权限分享";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getCompetitionPermissions(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改赛会-权限分享";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateCompetitionPermissions(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCompetitionPermissions(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除赛会-权限分享编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delCompetitionPermissions(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/competitionPermissions/export', {
|
||||
...this.queryParams
|
||||
}, `competitionPermissions_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -238,7 +238,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -369,7 +369,9 @@ export default {
|
|||
fourNodeScore: null,
|
||||
fiveNodeScore: null,
|
||||
sixNodeScore: null,
|
||||
integral: null
|
||||
integral: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -853,7 +853,7 @@ export default {
|
|||
this.competitionObj = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
listCompetitionOfTeam({"pageNum": 1, "pageSize": 1000,"competitionId":id}).then(response => {
|
||||
listCompetitionOfTeam({"orderByColumn":"t.id","isAsc":"desc","pageNum": 1, "pageSize": 1000,"competitionId":id}).then(response => {
|
||||
this.competitionOfTeamList = response.rows;
|
||||
});
|
||||
}
|
||||
|
|
@ -987,7 +987,7 @@ export default {
|
|||
bindConfirm(id,tage){
|
||||
updateCompetitionOfTeam({"id":id,"status":tage}).then(response => {
|
||||
this.$modal.msgSuccess("球队审核成功");
|
||||
listCompetitionOfTeam({"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
listCompetitionOfTeam({"orderByColumn":"t.id","isAsc":"desc","pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
this.competitionOfTeamList = response.rows;
|
||||
});
|
||||
});
|
||||
|
|
@ -1058,7 +1058,7 @@ export default {
|
|||
handleTagClick(tab, event){
|
||||
console.info(tab.name)
|
||||
if(tab.name=='competitionTeamApprove'){
|
||||
listCompetitionOfTeam({"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
listCompetitionOfTeam({"orderByColumn":"t.id","isAsc":"desc","pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
this.competitionOfTeamList = response.rows;
|
||||
});
|
||||
}else if(tab.name=='competitionTeamGroup'){
|
||||
|
|
@ -1067,7 +1067,7 @@ export default {
|
|||
this.competitionTeamGroupList.push({"competitionGroup":"未分","id":null})
|
||||
});
|
||||
}else if(tab.name=='competitionVsSet'){
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isAsc":"desc","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
this.competitionTeamVsTeamList = response.rows;
|
||||
});
|
||||
}else if(tab.name=='competitionSpread'){
|
||||
|
|
@ -1124,7 +1124,7 @@ export default {
|
|||
arrangeTeamGroupSchedule(param).then(response => {
|
||||
this.$modal.msgSuccess("赛程智能设置成功");
|
||||
this.mindVisible = false;
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isAsc":"desc","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
this.competitionTeamVsTeamList = response.rows;
|
||||
});
|
||||
});
|
||||
|
|
@ -1190,7 +1190,7 @@ export default {
|
|||
this.$modal.confirm('是否确认删除赛会中的赛程数据?').then(function() {
|
||||
return delCompetitionTeamVsTeam(ids);
|
||||
}).then(() => {
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isAsc":"desc","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
this.competitionTeamVsTeamList = response.rows;
|
||||
});
|
||||
this.$modal.msgSuccess("删除赛程成功");
|
||||
|
|
@ -1200,7 +1200,7 @@ export default {
|
|||
editDataCompetitionResult(this.competitionRecord).then(response => {
|
||||
this.$modal.msgSuccess("比赛结果记录成功");
|
||||
this.vsRecordOpen = false;
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isAsc":"desc","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
this.competitionTeamVsTeamList = response.rows;
|
||||
});
|
||||
});
|
||||
|
|
@ -1214,7 +1214,7 @@ export default {
|
|||
updateCompetitionTeamVsTeam(this.vsform).then(response => {
|
||||
this.$modal.msgSuccess("编辑赛程成功");
|
||||
this.vsOpen = false;
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isAsc":"desc","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
this.competitionTeamVsTeamList = response.rows;
|
||||
});
|
||||
});
|
||||
|
|
@ -1223,7 +1223,7 @@ export default {
|
|||
addCompetitionTeamVsTeam(this.vsform).then(response => {
|
||||
this.$modal.msgSuccess("新增赛程成功");
|
||||
this.vsOpen = false;
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
listCompetitionTeamVsTeam({"orderByColumn":"competition_time","isAsc":"desc","isDeleted":0,"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id}).then(response => {
|
||||
this.competitionTeamVsTeamList = response.rows;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -252,7 +252,9 @@ export default {
|
|||
createdBy: null,
|
||||
modifiedBy: null,
|
||||
isDeleted: null,
|
||||
isCycle: null
|
||||
isCycle: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -393,7 +393,9 @@ export default {
|
|||
mainTeamScore: null,
|
||||
guestTeamScore: null,
|
||||
vsType: null,
|
||||
batchNumber: null
|
||||
batchNumber: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -278,7 +278,9 @@ export default {
|
|||
isDeleted: null,
|
||||
lastUpdatedTime: null,
|
||||
modifiedBy: null,
|
||||
roleName: null
|
||||
roleName: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -299,6 +299,8 @@ export default {
|
|||
createdId: null,
|
||||
auditStatus: null,
|
||||
heightHide: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
sponsor: null
|
||||
},
|
||||
// 表单参数
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -311,7 +311,9 @@ export default {
|
|||
createdTime: null,
|
||||
createdBy: null,
|
||||
modifiedBy: null,
|
||||
lastUpdatedTime: null
|
||||
lastUpdatedTime: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
|
|||
|
|
@ -9,6 +9,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名" prop="realName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入真实姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名称" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
|
|
@ -24,7 +32,7 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
|
|
@ -34,6 +42,18 @@
|
|||
v-hasPermi="['system:wxUser:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:wxUser:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
|
|
@ -45,17 +65,6 @@
|
|||
v-hasPermi="['system:wxUser:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:wxUser:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
|
|
@ -71,7 +80,7 @@
|
|||
|
||||
<el-table v-loading="loading" :data="wxUserList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" />
|
||||
<el-table-column label="头像" align="center" prop="avatar" >
|
||||
<template slot-scope="scope">
|
||||
<el-avatar :src="scope.row.avatar"></el-avatar>
|
||||
|
|
@ -87,8 +96,9 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用户名称" align="center" prop="userName" />
|
||||
<el-table-column label="手机号" align="center" prop="telephone" />
|
||||
<el-table-column label="生日" align="center" prop="birthday" width="180">
|
||||
<el-table-column label="真实姓名" align="center" prop="realName" />
|
||||
<el-table-column label="手机号" align="center" prop="telephone" width="180"/>
|
||||
<el-table-column label="生日" align="center" prop="birthday" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
|
|
@ -118,13 +128,13 @@
|
|||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:wxUser:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:wxUser:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -138,9 +148,9 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改微信用户对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="删除表示" prop="isDeleted">
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="180px">
|
||||
<!-- <el-form-item label="删除表示" prop="isDeleted">
|
||||
<el-input v-model="form.isDeleted" placeholder="请输入删除表示" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createdTime">
|
||||
|
|
@ -153,18 +163,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="createdBy">
|
||||
<el-input v-model="form.createdBy" placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="修改人" prop="modifiedBy">
|
||||
<el-input v-model="form.modifiedBy" placeholder="请输入修改人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最新更新时间" prop="lastUpdatedTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.lastUpdatedTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择最新更新时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="登录名称" prop="loginName">
|
||||
<el-input v-model="form.loginName" placeholder="请输入登录名称" />
|
||||
</el-form-item>
|
||||
|
|
@ -183,6 +182,9 @@
|
|||
<el-form-item label="用户名称" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入用户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入真实姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="telephone">
|
||||
<el-input v-model="form.telephone" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
|
|
@ -200,11 +202,11 @@
|
|||
<el-form-item label="体重" prop="weight">
|
||||
<el-input v-model="form.weight" placeholder="请输入体重" />
|
||||
</el-form-item>
|
||||
<el-form-item label="球队位置【字典】" prop="teamPosition">
|
||||
<el-input v-model="form.teamPosition" placeholder="请输入球队位置【字典】" />
|
||||
<el-form-item label="球队位置" prop="teamPosition">
|
||||
<el-input v-model="form.teamPosition" placeholder="请输入球队位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标签【字典】" prop="tag">
|
||||
<el-input v-model="form.tag" placeholder="请输入标签【字典】" />
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-input v-model="form.tag" placeholder="请输入标签" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="enabled">
|
||||
<el-input v-model="form.enabled" placeholder="请输入状态" />
|
||||
|
|
@ -259,6 +261,8 @@ export default {
|
|||
pageSize: 10,
|
||||
loginName: null,
|
||||
userName: null,
|
||||
orderByColumn:"id",
|
||||
isAsc:"desc"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -366,6 +370,12 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
/** 排序触发事件 */
|
||||
handleSortChange(column, prop, order) {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
this.getList();
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
|
|
|
|||
Loading…
Reference in New Issue