Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0
| | |
| | | package com.dsh.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.account.entity.Referee; |
| | | import com.dsh.account.model.RefereeList; |
| | |
| | | |
| | | |
| | | /** |
| | | * 根据电话号码查询 |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | @PostMapping("/referee/getRefereeByPhone") |
| | | public Referee getRefereeByPhone(String phone){ |
| | | return refereeService.getOne(new QueryWrapper<Referee>() |
| | | .eq("phone", phone).ne("state", 3)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改裁判数据 |
| | | * @param referee |
| | | */ |
| | |
| | | EVENT_REGISTRATION("赛事报名"), |
| | | CANCEL_EVENT_REGISTRATION("取消赛事报名"), |
| | | CANCEL_VENUE_RESERVATION("取消场地预约"), |
| | | WORLD_CIP_PAYMENT("世界杯报名"), |
| | | CANCEL_WORLD_CIP_PAYMENT("取消世界杯报名"), |
| | | |
| | | |
| | | ; |
New file |
| | |
| | | package com.dsh.account.feignclient.communityWorldCup; |
| | | |
| | | import com.dsh.account.feignclient.communityWorldCup.model.GetWorldCupPayment; |
| | | import com.dsh.account.model.WorldCupPayment; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2024/3/12 17:47 |
| | | */ |
| | | @FeignClient("mb-cloud-communityWorldCup") |
| | | public interface WorldCupPaymentClinet { |
| | | |
| | | |
| | | /** |
| | | * 获取世界杯报名列表 |
| | | * @param getWorldCupPayment |
| | | * @return |
| | | */ |
| | | @PostMapping("/worldCup/getWorldCupPayment") |
| | | List<WorldCupPayment> getWorldCupPayment(GetWorldCupPayment getWorldCupPayment); |
| | | } |
New file |
| | |
| | | package com.dsh.account.feignclient.communityWorldCup.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2024/3/12 17:51 |
| | | */ |
| | | @Data |
| | | public class GetWorldCupPayment { |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer appUserId; |
| | | /** |
| | | * 支付方式(0=免费,1=微信,2=支付宝,3=玩湃币,4=课时) |
| | | */ |
| | | private Integer payType; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | } |
New file |
| | |
| | | package com.dsh.account.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/2/22 14:15 |
| | | */ |
| | | @Data |
| | | public class WorldCupPayment { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 支付流水号 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 世界杯id |
| | | */ |
| | | private Integer worldCupId; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer appUserId; |
| | | /** |
| | | * 支付方式(0=免费,1=微信,2=支付宝,3=玩湃币,4=课时) |
| | | */ |
| | | private Integer payType; |
| | | /** |
| | | * 支付单价 |
| | | */ |
| | | private BigDecimal unitPrice; |
| | | /** |
| | | * 支付金额 |
| | | */ |
| | | private BigDecimal amount; |
| | | /** |
| | | * 支付状态(1=待支付,2=已支付,3=已退款) |
| | | */ |
| | | private Integer payStatus; |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date payTime; |
| | | /** |
| | | * 第三方支付流水号 |
| | | */ |
| | | private String payOrderNo; |
| | | /** |
| | | * 退款时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date refundTime; |
| | | /** |
| | | * 第三方退款流水号 |
| | | */ |
| | | private String refundOrderNo; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | /** |
| | | * 参赛人数据 |
| | | */ |
| | | private String entrant; |
| | | } |
| | |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.VipPayment; |
| | | import com.dsh.account.enums.RechargeRecordEnum; |
| | | import com.dsh.account.feignclient.communityWorldCup.WorldCupPaymentClinet; |
| | | import com.dsh.account.feignclient.communityWorldCup.model.GetWorldCupPayment; |
| | | import com.dsh.account.feignclient.competition.DeductionCompetitionsClient; |
| | | import com.dsh.account.feignclient.competition.model.PaymentCompetition; |
| | | import com.dsh.account.feignclient.course.CoursePaymentClient; |
| | |
| | | import com.dsh.account.mapper.RechargeRecordsMapper; |
| | | import com.dsh.account.mapper.TAppUserMapper; |
| | | import com.dsh.account.model.IncomeQuery; |
| | | import com.dsh.account.model.WorldCupPayment; |
| | | import com.dsh.account.model.query.RechargeRecordsQuery; |
| | | import com.dsh.account.model.vo.RechargeRecordsVO; |
| | | import com.dsh.account.model.vo.userBenefitDetail.RechargeDetailsVo; |
| | |
| | | |
| | | @Resource |
| | | private RechargeConfigClient reconMapper; |
| | | @Autowired |
| | | @Resource |
| | | private RechargeRecordsMapper rechargeRecordsMapper; |
| | | |
| | | @Resource |
| | | private WorldCupPaymentClinet worldCupPaymentClinet; |
| | | |
| | | |
| | | @Override |
| | |
| | | details.add(consumeDetail); |
| | | } |
| | | } |
| | | |
| | | //世界杯 |
| | | GetWorldCupPayment getWorldCupPayment = new GetWorldCupPayment(); |
| | | getWorldCupPayment.setAppUserId(appUserId); |
| | | getWorldCupPayment.setPayType(3); |
| | | getWorldCupPayment.setStartTime(monthStart); |
| | | getWorldCupPayment.setEndTime(monthEnd); |
| | | List<WorldCupPayment> worldCupPayment = worldCupPaymentClinet.getWorldCupPayment(getWorldCupPayment); |
| | | for (WorldCupPayment cupPayment : worldCupPayment) { |
| | | RechargesDetail consumeDetail = new RechargesDetail(); |
| | | if(cupPayment.getPayStatus() != 3){ |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.WORLD_CIP_PAYMENT.getMsg() + ":¥" + cupPayment.getAmount()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(cupPayment.getCreateTime())); |
| | | consumeDetail.setConsumeAmount("-" + cupPayment.getAmount()); |
| | | consumeDetail.setRecordId(2); |
| | | }else{ |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.CANCEL_WORLD_CIP_PAYMENT.getMsg() + ":¥" + cupPayment.getAmount()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(cupPayment.getCreateTime())); |
| | | consumeDetail.setConsumeAmount("+" + cupPayment.getAmount()); |
| | | consumeDetail.setRecordId(1); |
| | | } |
| | | details.add(consumeDetail); |
| | | } |
| | | |
| | | |
| | | if (ToolUtil.isNotEmpty(recordId)) { |
| | | details = details.stream() |
| | | .filter(record -> record.getRecordId().equals(recordId)) |
| | |
| | | @Resource |
| | | private CouponCityService cityService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | |
| | | @Resource |
| | | private StudentClient studentClient; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询注册赠送优惠券 判断当前优惠券限领数量 |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<CouponPackageResp>> queryAppuserCouponList(CouponPackageReq req) { |
| | | public ResultUtil<List<CouponPackageResp>> queryCouponPackage(CouponPackageReq req) { |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if (null == uid) { |
| | |
| | | List<Map<String, Object>> mapList = new ArrayList<>(); |
| | | LambdaQueryWrapper<UserPointsMerchandise> userPointsMerchandiseLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getPointsMerchandiseId, pointMercharsPayedVo.getId()); |
| | | userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1); |
| | | if (ToolUtil.isNotEmpty(pointMercharsPayedVo.getStatus())) { |
| | | userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getStatus, pointMercharsPayedVo.getStatus()); |
| | | } |
| | |
| | | Participant participant = participantClient.getParticipant(worldCupPaymentParticipant.getParticipantId()); |
| | | worldCupPeopleVo.setName(participant.getName()); |
| | | worldCupPeopleVo.setAge(null == participant.getBirthday() ? 0 : Integer.valueOf(sdf.format(new Date())) -Integer.valueOf(sdf.format(participant.getBirthday()))); |
| | | worldCupPeopleVo.setAvatar(appUser.getHeadImg()); |
| | | worldCupPeopleVo.setAvatar(participant.getHeadImg()); |
| | | worldCupPeopleVo.setParticipantType(2); |
| | | } |
| | | return ResultUtil.success(worldCupPeopleVo); |
| | |
| | | public Map<String, Object> userGameRecordList(@RequestBody UserGameRecordList userGameRecordList){ |
| | | return worldCupCompetitorService.userGameRecordList(userGameRecordList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取已报名人数 |
| | | * @param worldCupId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/worldCup/getRegisteredNumber") |
| | | public int getRegisteredNumber(@RequestBody Integer worldCupId){ |
| | | List<WorldCupPayment> list = worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("worldCupId", worldCupId) |
| | | .eq("payStatus", 2).eq("state", 1)); |
| | | List<Long> collect = list.stream().map(WorldCupPayment::getId).collect(Collectors.toList()); |
| | | if(collect.size() == 0){ |
| | | return 0; |
| | | } |
| | | return worldCupPaymentParticipantService.getCount(worldCupId, collect); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取支付记录 |
| | | * @param getWorldCupPayment |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/worldCup/getWorldCupPayment") |
| | | public List<WorldCupPayment> getWorldCupPayment(@RequestBody GetWorldCupPayment getWorldCupPayment){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | return worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("appUserId", getWorldCupPayment.getAppUserId()) |
| | | .eq("payType", getWorldCupPayment.getPayType()).ne("payStatus", 1).eq("state", 1) |
| | | .last(" and createTime between '" + sdf.format(getWorldCupPayment.getStartTime()) + "' and '" + sdf.format(getWorldCupPayment.getEndTime()) + "' order by createTime desc")); |
| | | } |
| | | } |
| | |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 头像 |
| | | */ |
| | | private String headImg; |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | |
| | | |
| | | |
| | | Map<String, Object> getUserGameRecordList(@Param("participantType") Integer participantType, @Param("participantId") Long participantId); |
| | | |
| | | |
| | | /** |
| | | * 获取比赛场次 |
| | | * @param worldCupId |
| | | * @return |
| | | */ |
| | | int getMatchTime(@Param("worldCupId") Integer worldCupId); |
| | | } |
New file |
| | |
| | | package com.dsh.communityWorldCup.model; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2024/3/12 17:51 |
| | | */ |
| | | @Data |
| | | public class GetWorldCupPayment { |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer appUserId; |
| | | /** |
| | | * 支付方式(0=免费,1=微信,2=支付宝,3=玩湃币,4=课时) |
| | | */ |
| | | private Integer payType; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | Map<String, Object> userGameRecordList(UserGameRecordList userGameRecordList); |
| | | |
| | | |
| | | /** |
| | | * 获取比赛场次 |
| | | * @param worldCupId |
| | | * @return |
| | | */ |
| | | int getMatchTime(Integer worldCupId); |
| | | } |
| | |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | | Map<String, Object> map = mapList.get(i); |
| | | Integer participantType = Integer.valueOf(map.get("participantType").toString()); |
| | | Integer participantId = Integer.valueOf(map.get("participantId").toString()); |
| | | Long participantId = Long.valueOf(map.get("participantId").toString()); |
| | | Integer num = Integer.valueOf(map.get("num").toString()); |
| | | if(null != participantId && participantId.equals(entrantRank.getId()) && participantType.equals(entrantRank.getIsStudent())){ |
| | | entrantRankVo.setNationalRank(i + 1); |
| | |
| | | for (int i = 0; i < mapList1.size(); i++) { |
| | | Map<String, Object> map = mapList1.get(i); |
| | | Integer participantType = Integer.valueOf(map.get("participantType").toString()); |
| | | Integer participantId = Integer.valueOf(map.get("participantId").toString()); |
| | | Long participantId = Long.valueOf(map.get("participantId").toString()); |
| | | Integer num = Integer.valueOf(map.get("num").toString()); |
| | | if(null != participantId && participantId.equals(entrantRank.getId()) && participantType.equals(entrantRank.getIsStudent())){ |
| | | entrantRankVo.setCityRank(i + 1); |
| | |
| | | matchRecord.setPageNo(pageNo); |
| | | MatchRecordVo matchRecordVo = new MatchRecordVo(); |
| | | int count = this.count(new QueryWrapper<WorldCupCompetitor>().eq("participantId", matchRecord.getId()) |
| | | .eq("participantType", matchRecord.getIsStudent())); |
| | | .eq("participantType", matchRecord.getIsStudent()).isNotNull("matchResult")); |
| | | matchRecordVo.setTotalSession(count); |
| | | List<MatchRecordList> matchRecord1 = this.baseMapper.getMatchRecord(matchRecord); |
| | | matchRecordVo.setList(matchRecord1); |
| | |
| | | } |
| | | //参赛人员 |
| | | if(participantType == 2){ |
| | | AppUser appUser1 = appUserClient.getAppUser(appUserId); |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | worldCupRankVo.setAvatar(appUser1.getHeadImg()); |
| | | worldCupRankVo.setAvatar(participant.getHeadImg()); |
| | | String name = participant.getName(); |
| | | if(name.length() > 2){ |
| | | name = name.charAt(0) + "*" + name.substring(2); |
| | |
| | | } |
| | | //参赛人员 |
| | | if(participantType == 2){ |
| | | AppUser appUser1 = appUserClient.getAppUser(appUserId); |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | worldCupRankVo.setAvatar(appUser1.getHeadImg()); |
| | | worldCupRankVo.setAvatar(participant.getHeadImg()); |
| | | String name = participant.getName(); |
| | | if(name.length() > 2){ |
| | | name = name.charAt(0) + "*" + name.substring(2); |
| | |
| | | if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone) && tStudent.getPhone().indexOf(phone) == -1){ |
| | | if(ToolUtil.isNotEmpty(phone) && (ToolUtil.isEmpty(tStudent.getPhone()) ? appUser.getPhone() : tStudent.getPhone()).indexOf(phone) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcard) && tStudent.getIdCard().indexOf(idcard) == -1){ |
| | |
| | | |
| | | map.put("name", tStudent.getName()); |
| | | map.put("phone", ToolUtil.isEmpty(tStudent.getPhone()) ? appUser.getPhone() : tStudent.getPhone()); |
| | | map.put("idcard", tStudent.getIdCard()); |
| | | }else{ |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | if(ToolUtil.isNotEmpty(name) && participant.getName().indexOf(name) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone) && participant.getPhone().indexOf(phone) == -1){ |
| | | if(ToolUtil.isNotEmpty(phone) && (ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()).indexOf(phone) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcard) && participant.getIdcard().indexOf(idcard) == -1){ |
| | |
| | | |
| | | map.put("name", participant.getName()); |
| | | map.put("phone", ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()); |
| | | map.put("idcard", participant.getIdcard()); |
| | | } |
| | | list.add(map); |
| | | } |
| | | map1.put("total", mapList.size()); |
| | | map1.put("total", list.size()); |
| | | Integer offset = worldCupGameStatisticsInfoList.getOffset(); |
| | | Integer limit = worldCupGameStatisticsInfoList.getLimit(); |
| | | limit += offset; |
| | | map1.put("rows", mapList.subList(offset, mapList.size() >= limit ? limit : mapList.size())); |
| | | map1.put("rows", list.subList(offset, list.size() >= limit ? limit : list.size())); |
| | | return map1; |
| | | } |
| | | |
| | |
| | | } |
| | | map.put("userName", participant.getName()); |
| | | } |
| | | map.put("score", ourScore.compareTo(opponentScore) > 0 ? |
| | | ourScore + ":" + opponentScore : |
| | | opponentScore + ":" + ourScore); |
| | | map.put("score", ourScore + ":" + opponentScore); |
| | | map.put("matchResult", matchResult == 1 ? "胜" : matchResult == 0 ? "平" :"负"); |
| | | mapList.add(map); |
| | | } |
| | |
| | | map.put("rows", mapList.subList(offset, mapList.size() >= limit ? limit : mapList.size())); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取比赛场次 |
| | | * @param worldCupId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int getMatchTime(Integer worldCupId) { |
| | | return this.baseMapper.getMatchTime(worldCupId); |
| | | } |
| | | } |
| | |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | participantVo.setId(participant.getId()); |
| | | participantVo.setName(participant.getName()); |
| | | participantVo.setAvatar(appUser.getHeadImg()); |
| | | participantVo.setAvatar(participant.getHeadImg()); |
| | | int age = Integer.valueOf(sdf.format(new Date())) - Integer.valueOf(sdf.format(participant.getBirthday())); |
| | | participantVo.setAge(age); |
| | | participantVo.setIdcard(participant.getIdcard()); |
| | |
| | | for (WorldCupPaymentParticipant on : list1) { |
| | | WorldCupPayment worldCupPayment = worldCupPaymentService.getById(on.getWorldCupPaymentId()); |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | AppUser appUser = appUserClient.getAppUser(on.getAppUserId()); |
| | | if(on.getParticipantType() == 1){ |
| | | TStudent tStudent = studentClient.queryById(on.getParticipantId().intValue()); |
| | | if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone) && tStudent.getPhone().indexOf(phone) == -1){ |
| | | if(ToolUtil.isNotEmpty(phone) && (ToolUtil.isEmpty(tStudent.getPhone()) ? appUser.getPhone() : tStudent.getPhone()).indexOf(phone) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcode) && tStudent.getIdCard().indexOf(idcode) == -1){ |
| | |
| | | map1.put("name", tStudent.getName()); |
| | | map1.put("gender", tStudent.getSex() == 1 ? "男" : "女"); |
| | | map1.put("age", Integer.valueOf(sdf.format(new Date())) - Integer.valueOf(sdf.format(tStudent.getBirthday()))); |
| | | map1.put("phone", tStudent.getPhone()); |
| | | map1.put("phone", ToolUtil.isEmpty(tStudent.getPhone()) ? appUser.getPhone() : tStudent.getPhone()); |
| | | map1.put("idcard", tStudent.getIdCard()); |
| | | map1.put("state", worldCupPayment.getPayStatus() - 1); |
| | | }else{ |
| | |
| | | if(ToolUtil.isNotEmpty(name) && participant.getName().indexOf(name) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone) && participant.getPhone().indexOf(phone) == -1){ |
| | | if(ToolUtil.isNotEmpty(phone) && (ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()).indexOf(phone) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcode) && participant.getIdcard().indexOf(idcode) == -1){ |
| | |
| | | map1.put("name", participant.getName()); |
| | | map1.put("gender", participant.getGender() == 1 ? "男" : "女"); |
| | | map1.put("age", Integer.valueOf(sdf.format(new Date())) - Integer.valueOf(sdf.format(participant.getBirthday()))); |
| | | map1.put("phone", participant.getPhone()); |
| | | map1.put("phone", ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()); |
| | | map1.put("idcard", participant.getIdcard()); |
| | | map1.put("state", worldCupPayment.getPayStatus() - 1); |
| | | } |
| | |
| | | if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone) && tStudent.getPhone().indexOf(phone) == -1){ |
| | | if(ToolUtil.isNotEmpty(phone) && (ToolUtil.isEmpty(tStudent.getPhone()) ? appUser.getPhone() : tStudent.getPhone()).indexOf(phone) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcard) && tStudent.getIdCard().indexOf(idcard) == -1){ |
| | |
| | | if(ToolUtil.isNotEmpty(name) && participant.getName().indexOf(name) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone) && participant.getPhone().indexOf(phone) == -1){ |
| | | if(ToolUtil.isNotEmpty(phone) && (ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()).indexOf(phone) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcard) && participant.getIdcard().indexOf(idcard) == -1){ |
| | |
| | | //开始处理退款 |
| | | //免费 |
| | | if(worldCupPayment.getPayType() == 0){ |
| | | worldCupPayment.setWorldCupId(null); |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setPayStatus(3); |
| | |
| | | } |
| | | if("10000".equals(map.get("code"))){ |
| | | String trade_no = map.get("trade_no"); |
| | | worldCupPayment.setWorldCupId(null); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setRefundOrderNo(trade_no); |
| | | worldCupPayment.setPayStatus(3); |
| | |
| | | AppUser appUser = appUserClient.getAppUser(appUserId); |
| | | appUser.setPlayPaiCoins(appUser.getPlayPaiCoins() + multiply.intValue()); |
| | | appUserClient.updateAppUser(appUser); |
| | | worldCupPayment.setWorldCupId(null); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setPayStatus(3); |
| | |
| | | DeductionClassHourList deductionClassHourList = JSON.parseObject(content, DeductionClassHourList.class); |
| | | coursePackageOrderStudentClient.backspaceClassHour(deductionClassHourList); |
| | | } |
| | | worldCupPayment.setWorldCupId(null); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setPayStatus(3); |
| | |
| | | |
| | | String people = startWorldCup.getPeople(); |
| | | JSONArray jsonArray = JSON.parseArray(people); |
| | | if(jsonArray.size() != 6){ |
| | | return ResultUtil.error("参赛人数只能是6人"); |
| | | } |
| | | String timeStr = UUIDUtil.getTimeStr() + UUIDUtil.getNumberRandom(3); |
| | | List<Long> ids = new ArrayList<>(); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | |
| | | // worldCupPaymentParticipant.setAlreadyEntered(1); |
| | | // worldCupPaymentParticipantService.updateById(worldCupPaymentParticipant); |
| | | } |
| | | worldCup.setMatchNumber(worldCup.getMatchNumber() + 1); |
| | | this.updateById(worldCup); |
| | | |
| | | //2、调起开启游戏的接口。 |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); |
| | |
| | | Collections.sort(worldCupList1, new Comparator<WorldCupListVo>() { |
| | | @Override |
| | | public int compare(WorldCupListVo o1, WorldCupListVo o2) { |
| | | return o1.getDistance().compareTo(o2.getDistance()) * -1; |
| | | return o1.getDistance().compareTo(o2.getDistance()); |
| | | } |
| | | }); |
| | | } |
| | |
| | | if(ids.size() > 0){ |
| | | int count = worldCupPaymentParticipantService.count(new QueryWrapper<WorldCupPaymentParticipant>().eq("worldCupId", worldCup.getId()) |
| | | .eq("worldCupPaymentId", ids)); |
| | | if((count + jsonArray.size()) >= worldCup.getMatchNumber()){ |
| | | if((count + jsonArray.size()) >= worldCup.getMaxPeople()){ |
| | | return ResultUtil.error("已超出最大报名人数"); |
| | | } |
| | | } |
| | |
| | | |
| | | appUser.setPlayPaiCoins(appUser.getPlayPaiCoins() - multiply.intValue()); |
| | | appUserClient.updateAppUser(appUser); |
| | | // |
| | | |
| | | //添加报名明细 |
| | | String ids = paymentWorldCup.getIds(); |
| | |
| | | BigDecimal multiply = worldCupPayment.getUnitPrice().multiply(new BigDecimal(list1.size())); |
| | | //免费 |
| | | if(worldCupPayment.getPayType() == 0){ |
| | | worldCupPayment.setWorldCupId(null); |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setPayStatus(3); |
| | |
| | | } |
| | | if("10000".equals(map.get("code"))){ |
| | | String trade_no = map.get("trade_no"); |
| | | worldCupPayment.setWorldCupId(null); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setRefundOrderNo(trade_no); |
| | | worldCupPayment.setPayStatus(3); |
| | |
| | | AppUser appUser = appUserClient.getAppUser(appUserId); |
| | | appUser.setPlayPaiCoins(appUser.getPlayPaiCoins() + multiply.intValue()); |
| | | appUserClient.updateAppUser(appUser); |
| | | worldCupPayment.setWorldCupId(null); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setPayStatus(3); |
| | |
| | | DeductionClassHourList deductionClassHourList = JSON.parseObject(content, DeductionClassHourList.class); |
| | | coursePackageOrderStudentClient.backspaceClassHour(deductionClassHourList); |
| | | } |
| | | worldCupPayment.setWorldCupId(null); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setPayStatus(3); |
| | |
| | | List<Map<String, Object>> mapList = this.baseMapper.worldCupGameStatistics(worldCupGameStatistics); |
| | | for (Map<String, Object> stringObjectMap : mapList) { |
| | | Integer id = Integer.valueOf(stringObjectMap.get("id").toString()); |
| | | int count = worldCupCompetitorService.count(new QueryWrapper<WorldCupCompetitor>().eq("worldCupId", id)); |
| | | int count = worldCupCompetitorService.getMatchTime(id); |
| | | stringObjectMap.put("matchTime", count); |
| | | |
| | | List<WorldCupPayment> list = worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("worldCupId", id) |
| | |
| | | participantId, |
| | | count(*) as num |
| | | from t_world_cup_competitor |
| | | where DATE_FORMAT(NOW(), '%Y-%m-%d') = DATE_FORMAT(startTime, '%Y-%m-%d') |
| | | where matchResult is not null and DATE_FORMAT(NOW(), '%Y') = DATE_FORMAT(startTime, '%Y') |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | | <foreach collection="appUserIds" item="item" index="index" open="(" separator="," close=")"> |
| | |
| | | </foreach> |
| | | </if> |
| | | group by participantType, participantId |
| | | ) as aa order by aa.num desc |
| | | ) as aa order by aa.num desc,aa.participantId |
| | | </select> |
| | | |
| | | |
| | |
| | | (a.participationIntegral + a.winIntegral) as award |
| | | from t_world_cup_competitor a |
| | | left join t_world_cup b on (a.worldCupId = b.id) |
| | | where a.participantId = #{item.id} and a.participantType = #{item.isStudent} |
| | | where a.matchResult is not null and a.participantId = #{item.id} and a.participantType = #{item.isStudent} |
| | | order by a.startTime desc limit #{item.pageNo}, #{item.pageSize} |
| | | </select> |
| | | |
| | |
| | | ) as b on (a.participantId = b.participantId and a.participantType = b.participantType) |
| | | ) as aa |
| | | <if test="null != item.sort and item.sort == 1"> |
| | | order by aa.totalSession desc |
| | | order by aa.totalSession desc,aa.participantId |
| | | </if> |
| | | <if test="null != item.sort and item.sort == 2"> |
| | | order by aa.winRate desc |
| | | order by aa.winRate desc,aa.participantId |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | group by participantType, participantId, appUserId |
| | | ) as b on (a.participantId = b.participantId and a.participantType = b.participantType) |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getMatchTime" resultType="int"> |
| | | select count(*) as matchTime from (select code from t_world_cup_competitor where worldCupId = #{worldCupId} group by code) as b |
| | | </select> |
| | | </mapper> |
| | |
| | | and a.name like CONCAT('%', #{item.content}, '%') |
| | | </if> |
| | | <if test="null != item.storeId"> |
| | | and a.id in (select worldCupId from t_world_cup_store where storeId = #{item.storeId} and isOpen = 1) |
| | | and a.id in (select worldCupId from t_world_cup_store where storeId = #{item.storeId}) |
| | | </if> |
| | | <if test="null != item.gender"> |
| | | and #{item.gender} = a.gender |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil delParticipant(Integer id) { |
| | | public ResultUtil delParticipant(Integer id, Integer isStudent) { |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if (null == uid) { |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return participantService.delParticipant(id); |
| | | return participantService.delParticipant(id, isStudent); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | @TableField("name") |
| | | private String name; |
| | | /** |
| | | * 头像 |
| | | */ |
| | | @TableField("headImg") |
| | | private String headImg; |
| | | /** |
| | | * 生日 |
| | | */ |
| | | @TableField("birthday") |
| | |
| | | public class AddParticipant { |
| | | @ApiModelProperty(value = "姓名", dataType = "string", required = true) |
| | | private String name; |
| | | @ApiModelProperty(value = "头像", dataType = "string", required = true) |
| | | private String headImg; |
| | | @ApiModelProperty(value = "生日", dataType = "string", required = true) |
| | | private String birthday; |
| | | @ApiModelProperty(value = "性别(1=男,2=女)", dataType = "int", required = true) |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil delParticipant(Integer id) throws Exception; |
| | | ResultUtil delParticipant(Integer id, Integer isStudent) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil delParticipant(Integer id) throws Exception { |
| | | public ResultUtil delParticipant(Integer id, Integer isStudent) throws Exception { |
| | | if(isStudent == 1){ |
| | | TStudent tStudent = studentClient.queryById(id); |
| | | tStudent.setState(3); |
| | | studentClient.updateAppUser(tStudent); |
| | | }else{ |
| | | Participant participant = this.getById(id); |
| | | participant.setState(3); |
| | | this.updateById(participant); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/referee/getRefereeById") |
| | | Referee getRefereeById(Integer id); |
| | | |
| | | |
| | | /** |
| | | * 根据电话号码查询 |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | @PostMapping("/referee/getRefereeByPhone") |
| | | Referee getRefereeByPhone(String phone); |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PostMapping("/worldCup/userGameRecordList") |
| | | Map<String, Object> userGameRecordList(UserGameRecordList userGameRecordList); |
| | | |
| | | /** |
| | | * 获取已报名人数 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/worldCup/getRegisteredNumber") |
| | | int getRegisteredNumber(Integer worldCupId); |
| | | } |
| | |
| | | @ResponseBody |
| | | @PostMapping("/addReferee") |
| | | public ResultUtil addReferee(Referee referee){ |
| | | Referee refereeByPhone = refereeClient.getRefereeByPhone(referee.getPhone()); |
| | | if(null != refereeByPhone){ |
| | | return ResultUtil.error("电话号码已使用"); |
| | | } |
| | | Region region = regionService.getOne(new QueryWrapper<Region>().eq("code", referee.getProvinceCode())); |
| | | referee.setProvince(region.getName()); |
| | | region = regionService.getOne(new QueryWrapper<Region>().eq("code", referee.getCityCode())); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/editReferee") |
| | | public ResultUtil editReferee(Referee referee){ |
| | | Referee refereeByPhone = refereeClient.getRefereeByPhone(referee.getPhone()); |
| | | if(null != refereeByPhone && !referee.getId().equals(refereeByPhone.getId())){ |
| | | return ResultUtil.error("电话号码已使用"); |
| | | } |
| | | Region region = regionService.getOne(new QueryWrapper<Region>().eq("code", referee.getProvinceCode())); |
| | | referee.setProvince(region.getName()); |
| | | region = regionService.getOne(new QueryWrapper<Region>().eq("code", referee.getCityCode())); |
| | |
| | | if(worldCup1.getStartTime().before(DateUtil.getDate())){ |
| | | return ResultUtil.error("赛事已开始,不能编辑"); |
| | | } |
| | | Integer maxPeople = worldCup1.getMaxPeople(); |
| | | int registeredNumber = worldCupClient.getRegisteredNumber(worldCup.getId()); |
| | | if(maxPeople.compareTo(registeredNumber) < 0){ |
| | | return ResultUtil.error("报名人数不能小于已报名人数"); |
| | | } |
| | | if(worldCup.getStartTime().before(new Date())){ |
| | | worldCup.setStatus(2); |
| | | }else{ |
| | |
| | | public void exportUserStatistics(WorldCupGameStatisticsInfoList worldCupGameStatisticsInfoList, HttpServletResponse response){ |
| | | worldCupGameStatisticsInfoList.setOffset(0); |
| | | worldCupGameStatisticsInfoList.setLimit(100000); |
| | | Map<String, Object> map = worldCupClient.worldCupGameStatisticsInfoList(worldCupGameStatisticsInfoList); |
| | | Map<String, Object> map = worldCupClient.getUserGameRecordList(worldCupGameStatisticsInfoList); |
| | | List<Map<String, Object>> list = (List<Map<String, Object>>)map.get("rows"); |
| | | |
| | | try { |
| | |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.get("name").toString(); |
| | | values[i][1] = d.get("phone").toString(); |
| | | values[i][2] = d.get("idcard").toString(); |
| | | values[i][2] = null == d.get("idcard") ? "" : d.get("idcard").toString(); |
| | | values[i][3] = d.get("totalSession").toString(); |
| | | values[i][4] = d.get("win").toString() + "-" + d.get("lose").toString(); |
| | | values[i][5] = d.get("winRate").toString() + "%"; |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/worldCup/worldCup_info.js"></script> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <script src="${ctxPath}/modular/system/worldCup/worldCup_info.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/worldCup/worldCup_info.js"></script> |
| | | <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> |
| | | <script src="${ctxPath}/modular/system/worldCup/worldCup_info.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | |
| | | <#button name="重置" icon="fa-trash" clickFun="WorldCupGameStatisticsListInfo.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="WorldCupGameStatisticsListInfoTableToolbar" role="group"> |
| | | <#button name="比赛详情" icon="fa-plus" clickFun="WorldCupGameStatisticsListInfo.openWorldCupGameStatisticsListInfo()"/> |
| | | </div> |
| | | <#table id="WorldCupGameStatisticsListInfoTable"/> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="panel-body"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="用户姓名:" /> |
| | | <#NameCon id="userName" name="用户姓名:" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="联系电话:" /> |
| | |
| | | ' <div class="form-group" >\n' + |
| | | ' <label class="col-sm-3 control-label">*手机号:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="addPhone" placeholder="请输入">' + |
| | | ' <input class="form-control" id="addPhone" type="text" placeholder="请输入" maxlength="11">' + |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group" >\n' + |
| | |
| | | } |
| | | if(null == addPhone || '' == addPhone){ |
| | | Feng.info("手机号不能为空"); |
| | | return |
| | | } |
| | | //定义正则表达式 |
| | | var reg='^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-9])|(18[0-9])|166|198|199|191|(147))\\d{8}$'; |
| | | //创建正则表达式对象 |
| | | var regExp=new RegExp(reg); |
| | | //使用test()函数验证数据是否匹配正则表达式,匹配返回true,否则返回false |
| | | if (!regExp.test(addPhone)) { |
| | | Feng.info("手机号格式不正确"); |
| | | return |
| | | } |
| | | if(null == addProvince || '' == addProvince){ |
| | |
| | | ' <div class="form-group" >\n' + |
| | | ' <label class="col-sm-3 control-label">*手机号:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="addPhone" placeholder="请输入">' + |
| | | ' <input class="form-control" id="addPhone" type="text" placeholder="请输入" maxlength="11"/>' + |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group" >\n' + |
| | |
| | | Feng.info("手机号不能为空"); |
| | | return |
| | | } |
| | | //定义正则表达式 |
| | | var reg='^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-9])|(18[0-9])|166|198|199|191|(147))\\d{8}$'; |
| | | //创建正则表达式对象 |
| | | var regExp=new RegExp(reg); |
| | | //使用test()函数验证数据是否匹配正则表达式,匹配返回true,否则返回false |
| | | if (!regExp.test(addPhone)) { |
| | | Feng.info("手机号格式不正确"); |
| | | return |
| | | } |
| | | if (null == addProvince || '' == addProvince) { |
| | | Feng.info("请选择所在省"); |
| | | return |
| | |
| | | {title: '身份证号', field: 'idcard', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '二维码', field: '', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data, item) { |
| | | return '<a href="#" onclick="RegisteredPersonnel.openQRCode(' + item.id + ', ' + item.isStudent + ',\'' + item.name + '\')">二维码</a>' |
| | | return '<a href="#" onclick="RegisteredPersonnel.openQRCode(' + item.id + ', ' + item.isStudent + ',\'' + item.name + '\')" style="color:blue;">查看</a>' |
| | | } |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | |
| | | WorldCup.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: 'id', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '比赛名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',}, |
| | | {title: '开始时间', field: 'startTime', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '结束时间', field: 'endTime', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '用户姓名', field: 'name', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在城市', field: 'province', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证号', field: 'idcard', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '已比赛场次', field: 'totalSession', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '胜-负场次', field: 'win', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data, item) { |
| | |
| | | {title: '结果', field: 'matchResult', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return '<a href="#" onclick="WorldCupGameStatisticsListInfo.changeScore(\'' + data + '\')">修改比分</a>'; |
| | | return '<a href="#" onclick="WorldCupGameStatisticsListInfo.changeScore(\'' + data + '\')" style="color:blue;">修改比分</a>'; |
| | | } |
| | | }, |
| | | ]; |
| | |
| | | WorldCupGameStatisticsListInfo.changeScore = function (id) { |
| | | const str = '<div class="row">\n' + |
| | | ' <div class="form-group" style="height: 50px;">\n' + |
| | | ' <label class="col-sm-3 control-label">蓝方得分:</label>' + |
| | | ' <label class="col-sm-3 control-label" style="text-align: right;">蓝方得分:</label>' + |
| | | ' <div class="col-sm-8">\n' + |
| | | ' <input id="blue" type="number" min="0"/>\n' + |
| | | ' <input id="blue" class="form-control" type="number" min="0"/>\n' + |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group" style="height: 50px;">\n' + |
| | | ' <label class="col-sm-3 control-label">红方得分:</label>' + |
| | | ' <label class="col-sm-3 control-label" style="text-align: right;">红方得分:</label>' + |
| | | ' <div class="col-sm-8">\n' + |
| | | ' <input id="red" type="number" min="0"/>\n' + |
| | | ' <input id="red" class="form-control" type="number" min="0"/>\n' + |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' |
| | | layer.open({ |
| | | type: 1 |
| | | ,title: '修改比分' |
| | | ,area: ['500px', '400px'] |
| | | ,area: ['500px', '300px'] |
| | | ,offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | ,id: 'layerDemo' //防止重复弹出 |
| | | ,content: '<div style="padding: 20px">' + str + '</div>' |
| | | ,btnAlign: 'c' //按钮居中 |
| | | ,shade: 0.5 //不显示遮罩 |
| | | ,btn: ['确认', '关闭'] |
| | | ,yes: function (){ |
| | | let blue = $('#blue').val(); |
| | | let red = $('#red').val(); |
| | |
| | | |
| | | WorldCupRecords.exportUserStatistics = function (){ |
| | | let phone = $("#phone").val(); |
| | | let name =$("#name").val(); |
| | | let name =$("#userName").val(); |
| | | let idcard =$("#idcard").val(); |
| | | window.location.href = Feng.ctxPath + '/worldCupRecords/exportUserStatistics?phone=' + phone + "&name=" + name + "&idcard=" + idcard |
| | | } |
| | |
| | | WorldCupRecords.search3 = function () { |
| | | var queryData = {}; |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['name'] =$("#name").val(); |
| | | queryData['name'] =$("#userName").val(); |
| | | queryData['idcard'] =$("#idcard").val(); |
| | | WorldCupRecords.table3.refresh({query: queryData}); |
| | | }; |
| | | |
| | | WorldCupRecords.resetSearch3 = function () { |
| | | $("#province").val(""); |
| | | $("#city").val(""); |
| | | $("#phone").val(""); |
| | | $("#userName").val(""); |
| | | $("#idcard").val(""); |
| | | WorldCupRecords.search3(); |
| | | }; |
| | | |
| | |
| | | import com.dsh.other.service.IHomeModuleService; |
| | | import com.dsh.other.service.StoreConfigService; |
| | | import com.dsh.other.util.ResultUtil; |
| | | import com.dsh.other.util.ToolUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | StoreConfigVo vo = new StoreConfigVo(); |
| | | vo.setType(0); |
| | | vo.setIsOpen(homeModule.getIsOpen()); |
| | | vo.setIsTop(homeModule.getIsTop()); |
| | | vo.setSort(homeModule.getSort()); |
| | | vo.setBackgroundImage(homeModule.getBackgroundImage()); |
| | | listVo.add(vo); |
| | | } |
| | | for (StoreConfig storeConfig : list) { |
| | | StoreConfigVo storeConfigVo = new StoreConfigVo(); |
| | | storeConfigVo.setIsTop(0); |
| | | BeanUtils.copyProperties(storeConfig, storeConfigVo); |
| | | if (!StringUtils.hasLength(storeConfig.getBackgroundImage())) { |
| | | switch (storeConfigVo.getType()) { |
| | |
| | | List<WorldCupStore> worldCupStoreList = worldCupStoreClient.getWorldCupStoreList(storeId); |
| | | for (WorldCupStore worldCupStore : worldCupStoreList) { |
| | | StoreConfigVo storeConfigVo = new StoreConfigVo(); |
| | | storeConfigVo.setIsTop(0); |
| | | storeConfigVo.setId(worldCupStore.getWorldCupId()); |
| | | storeConfigVo.setBackgroundImage(worldCupStore.getBackgroundImage()); |
| | | storeConfigVo.setBackgroundImage(ToolUtil.isNotEmpty(worldCupStore.getBackgroundImage()) ? worldCupStore.getBackgroundImage() : "https://we-park-life.oss-cn-beijing.aliyuncs.com/img/760934115ff6468591ed51f0d760a989.jpg"); |
| | | storeConfigVo.setType(9); |
| | | storeConfigVo.setIsOpen(worldCupStore.getIsOpen()); |
| | | storeConfigVo.setSort(worldCupStore.getSort()); |
| | |
| | | return o1.getSort().compareTo(o2.getSort()); |
| | | } |
| | | }); |
| | | //排序 |
| | | Collections.sort(listVo, new Comparator<StoreConfigVo>() { |
| | | @Override |
| | | public int compare(StoreConfigVo o1, StoreConfigVo o2) { |
| | | return o1.getIsTop().compareTo(o2.getIsTop()) * -1; |
| | | } |
| | | }); |
| | | for (int i = 0; i < listVo.size(); i++) { |
| | | listVo.get(i).setSort(i + 1); |
| | | } |
| | | return ResultUtil.success(listVo); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | private Integer type; |
| | | @ApiModelProperty("是否开启(0=否,1=是)") |
| | | private Integer isOpen; |
| | | @ApiModelProperty("置顶(0=否,1=是)") |
| | | private Integer isTop; |
| | | @ApiModelProperty("排序") |
| | | private Integer sort; |
| | | @ApiModelProperty("背景图") |