Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<WorldCupPeopleVo> getWorldCupPeople(WorldCupPeople worldCupPeople){ |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = worldCupPaymentParticipantService.getById(worldCupPeople.getCode()); |
| | | JSONObject jsonObject = JSON.parseObject(worldCupPeople.getCode()); |
| | | Long id = jsonObject.getLong("id"); |
| | | Integer isStudent = jsonObject.getInteger("isStudent"); |
| | | if(0 == isStudent){ |
| | | isStudent = 2; |
| | | } |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = worldCupPaymentParticipantService.getOne(new QueryWrapper<WorldCupPaymentParticipant>() |
| | | .eq("worldCupId", worldCupPeople.getWorldCupId()).eq("participantId", id).eq("participantType", isStudent) |
| | | .orderByDesc("createTime").last(" limit 0, 1")); |
| | | if(null == worldCupPaymentParticipant){ |
| | | return ResultUtil.error("无效二维码"); |
| | | } |
| | | if(worldCupPaymentParticipant.getWorldCupId().compareTo(worldCupPeople.getWorldCupId()) != 0){ |
| | | return ResultUtil.error("报名失败,当前用户未报名当前比赛"); |
| | | } |
| | | WorldCupPeopleVo worldCupPeopleVo = new WorldCupPeopleVo(); |
| | | worldCupPeopleVo.setId(worldCupPaymentParticipant.getId()); |
| | |
| | | return ResultUtil.error("二维码不正确"); |
| | | } |
| | | Integer space_id = jsonObject.getInteger("space_id"); |
| | | Site site = siteClient.getSite(space_id); |
| | | if(null == site){ |
| | | Store store = storeClient.queryStoreById(space_id); |
| | | if(null == store){ |
| | | return ResultUtil.error("无法获取场地信息"); |
| | | } |
| | | Store store = storeClient.queryStoreById(site.getStoreId()); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("name", store.getName()); |
| | | map.put("address", site.getName()); |
| | | map.put("address", store.getAddress()); |
| | | return ResultUtil.success(map); |
| | | } |
| | | |
| | |
| | | public List<WorldCupStore> getWorldCupStoreList(@RequestBody Integer storeId){ |
| | | List<WorldCup> worldCupList = worldCupService.list(new QueryWrapper<WorldCup>().in("status", Arrays.asList(1, 2))); |
| | | List<Integer> collect = worldCupList.stream().map(WorldCup::getId).collect(Collectors.toList()); |
| | | return worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId).in("worldCupId", collect)); |
| | | return worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId).in("worldCupId", collect).eq("isOpen", 1)); |
| | | } |
| | | |
| | | |
| | |
| | | return ResultUtil.success(myWorldCupInfo); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/worldCup/cancelMyWorldCup") |
| | | @ApiOperation(value = "取消已报名的世界杯【2.0】", tags = {"APP-个人中心"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "列表中的id", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil cancelMyWorldCup(String id){ |
| | | return worldCupPaymentService.cancelMyWorldCup(id); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<WorldCupRankVo>> getWorldCupRank(WorldCupRank worldCupRank){ |
| | | List<WorldCupRankVo> worldCupRank1 = worldCupCompetitorService.getWorldCupRank(worldCupRank); |
| | | return ResultUtil.success(worldCupRank1); |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | worldCupRank.setAppUserId(uid); |
| | | List<WorldCupRankVo> worldCupRank1 = worldCupCompetitorService.getWorldCupRank(worldCupRank); |
| | | return ResultUtil.success(worldCupRank1); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<WorldCupListVo> getMyWorldCupList(@Param("item") MyWorldCupList myWorldCupList); |
| | | |
| | | |
| | | |
| | | int getCount(@Param("worldCupId") Integer worldCupId, @Param("worldCupPaymentId")List<Long> worldCupPaymentId); |
| | | } |
| | |
| | | private String content; |
| | | @ApiModelProperty("热度") |
| | | private Integer heat; |
| | | @ApiModelProperty("比赛状态(1=未开始,2=已开始,3=已结束,4=已取消)") |
| | | private Integer status; |
| | | private Double distance; |
| | | private String lon; |
| | | private String lat; |
| | |
| | | @Data |
| | | @ApiModel |
| | | public class WorldCupRankVo { |
| | | @ApiModelProperty("排名") |
| | | private Integer rank; |
| | | @ApiModelProperty("姓名") |
| | | private String name; |
| | | @ApiModelProperty("头像") |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.communityWorldCup.entity.WorldCupPaymentParticipant; |
| | | import com.dsh.communityWorldCup.model.*; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return |
| | | */ |
| | | Map<String, Object> getRegisteredPersonnel(RegisteredPersonnel registeredPersonnel); |
| | | |
| | | |
| | | int getCount(Integer worldCupId, List<Long> worldCupPaymentId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.communityWorldCup.entity.WorldCupPayment; |
| | | import com.dsh.communityWorldCup.util.ResultUtil; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/2/22 14:22 |
| | | */ |
| | | public interface IWorldCupPaymentService extends IService<WorldCupPayment> { |
| | | |
| | | |
| | | /** |
| | | * 取消已报名的世界杯 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | ResultUtil cancelMyWorldCup(String id); |
| | | } |
| | |
| | | boolean b = false; |
| | | if(i <= 19){ |
| | | WorldCupRankVo worldCupRankVo = new WorldCupRankVo(); |
| | | worldCupRankVo.setRank(i + 1); |
| | | worldCupRankVo.setTotalSession(totalSession); |
| | | worldCupRankVo.setWinRate(winRate); |
| | | //学员 |
| | |
| | | if(i > 19 && !b){ |
| | | if(worldCupRank.getIsStudent().equals(participantType) && worldCupRank.getId().equals(participantId)){ |
| | | WorldCupRankVo worldCupRankVo = new WorldCupRankVo(); |
| | | worldCupRankVo.setRank(i + 1); |
| | | worldCupRankVo.setTotalSession(totalSession); |
| | | worldCupRankVo.setWinRate(winRate); |
| | | //学员 |
| | |
| | | Integer limit = registeredPersonnel.getLimit(); |
| | | QueryWrapper<WorldCupPayment> queryWrapper = new QueryWrapper<WorldCupPayment>() |
| | | .eq("worldCupId", id).eq("state", 1); |
| | | if(status == 1){ |
| | | if(null == status){ |
| | | queryWrapper.in("payStatus", Arrays.asList(2, 3)); |
| | | }else if(status == 1){ |
| | | queryWrapper.eq("payStatus", 2); |
| | | }else{ |
| | | queryWrapper.eq("payStatus", 3); |
| | |
| | | map.put("total", list2.size()); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int getCount(Integer worldCupId, List<Long> worldCupPaymentId) { |
| | | return this.baseMapper.getCount(worldCupId, worldCupPaymentId); |
| | | } |
| | | } |
| | |
| | | package com.dsh.communityWorldCup.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.communityWorldCup.entity.WorldCup; |
| | | import com.dsh.communityWorldCup.entity.WorldCupPayment; |
| | | import com.dsh.communityWorldCup.entity.WorldCupPaymentParticipant; |
| | | import com.dsh.communityWorldCup.feignclient.account.AppUserClient; |
| | | import com.dsh.communityWorldCup.feignclient.account.model.AppUser; |
| | | import com.dsh.communityWorldCup.feignclient.course.CoursePackageOrderStudentClient; |
| | | import com.dsh.communityWorldCup.feignclient.course.model.CoursePackageOrderStudent; |
| | | import com.dsh.communityWorldCup.mapper.WorldCupPaymentMapper; |
| | | import com.dsh.communityWorldCup.model.DeductionClassHourList; |
| | | import com.dsh.communityWorldCup.service.IWorldCupPaymentParticipantService; |
| | | import com.dsh.communityWorldCup.service.IWorldCupPaymentService; |
| | | import com.dsh.communityWorldCup.service.IWorldCupService; |
| | | import com.dsh.communityWorldCup.util.PayMoneyUtil; |
| | | import com.dsh.communityWorldCup.util.ResultUtil; |
| | | import net.bytebuddy.asm.Advice; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | */ |
| | | @Service |
| | | public class WorldCupPaymentServiceImpl extends ServiceImpl<WorldCupPaymentMapper, WorldCupPayment> implements IWorldCupPaymentService { |
| | | |
| | | @Autowired |
| | | private IWorldCupPaymentParticipantService worldCupPaymentParticipantService; |
| | | |
| | | @Autowired |
| | | private IWorldCupService worldCupService; |
| | | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | |
| | | @Resource |
| | | private CoursePackageOrderStudentClient coursePackageOrderStudentClient; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 取消已报名的世界杯 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultUtil cancelMyWorldCup(String id) { |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = worldCupPaymentParticipantService.getById(id); |
| | | WorldCupPayment worldCupPayment = this.getById(worldCupPaymentParticipant.getWorldCupPaymentId()); |
| | | WorldCup worldCup = worldCupService.getById(worldCupPayment.getWorldCupId()); |
| | | //开始前一天不能取消 |
| | | if(worldCup.getStartTime().getTime() < System.currentTimeMillis() + 86400000L){ |
| | | return ResultUtil.error("世界杯快开始了,不能取消"); |
| | | } |
| | | //开始处理退款 |
| | | //免费 |
| | | if(worldCupPayment.getPayType() == 0){ |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setPayStatus(3); |
| | | this.updateById(worldCupPayment); |
| | | return ResultUtil.success(); |
| | | } |
| | | List<WorldCupPaymentParticipant> list1 = worldCupPaymentParticipantService.list(new QueryWrapper<WorldCupPaymentParticipant>() |
| | | .eq("worldCupPaymentId", worldCupPayment.getId()).eq("alreadyEntered", 0)); |
| | | BigDecimal multiply = worldCupPayment.getUnitPrice().multiply(new BigDecimal(list1.size())); |
| | | //微信支付 |
| | | if(worldCupPayment.getPayType() == 1){ |
| | | Map<String, String> map = payMoneyUtil.wxRefund(worldCupPayment.getPayOrderNo(), worldCupPayment.getCode(), |
| | | worldCupPayment.getAmount().toString(), multiply.toString(), "/base/worldCup/wxRefundWorldCupCallback"); |
| | | if(!"SUCCESS".equals(map.get("return_code"))){ |
| | | System.err.println("-------------微信退款失败---------"); |
| | | System.err.println(map.get("return_msg")); |
| | | return ResultUtil.error("微信退款失败"); |
| | | } |
| | | } |
| | | //支付宝支付 |
| | | if(worldCupPayment.getPayType() == 2){ |
| | | Map<String, String> map = null; |
| | | try { |
| | | map = payMoneyUtil.aliRefund(worldCupPayment.getPayOrderNo(), multiply.toString()); |
| | | } catch (AlipayApiException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if("10000".equals(map.get("code"))){ |
| | | String trade_no = map.get("trade_no"); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setRefundOrderNo(trade_no); |
| | | worldCupPayment.setPayStatus(3); |
| | | this.updateById(worldCupPayment); |
| | | } |
| | | } |
| | | //玩湃币支付 |
| | | if(worldCupPayment.getPayType() == 3){ |
| | | Integer appUserId = worldCupPayment.getAppUserId(); |
| | | AppUser appUser = appUserClient.getAppUser(appUserId); |
| | | appUser.setPlayPaiCoins(appUser.getPlayPaiCoins() + multiply.intValue()); |
| | | appUserClient.updateAppUser(appUser); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setPayStatus(3); |
| | | this.updateById(worldCupPayment); |
| | | } |
| | | //课时支付 |
| | | if(worldCupPayment.getPayType() == 4){ |
| | | for (WorldCupPaymentParticipant worldCupPaymentParticipant1 : list1) { |
| | | String content = worldCupPaymentParticipant1.getContent(); |
| | | DeductionClassHourList deductionClassHourList = JSON.parseObject(content, DeductionClassHourList.class); |
| | | coursePackageOrderStudentClient.backspaceClassHour(deductionClassHourList); |
| | | } |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setPayStatus(3); |
| | | this.updateById(worldCupPayment); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | } |
| | |
| | | worldCupCompetitorService.save(worldCupCompetitor); |
| | | ids.add(worldCupCompetitor.getId()); |
| | | //已参赛 |
| | | worldCupPaymentParticipant.setAlreadyEntered(1); |
| | | // worldCupPaymentParticipant.setAlreadyEntered(1); |
| | | worldCupPaymentParticipantService.updateById(worldCupPaymentParticipant); |
| | | } |
| | | //2、调起开启游戏的接口。 |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("space_id", tGame.getSiteId() + ""); |
| | | map.put("space_id", tGame.getStoreId() + ""); |
| | | map.put("red_sutu_id", tGame.getRed()); |
| | | map.put("blue_sutu_id", tGame.getBlue()); |
| | | map.put("api_url", "http://221.182.45.100:56666/communityWorldCup/base/worldCup/endWorldCupCallback"); |
| | |
| | | */ |
| | | @Override |
| | | public List<WorldCupListVo> getWorldCupList(WorldCupList worldCupList) { |
| | | //没有筛选门店,默认使用当前门店 |
| | | if(null == worldCupList.getStoreId()){ |
| | | worldCupList.setStoreId(worldCupList.getStoreId()); |
| | | } |
| | | List<WorldCupListVo> worldCupList1 = this.baseMapper.getWorldCupList(worldCupList); |
| | | for (WorldCupListVo worldCupListVo : worldCupList1) { |
| | | Integer id = Integer.valueOf(worldCupListVo.getId()); |
| | |
| | | WorldCup worldCup = this.getById(paymentWorldCup.getId()); |
| | | if(null == worldCup){ |
| | | return ResultUtil.error("报名数据异常"); |
| | | } |
| | | WorldCupPayment one = worldCupPaymentService.getOne(new QueryWrapper<WorldCupPayment>().eq("worldCupId", worldCup.getId()) |
| | | .eq("appUserId", paymentWorldCup.getUid()).eq("payStatus", 2).eq("state", 1)); |
| | | if(null != one){ |
| | | return ResultUtil.error("不能重复报名"); |
| | | } |
| | | if(null != worldCup.getRegistrationClosingTime() && System.currentTimeMillis() > worldCup.getRegistrationClosingTime().getTime()){ |
| | | return ResultUtil.error("报名时间已结束,无法完成报名"); |
| | |
| | | .eq("worldCupPaymentId", worldCupPaymentId).eq("alreadyEntered", 0)); |
| | | WorldCupPayment worldCupPayment = worldCupPaymentService.getById(worldCupPaymentId); |
| | | BigDecimal multiply = worldCupPayment.getUnitPrice().multiply(new BigDecimal(list1.size())); |
| | | //免费 |
| | | if(worldCupPayment.getPayType() == 0){ |
| | | worldCupPayment.setRefundOrderNo(""); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setPayStatus(3); |
| | | worldCupPaymentService.updateById(worldCupPayment); |
| | | } |
| | | //微信支付 |
| | | if(worldCupPayment.getPayType() == 1){ |
| | | Map<String, String> map = payMoneyUtil.wxRefund(worldCupPayment.getPayOrderNo(), worldCupPayment.getCode(), |
| | |
| | | if(collect.size() == 0){ |
| | | stringObjectMap.put("applicants", 0); |
| | | }else{ |
| | | int count1 = worldCupPaymentParticipantService.count(new QueryWrapper<WorldCupPaymentParticipant>() |
| | | .eq("worldCupId", id).in("worldCupPaymentId", collect) |
| | | .groupBy("worldCupPaymentId, participantType")); |
| | | int count1 = worldCupPaymentParticipantService.getCount(id, collect); |
| | | stringObjectMap.put("applicants", count1); |
| | | } |
| | | } |
| | | map.put("rows", mapList); |
| | | int count = this.baseMapper.worldCupGameStatisticsCount(worldCupGameStatistics); |
| | | map.put("total", count); |
| | | return map; |
| | |
| | | <mapper namespace="com.dsh.communityWorldCup.mapper.WorldCupCompetitorMapper"> |
| | | |
| | | <select id="getNumberOfGamesRanked" resultType="map"> |
| | | select * from ( |
| | | select |
| | | aa.participantType, |
| | | aa.participantId, |
| | | aa.num |
| | | from ( |
| | | select |
| | | CASE WHEN participantType = 2 THEN 0 ELSE 1 END as participantType, |
| | | participantId, |
| | |
| | | |
| | | |
| | | <select id="getWorldCupRank" resultType="java.util.Map"> |
| | | select * from ( |
| | | select |
| | | aa.participantType, |
| | | aa.participantId, |
| | | aa.appUserId, |
| | | aa.winRate, |
| | | aa.totalSession |
| | | from ( |
| | | select |
| | | a.participantType, |
| | | a.participantId, |
| | | a.appUserId, |
| | | a.num as totalSession, |
| | | (ifnull(b.num, 0) / a.num * 100) as winRate |
| | | ifnull(a.num, 0) as totalSession, |
| | | (ifnull(b.num, 0) / ifnull(a.num, 0) * 100) as winRate |
| | | from ( |
| | | select |
| | | participantType, |
| | |
| | | from t_world_cup_competitor |
| | | where 1 = 1 |
| | | <if test="null != item.year"> |
| | | and DATE_FORMAT(a.startTime, '%Y') = #{item.year} |
| | | and DATE_FORMAT(startTime, '%Y') = #{item.year} |
| | | </if> |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | |
| | | from t_world_cup_competitor |
| | | where matchResult = 1 |
| | | <if test="null != item.year"> |
| | | and DATE_FORMAT(a.startTime, '%Y') = #{item.year} |
| | | and DATE_FORMAT(startTime, '%Y') = #{item.year} |
| | | </if> |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | |
| | | |
| | | |
| | | <select id="worldCupRecordsListCount" resultType="int"> |
| | | select count(*) from { |
| | | select count(*) from ( |
| | | select |
| | | participantType, |
| | | participantId, |
| | | appUserId, |
| | | appUserId |
| | | from t_world_cup_competitor |
| | | where 1 = 1 |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | |
| | | </foreach> |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | } as aa |
| | | ) as aa |
| | | </select> |
| | | |
| | | |
| | |
| | | and a.name like CONCAT('%', #{item.content}, '%') |
| | | </if> |
| | | <if test="null != item.storeId"> |
| | | and a.worldCupId in (select worldCupId from t_world_cup_store where storeId = #{item.storeId}) |
| | | and a.id in (select worldCupId from t_world_cup_store where storeId = #{item.storeId} and isOpen = 1) |
| | | </if> |
| | | <if test="null != item.gender"> |
| | | and #{item.gender} = a.gender |
| | |
| | | and `name` like CONCAT('%', #{item.name}, '%') |
| | | </if> |
| | | <if test="null != item.startTime and '' != item.startTime"> |
| | | and DATE_FORMAT(startTime, '%Y-%m-%d') >= #{item.startTime} |
| | | and DATE_FORMAT(startTime, '%Y-%m-%d') = #{item.startTime} |
| | | </if> |
| | | <if test="null != item.endTime and '' != item.endTime"> |
| | | and DATE_FORMAT(endTime, '%Y-%m-%d') <= #{item.endTime} |
| | | and DATE_FORMAT(endTime, '%Y-%m-%d') = #{item.endTime} |
| | | </if> |
| | | <if test="null != item.status"> |
| | | and status= #{item.status} |
| | |
| | | a.id, |
| | | a.`name`, |
| | | DATE_FORMAT(a.startTime, '%Y.%m.%d %H:%i') as startTime, |
| | | DATE_FORMAT(a.endTime, '%Y.%m.%d %H:%i') as endTime, |
| | | DATE_FORMAT(a.endTime, '%Y.%m.%d %H:%i') as endTime |
| | | from t_world_cup a |
| | | where 1 = 1 |
| | | <if test="null != item.name and '' != item.name"> |
| | |
| | | c.intro as content, |
| | | c.lon, |
| | | c.lat, |
| | | c.basePeople as heat |
| | | c.basePeople as heat, |
| | | c.status |
| | | from t_world_cup_payment_participant a |
| | | left join t_world_cup_payment b on (a.worldCupPaymentId = b.id) |
| | | left join t_world_cup c on (b.worldCupId = c.id) |
| | |
| | | </if> |
| | | order by b.createTime desc limit #{item.pageNo}, #{item.pageSize} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getCount" resultType="int"> |
| | | select count(*) from ( |
| | | select |
| | | worldCupPaymentId, |
| | | participantType |
| | | from t_world_cup_payment_participant1 where worldCupId = #{worldCupId} and worldCupPaymentId in |
| | | <foreach collection="worldCupPaymentId" item="item" index="index" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | group by worldCupPaymentId, participantType |
| | | ) as aa |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | //package com.dsh; |
| | | // |
| | | //import com.dsh.communityWorldCup.model.WorldCupRank; |
| | | //import com.dsh.communityWorldCup.model.WorldCupRankVo; |
| | | //import com.dsh.communityWorldCup.service.IWorldCupCompetitorService; |
| | | //import org.junit.Test; |
| | | //import org.junit.runner.RunWith; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.boot.test.context.SpringBootTest; |
| | | //import org.springframework.test.context.junit4.SpringRunner; |
| | | // |
| | | //import java.util.List; |
| | | // |
| | | ///** |
| | | // * @author zhibing.pu |
| | | // * @date 2024/3/8 16:42 |
| | | // */ |
| | | //@RunWith(SpringRunner.class) |
| | | //@SpringBootTest |
| | | //public class CommunityWorldCupApplicationTest { |
| | | // |
| | | // @Autowired |
| | | // private IWorldCupCompetitorService worldCupCompetitorService; |
| | | // |
| | | // |
| | | // @Test |
| | | // public void test(){ |
| | | // WorldCupRank worldCupRank = new WorldCupRank(); |
| | | // worldCupRank.setAppUserId(129); |
| | | // worldCupRank.setSort(2); |
| | | // worldCupRank.setIsStudent(0); |
| | | // worldCupRank.setRadius(1); |
| | | // List<WorldCupRankVo> worldCupRank1 = worldCupCompetitorService.getWorldCupRank(worldCupRank); |
| | | // } |
| | | // |
| | | //} |
| | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="userInfoForm"> |
| | | <input type="hidden" id="id" value=""> |
| | | <input type="hidden" id="page", value='add'> |
| | | <div class="row"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*比赛名称:</label> |
| | |
| | | <div class="form-horizontal" id="userInfoForm"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <input type="hidden" id="storeInfo", value='${stores}'> |
| | | <input type="hidden" id="page", value='edit'> |
| | | <div class="row"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*比赛名称:</label> |
| | |
| | | <div class="form-horizontal" id="userInfoForm"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <input type="hidden" id="storeInfo", value='${stores}'> |
| | | <input type="hidden" id="page", value='info'> |
| | | <div class="row"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*比赛名称:</label> |
| | |
| | | if (res.code == 200) { |
| | | Feng.success("删除成功"); |
| | | layer.closeAll(); |
| | | Referee.table.refresh(); |
| | | Referee.search(); |
| | | } else { |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.setData({ |
| | | 'id': Referee.seItem.id, |
| | |
| | | var operation = function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/referee/updateState", function (res) { |
| | | if (res.code == 200) { |
| | | Feng.success("删除成功"); |
| | | Feng.success("解冻成功"); |
| | | layer.closeAll(); |
| | | Referee.table.refresh(); |
| | | Referee.search(); |
| | | } else { |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | Feng.error("解冻失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.setData({ |
| | | 'id': Referee.seItem.id, |
| | |
| | | var operation = function(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/referee/updateState", function (res) { |
| | | if (res.code == 200) { |
| | | Feng.success("删除成功"); |
| | | Feng.success("冻结成功"); |
| | | layer.closeAll(); |
| | | Referee.table.refresh(); |
| | | Referee.search(); |
| | | } else { |
| | | Feng.error(res.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | Feng.error("冻结失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.setData({ |
| | | 'id': Referee.seItem.id, |
| | |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '比赛名字', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',}, |
| | | {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: '报名条件', field: 'age', visible: true, align: 'center', valign: 'middle', |
| | |
| | | let coverImg = $('#coverImg').val(); |
| | | let homeBackdropImg = $('#homeBackdropImg').val(); |
| | | let content = editor.getContent(); |
| | | if("" == registrationClosingTime){ |
| | | registrationClosingTime = null; |
| | | } |
| | | if(null == name || '' == name){ |
| | | Feng.error("请填写有效的比赛名称"); |
| | | return |
| | |
| | | 'name': name, |
| | | 'startTime': new Date(startTime + " 00:00:00"), |
| | | 'endTime': new Date(endTime + " 23:59:59"), |
| | | 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime), |
| | | 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : null), |
| | | 'startAge': startAge, |
| | | 'endAge': endAge, |
| | | 'gender': gender, |
| | |
| | | if (res.code==200){ |
| | | Feng.success("添加成功!"); |
| | | WorldCupInfo.close(); |
| | | window.parent.WorldCup.refresh(); |
| | | window.parent.WorldCup.search(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | |
| | | let coverImg = $('#coverImg').val(); |
| | | let homeBackdropImg = $('#homeBackdropImg').val(); |
| | | let content = editor.getContent(); |
| | | if("" == registrationClosingTime){ |
| | | registrationClosingTime = null; |
| | | } |
| | | if(null == name || '' == name){ |
| | | Feng.error("请填写有效的比赛名称"); |
| | | return |
| | |
| | | 'name': name, |
| | | 'startTime': new Date(startTime + " 00:00:00"), |
| | | 'endTime': new Date(endTime + " 23:59:59"), |
| | | 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime), |
| | | 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : null), |
| | | 'startAge': startAge, |
| | | 'endAge': endAge, |
| | | 'gender': gender, |
| | |
| | | if (res.code==200){ |
| | | Feng.success("编辑成功!"); |
| | | WorldCupInfo.close(); |
| | | window.parent.WorldCup.refresh(); |
| | | window.parent.WorldCup.search(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | |
| | | |
| | | WorldCupInfo.initStore = function (){ |
| | | let html = ''; |
| | | let page = $('#page').val(); |
| | | for (let i = 0; i < WorldCupInfo.stores.length; i++) { |
| | | let item = WorldCupInfo.stores[i]; |
| | | html += '<tr><td>' + item.province + '</td><td>' + (typeof item.operator == "undefined" ? "" : item.operator) + '</td><td>' + item.name + '</td><td><button style="height: 30px;\n' + |
| | | ' line-height: 30px;\n' + |
| | | ' font-size: 14px;\n' + |
| | | ' width: 50px" onclick="WorldCupInfo.delStore(' + item.id + ')">删除</button></td></tr>' |
| | | html += '<tr><td>' + item.province + '</td><td>' + (typeof item.operator == "undefined" ? "" : item.operator) + '</td><td>' + item.name + '</td>'; |
| | | if("info" != page){ |
| | | html += '<td><button style="height: 30px;\n' + |
| | | ' line-height: 30px;\n' + |
| | | ' font-size: 14px;\n' + |
| | | ' width: 50px" onclick="WorldCupInfo.delStore(' + item.id + ')">删除</button></td></tr>' |
| | | }else{ |
| | | html += '</tr>'; |
| | | } |
| | | } |
| | | $('#stores tbody').html(html); |
| | | } |
| | |
| | | |
| | | |
| | | @RequestMapping("/base/site/listBooks") |
| | | public List<SiteBooking> listBooks(@RequestParam("id") Integer id) { |
| | | public List<SiteBooking> listBooks(@RequestBody Integer id) { |
| | | List<SiteBooking> siteId = siteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", id)); |
| | | return siteId; |
| | | } |
| | |
| | | * 红方id |
| | | */ |
| | | private String red; |
| | | @TableField(exist=false) |
| | | private String blueName; |
| | | @TableField(exist=false) |
| | | private String redName; |
| | | |
| | | private Integer state; |