| | |
| | | detail.setConsumeName("智慧球场开始游戏"); |
| | | detail.setDetailsType(1); |
| | | break; |
| | | case 6: |
| | | detail.setConsumeAmount("" + (userIntegralChange.getNewIntegral() - userIntegralChange.getOldIntegral())); |
| | | detail.setConsumeName("参与社区世界杯"); |
| | | detail.setDetailsType(2); |
| | | break; |
| | | case 7: |
| | | detail.setConsumeAmount("" + (userIntegralChange.getNewIntegral() - userIntegralChange.getOldIntegral())); |
| | | detail.setConsumeName("社区世界杯获胜"); |
| | | detail.setDetailsType(2); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | and provinceCode = #{item.provinceCode} |
| | | </if> |
| | | <if test="null != item.cityCode and '' != item.cityCode"> |
| | | and provinceCode = #{cityCode} |
| | | and cityCode = #{cityCode} |
| | | </if> |
| | | order by createTime desc limit #{item.offset}, #{item.limit} |
| | | </select> |
| | |
| | | and provinceCode = #{item.provinceCode} |
| | | </if> |
| | | <if test="null != item.cityCode and '' != item.cityCode"> |
| | | and provinceCode = #{cityCode} |
| | | and cityCode = #{cityCode} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | } |
| | | //====================================================== |
| | | } |
| | | }else{ |
| | | // todo 返回门店id 和场地id |
| | | // 查询指定场地 |
| | | List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>() |
| | | .eq(PointsMerchandiseStore::getPointsMerchandiseId, merchandise.getId())); |
| | | // 门店 |
| | | ArrayList<Integer> list3 = new ArrayList<>(); |
| | | // 场地 |
| | | ArrayList<Integer> list4 = new ArrayList<>(); |
| | | for (PointsMerchandiseStore temp : list) { |
| | | Integer storeId = temp.getStoreId(); |
| | | Integer siteId = temp.getSiteId(); |
| | | list3.add(storeId); |
| | | list4.add(siteId); |
| | | } |
| | | detailsResponse.setRid(list4); |
| | | detailsResponse.setSid(list3); |
| | | } |
| | | |
| | | |
| | |
| | | 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).eq("isOpen", 1)); |
| | | if(collect.size() == 0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | return worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId).in("worldCupId", collect) |
| | | .eq("isOpen", 1)); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/worldCup/endWorldCupCallback") |
| | | public void endWorldCupCallback(String custom, Integer red_score, Integer blue){ |
| | | worldCupCompetitorService.endWorldCupCallback(custom, red_score, blue); |
| | | public void endWorldCupCallback(String custom, Integer red_score, Integer blue_score){ |
| | | worldCupCompetitorService.endWorldCupCallback(custom, red_score, blue_score); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/worldCup/getUserGameRecordList") |
| | | public Map<String, Object> getUserGameRecordList(@RequestBody WorldCupGameStatisticsInfoList worldCupGameStatisticsInfoList){ |
| | | return worldCupPaymentParticipantService.getUserGameRecordList(worldCupGameStatisticsInfoList); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取用户比赛记录明细 |
| | | * @param userGameRecordList |
New file |
| | |
| | | package com.dsh.communityWorldCup.feignclient.account; |
| | | |
| | | import com.dsh.communityWorldCup.feignclient.account.model.SaveUserIntegralChangesVo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/12 11:40 |
| | | */ |
| | | @FeignClient("mb-cloud-account") |
| | | public interface UserIntegralChangesClient { |
| | | |
| | | |
| | | /** |
| | | * 保存用户积分变动记录 |
| | | * |
| | | * @param vo |
| | | */ |
| | | @PostMapping("/userIntegralChanges/saveUserIntegralChanges") |
| | | void saveUserIntegralChanges(SaveUserIntegralChangesVo vo); |
| | | } |
New file |
| | |
| | | package com.dsh.communityWorldCup.feignclient.account.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/12 11:26 |
| | | */ |
| | | @Data |
| | | public class SaveUserIntegralChangesVo { |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer appUserId; |
| | | /** |
| | | * 积分类型(1=赠送积分,2=兑换商品,3=完成课后练习,4=观看教学视频,5=参与世界杯,6=世界杯获胜) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 积分 |
| | | */ |
| | | private Integer integral; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> userGameRecordList(@Param("name") String name); |
| | | |
| | | |
| | | |
| | | Map<String, Object> getUserGameRecordList(@Param("participantType") Integer participantType, @Param("participantId") Long participantId); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | |
| | | |
| | | int getCount(@Param("worldCupId") Integer worldCupId, @Param("worldCupPaymentId")List<Long> worldCupPaymentId); |
| | | |
| | | |
| | | |
| | | List<Map<String, Object>> getUserGameRecordList(); |
| | | } |
| | |
| | | * 比赛结束后通知处理逻辑 |
| | | * @param custom |
| | | * @param red_score |
| | | * @param blue |
| | | * @param blue_score |
| | | */ |
| | | void endWorldCupCallback(String custom, Integer red_score, Integer blue); |
| | | void endWorldCupCallback(String custom, Integer red_score, Integer blue_score); |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | int getCount(Integer worldCupId, List<Long> worldCupPaymentId); |
| | | |
| | | |
| | | /** |
| | | * 获取用户列表 |
| | | * @param worldCupGameStatisticsInfoList |
| | | * @return |
| | | */ |
| | | Map<String, Object> getUserGameRecordList(WorldCupGameStatisticsInfoList worldCupGameStatisticsInfoList); |
| | | } |
| | |
| | | import com.dsh.communityWorldCup.entity.WorldCupCompetitor; |
| | | import com.dsh.communityWorldCup.feignclient.account.AppUserClient; |
| | | import com.dsh.communityWorldCup.feignclient.account.StudentClient; |
| | | import com.dsh.communityWorldCup.feignclient.account.UserIntegralChangesClient; |
| | | import com.dsh.communityWorldCup.feignclient.account.model.AppUser; |
| | | import com.dsh.communityWorldCup.feignclient.account.model.AppUserIdsByCityName; |
| | | import com.dsh.communityWorldCup.feignclient.account.model.SaveUserIntegralChangesVo; |
| | | import com.dsh.communityWorldCup.feignclient.account.model.TStudent; |
| | | import com.dsh.communityWorldCup.feignclient.competition.ParticipantClient; |
| | | import com.dsh.communityWorldCup.feignclient.competition.model.Participant; |
| | | import com.dsh.communityWorldCup.feignclient.other.StoreClient; |
| | | import com.dsh.communityWorldCup.mapper.WorldCupCompetitorMapper; |
| | | import com.dsh.communityWorldCup.mapper.WorldCupPaymentParticipantMapper; |
| | | import com.dsh.communityWorldCup.model.*; |
| | | import com.dsh.communityWorldCup.service.IWorldCupCompetitorService; |
| | | import com.dsh.communityWorldCup.service.IWorldCupPaymentParticipantService; |
| | | import com.dsh.communityWorldCup.service.IWorldCupService; |
| | | import com.dsh.communityWorldCup.util.ToolUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private IWorldCupService worldCupService; |
| | | |
| | | @Resource |
| | | private UserIntegralChangesClient userIntegralChangesClient; |
| | | |
| | | |
| | | |
| | |
| | | * 比赛结束后通知处理逻辑 |
| | | * @param custom 开始比赛接口上传的自定义参数 |
| | | * @param red_score 红方分数 |
| | | * @param blue 蓝方分数 |
| | | * @param blue_score 蓝方分数 |
| | | */ |
| | | @Override |
| | | public void endWorldCupCallback(String custom, Integer red_score, Integer blue) { |
| | | public void endWorldCupCallback(String custom, Integer red_score, Integer blue_score) { |
| | | List<Long> ids = JSON.parseArray(custom, Long.class); |
| | | List<WorldCupCompetitor> worldCupCompetitors = this.listByIds(ids); |
| | | try { |
| | | WorldCupCompetitor worldCupCompetitor1 = worldCupCompetitors.get(0); |
| | | WorldCup worldCup = worldCupService.getById(worldCupCompetitor1.getWorldCupId()); |
| | | for (WorldCupCompetitor worldCupCompetitor : worldCupCompetitors) { |
| | | worldCupCompetitor.setWorldCupId(null); |
| | | //蓝方 |
| | | if(worldCupCompetitor.getParticipant() == 1){ |
| | | worldCupCompetitor.setMatchResult(blue.compareTo(red_score)); |
| | | worldCupCompetitor.setOurScore(blue); |
| | | worldCupCompetitor.setMatchResult(blue_score.compareTo(red_score)); |
| | | worldCupCompetitor.setOurScore(blue_score); |
| | | worldCupCompetitor.setOpponentScore(red_score); |
| | | worldCupCompetitor.setEndTime(new Date()); |
| | | worldCupCompetitor.setWinIntegral(0); |
| | | if(null != worldCup.getWinIntegral() && 0 < worldCup.getWinIntegral() && blue.compareTo(red_score) >= 0){ |
| | | if(null != worldCup.getWinIntegral() && 0 < worldCup.getWinIntegral() && blue_score.compareTo(red_score) >= 0){ |
| | | worldCupCompetitor.setWinIntegral(worldCup.getWinIntegral()); |
| | | AppUser appUser = appUserClient.getAppUser(worldCupCompetitor.getAppUserId()); |
| | | appUser.setIntegral(appUser.getIntegral() + worldCup.getWinIntegral()); |
| | | appUserClient.updateAppUser(appUser); |
| | | //增加积分明细 |
| | | SaveUserIntegralChangesVo vo = new SaveUserIntegralChangesVo(); |
| | | vo.setAppUserId(appUser.getId()); |
| | | vo.setIntegral(worldCup.getWinIntegral()); |
| | | vo.setType(7); |
| | | userIntegralChangesClient.saveUserIntegralChanges(vo); |
| | | } |
| | | } |
| | | //红方 |
| | | if(worldCupCompetitor.getParticipant() == 2){ |
| | | worldCupCompetitor.setMatchResult(red_score.compareTo(blue)); |
| | | worldCupCompetitor.setMatchResult(red_score.compareTo(blue_score)); |
| | | worldCupCompetitor.setOurScore(red_score); |
| | | worldCupCompetitor.setOpponentScore(blue); |
| | | worldCupCompetitor.setOpponentScore(blue_score); |
| | | worldCupCompetitor.setEndTime(new Date()); |
| | | worldCupCompetitor.setWinIntegral(0); |
| | | if(null != worldCup.getWinIntegral() && 0 < worldCup.getWinIntegral() && red_score.compareTo(blue) >= 0){ |
| | | if(null != worldCup.getWinIntegral() && 0 < worldCup.getWinIntegral() && red_score.compareTo(blue_score) >= 0){ |
| | | worldCupCompetitor.setWinIntegral(worldCup.getWinIntegral()); |
| | | AppUser appUser = appUserClient.getAppUser(worldCupCompetitor.getAppUserId()); |
| | | appUser.setIntegral(appUser.getIntegral() + worldCup.getWinIntegral()); |
| | | appUserClient.updateAppUser(appUser); |
| | | //增加积分明细 |
| | | SaveUserIntegralChangesVo vo = new SaveUserIntegralChangesVo(); |
| | | vo.setAppUserId(appUser.getId()); |
| | | vo.setIntegral(worldCup.getWinIntegral()); |
| | | vo.setType(7); |
| | | userIntegralChangesClient.saveUserIntegralChanges(vo); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | this.updateBatchById(worldCupCompetitors); |
| | |
| | | } |
| | | |
| | | map.put("name", tStudent.getName()); |
| | | map.put("phone", tStudent.getPhone()); |
| | | map.put("phone", ToolUtil.isEmpty(tStudent.getPhone()) ? appUser.getPhone() : tStudent.getPhone()); |
| | | }else{ |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | if(ToolUtil.isNotEmpty(name) && participant.getName().indexOf(name) == -1){ |
| | |
| | | } |
| | | |
| | | map.put("name", participant.getName()); |
| | | map.put("phone", participant.getPhone()); |
| | | map.put("phone", ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()); |
| | | } |
| | | list.add(map); |
| | | } |
| | |
| | | import com.dsh.communityWorldCup.feignclient.competition.model.Participant; |
| | | import com.dsh.communityWorldCup.feignclient.other.StoreClient; |
| | | import com.dsh.communityWorldCup.feignclient.other.model.Store; |
| | | import com.dsh.communityWorldCup.mapper.WorldCupCompetitorMapper; |
| | | import com.dsh.communityWorldCup.mapper.WorldCupPaymentParticipantMapper; |
| | | import com.dsh.communityWorldCup.model.MyWorldCupInfo; |
| | | import com.dsh.communityWorldCup.model.MyWorldCupList; |
| | |
| | | |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | |
| | | @Resource |
| | | private WorldCupCompetitorMapper worldCupCompetitorMapper; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | limit += offset; |
| | | map.put("rows", list2.subList(offset, list2.size() >= limit ? limit : list.size())); |
| | | map.put("rows", list2.subList(offset, list2.size() >= limit ? limit : list2.size())); |
| | | map.put("total", list2.size()); |
| | | return map; |
| | | } |
| | |
| | | public int getCount(Integer worldCupId, List<Long> worldCupPaymentId) { |
| | | return this.baseMapper.getCount(worldCupId, worldCupPaymentId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取用户列表 |
| | | * @param worldCupGameStatisticsInfoList |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> getUserGameRecordList(WorldCupGameStatisticsInfoList worldCupGameStatisticsInfoList) { |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | String name = worldCupGameStatisticsInfoList.getName(); |
| | | String phone = worldCupGameStatisticsInfoList.getPhone(); |
| | | String idcard = worldCupGameStatisticsInfoList.getIdcard(); |
| | | List<Map<String, Object>> mapList = this.baseMapper.getUserGameRecordList(); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (int i = 0; i < mapList.size(); i++) { |
| | | Map<String, Object> map = mapList.get(i); |
| | | Integer participantType = Integer.valueOf(map.get("participantType").toString()); |
| | | Long participantId = Long.valueOf(map.get("participantId").toString()); |
| | | Integer appUserId = Integer.valueOf(map.get("appUserId").toString()); |
| | | Map<String, Object> userGameRecordList = worldCupCompetitorMapper.getUserGameRecordList(participantType, participantId); |
| | | Integer totalSession = 0; |
| | | Integer win = 0; |
| | | if(null != userGameRecordList){ |
| | | totalSession = Integer.valueOf(null != userGameRecordList.get("totalSession") ? userGameRecordList.get("totalSession").toString() : "0"); |
| | | win = Integer.valueOf(null != userGameRecordList.get("win") ? userGameRecordList.get("win").toString() : "0"); |
| | | }else{ |
| | | userGameRecordList = new HashMap<>(); |
| | | } |
| | | userGameRecordList.put("totalSession", totalSession); |
| | | userGameRecordList.put("win", win); |
| | | Integer lose = totalSession - win; |
| | | userGameRecordList.put("lose", lose); |
| | | userGameRecordList.put("winRate", totalSession == 0 ? 0 : win / totalSession * 100); |
| | | userGameRecordList.put("participantType", participantType); |
| | | userGameRecordList.put("participantId", participantId); |
| | | AppUser appUser = appUserClient.getAppUser(appUserId); |
| | | userGameRecordList.put("province", appUser.getProvince() + appUser.getCity()); |
| | | if(1 == participantType){ |
| | | TStudent tStudent = studentClient.queryById(participantId.intValue()); |
| | | if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone) && tStudent.getPhone().indexOf(phone) == -1){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcard) && tStudent.getIdCard().indexOf(idcard) == -1){ |
| | | continue; |
| | | } |
| | | |
| | | userGameRecordList.put("name", tStudent.getName()); |
| | | userGameRecordList.put("phone", ToolUtil.isEmpty(tStudent.getPhone()) ? appUser.getPhone() : tStudent.getPhone()); |
| | | userGameRecordList.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){ |
| | | continue; |
| | | } |
| | | if(ToolUtil.isNotEmpty(idcard) && participant.getIdcard().indexOf(idcard) == -1){ |
| | | continue; |
| | | } |
| | | |
| | | userGameRecordList.put("name", participant.getName()); |
| | | userGameRecordList.put("phone", ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()); |
| | | userGameRecordList.put("idcard", participant.getIdcard()); |
| | | } |
| | | list.add(userGameRecordList); |
| | | } |
| | | map1.put("total", list.size()); |
| | | Integer offset = worldCupGameStatisticsInfoList.getOffset(); |
| | | Integer limit = worldCupGameStatisticsInfoList.getLimit(); |
| | | limit += offset; |
| | | map1.put("rows", list.subList(offset, list.size() >= limit ? limit : list.size())); |
| | | return map1; |
| | | } |
| | | } |
| | |
| | | import com.dsh.communityWorldCup.entity.*; |
| | | import com.dsh.communityWorldCup.feignclient.account.AppUserClient; |
| | | import com.dsh.communityWorldCup.feignclient.account.StudentClient; |
| | | import com.dsh.communityWorldCup.feignclient.account.UserIntegralChangesClient; |
| | | import com.dsh.communityWorldCup.feignclient.account.model.AppUser; |
| | | import com.dsh.communityWorldCup.feignclient.account.model.SaveUserIntegralChangesVo; |
| | | import com.dsh.communityWorldCup.feignclient.account.model.TStudent; |
| | | import com.dsh.communityWorldCup.feignclient.competition.ParticipantClient; |
| | | import com.dsh.communityWorldCup.feignclient.competition.model.Participant; |
| | |
| | | |
| | | @Resource |
| | | private GameClient gameClient; |
| | | |
| | | @Resource |
| | | private UserIntegralChangesClient userIntegralChangesClient; |
| | | |
| | | |
| | | |
| | |
| | | AppUser appUser = appUserClient.getAppUser(worldCupCompetitor.getAppUserId()); |
| | | appUser.setIntegral(appUser.getIntegral() + worldCup.getParticipationIntegral()); |
| | | appUserClient.updateAppUser(appUser); |
| | | //增加积分明细 |
| | | SaveUserIntegralChangesVo vo = new SaveUserIntegralChangesVo(); |
| | | vo.setAppUserId(appUser.getId()); |
| | | vo.setIntegral(worldCup.getParticipationIntegral()); |
| | | vo.setType(6); |
| | | userIntegralChangesClient.saveUserIntegralChanges(vo); |
| | | } |
| | | |
| | | worldCupCompetitorService.save(worldCupCompetitor); |
| | |
| | | map.put("api_url", "http://221.182.45.100:56666/communityWorldCup/base/worldCup/endWorldCupCallback"); |
| | | map.put("custom", JSON.toJSONString(ids)); |
| | | |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/batterGame", map); |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/quickStart", map); |
| | | JSONObject jsonObject = JSONObject.parseObject(s); |
| | | Integer code1 = jsonObject.getInteger("code"); |
| | | String message = jsonObject.getString("message"); |
| | |
| | | */ |
| | | @Override |
| | | public Integer getCompletedWorldCupTips(Integer uid) { |
| | | int count = worldCupCompetitorService.count(new QueryWrapper<WorldCupCompetitor>() |
| | | .eq("appUserId", uid).eq("tips", 0).isNotNull("endTime")); |
| | | return count; |
| | | List<WorldCupCompetitor> list = worldCupCompetitorService.list(new QueryWrapper<WorldCupCompetitor>() |
| | | .eq("appUserId", uid).eq("tips", 0).isNotNull("endTime") |
| | | .orderByDesc("endTime").last(" limit 0, 1")); |
| | | list.forEach(v->{ |
| | | v.setWorldCupId(null); |
| | | v.setTips(1); |
| | | }); |
| | | if(list.size() > 0){ |
| | | worldCupCompetitorService.updateBatchById(list); |
| | | } |
| | | return list.size(); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | <select id="worldCupGameStatisticsInfoList" resultType="map"> |
| | | select * from ( |
| | | select |
| | | aa.participantType, |
| | | aa.participantId, |
| | | aa.appUserId, |
| | | aa.totalSession, |
| | | aa.win, |
| | | aa.winRate |
| | | from ( |
| | | select |
| | | a.participantType, |
| | | a.participantId, |
| | |
| | | </if> |
| | | order by a.startTime desc |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getUserGameRecordList" resultType="map"> |
| | | select |
| | | a.participantType, |
| | | a.participantId, |
| | | a.appUserId, |
| | | a.num as totalSession, |
| | | ifnull(b.num, 0) as win, |
| | | (ifnull(b.num, 0) / a.num * 100) as winRate |
| | | from ( |
| | | select |
| | | participantType, |
| | | participantId, |
| | | appUserId, |
| | | count(*) as num |
| | | from t_world_cup_competitor |
| | | where 1 = 1 |
| | | <if test="null != participantType"> |
| | | and participantType = #{participantType} |
| | | </if> |
| | | <if test="null != participantId"> |
| | | and participantId = #{participantId} |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | ) as a |
| | | left join ( |
| | | select |
| | | participantType, |
| | | participantId, |
| | | appUserId, |
| | | count(*) as num |
| | | from t_world_cup_competitor |
| | | where matchResult = 1 |
| | | <if test="null != participantType"> |
| | | and participantType = #{participantType} |
| | | </if> |
| | | <if test="null != participantId"> |
| | | and participantId = #{participantId} |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | ) as b on (a.participantId = b.participantId and a.participantType = b.participantType) |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="getCount" resultType="int"> |
| | | select count(*) from ( |
| | | select |
| | | worldCupPaymentId, |
| | | participantId, |
| | | participantType |
| | | from t_world_cup_payment_participant1 where worldCupId = #{worldCupId} and worldCupPaymentId in |
| | | from t_world_cup_payment_participant where worldCupId = #{worldCupId} and worldCupPaymentId in |
| | | <foreach collection="worldCupPaymentId" item="item" index="index" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | group by worldCupPaymentId, participantType |
| | | group by participantId, participantType |
| | | ) as aa |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getUserGameRecordList" resultType="map"> |
| | | select |
| | | participantType, |
| | | participantId, |
| | | appUserId |
| | | from t_world_cup_payment_participant group by participantType, participantId, appUserId |
| | | </select> |
| | | </mapper> |
| | |
| | | border: none; |
| | | text-indent: 10px; |
| | | } |
| | | .el-upload__input{ |
| | | display: none; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*基础报名人数:</label> |
| | | <label class="col-sm-3 control-label">基础报名人数:</label> |
| | | <div class="col-sm-3"> |
| | | <input class="form-control" id="basePeople" type="number" min="0"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*参赛可获积分:</label> |
| | | <label class="col-sm-3 control-label">参赛可获积分:</label> |
| | | <div class="col-sm-3"> |
| | | <input class="form-control" id="participationIntegral" type="number" min="0"> |
| | | </div> |
| | |
| | | <input type="hidden" id="latitude"/> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">参与赛点:</label> |
| | | <label class="col-sm-3 control-label">*参与赛点:</label> |
| | | <div class="col-sm-7"> |
| | | <button onclick="WorldCupInfo.openStore()">选择门店</button> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">赛事简介</label> |
| | | <label class="col-sm-3 control-label">*赛事简介</label> |
| | | <div class="col-sm-7"> |
| | | <textarea class="form-control" id="intro" style="height:200px"></textarea> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">比赛封面图</label> |
| | | <label class="col-sm-3 control-label head-scu-label">*比赛封面图</label> |
| | | <div class="col-sm-2"> |
| | | <div id="coverImgPreId"> |
| | | <div><img width="100px" height="100px" src="${ctxPath}/img/NoPIC.png"></div> |
| | |
| | | </div> |
| | | </div> |
| | | <input type="hidden" id="coverImg" /> |
| | | <label class="col-sm-1 control-label">首页默认背景图</label> |
| | | <label class="col-sm-1 control-label">*首页默认背景图</label> |
| | | <div class="col-sm-2"> |
| | | <div id="homeBackdropImgPreId"> |
| | | <div><img width="100px" height="100px" src="${ctxPath}/img/NoPIC.png"></div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">比赛详情</label> |
| | | <label class="col-sm-3 control-label">*比赛详情</label> |
| | | <div class="col-sm-7" style="padding: 0px;"> |
| | | <textarea id="content" style="height: 800px;width: 100%;"></textarea> |
| | | </div> |
| | |
| | | border: none; |
| | | text-indent: 10px; |
| | | } |
| | | .el-upload__input{ |
| | | display: none; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*基础报名人数:</label> |
| | | <label class="col-sm-3 control-label">基础报名人数:</label> |
| | | <div class="col-sm-3"> |
| | | <input class="form-control" id="basePeople" type="number" min="0" value="${item.basePeople}"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*参赛可获积分:</label> |
| | | <label class="col-sm-3 control-label">参赛可获积分:</label> |
| | | <div class="col-sm-3"> |
| | | <input class="form-control" id="participationIntegral" type="number" min="0" value="${item.participationIntegral}"> |
| | | </div> |
| | |
| | | <input type="hidden" id="latitude" value="${item.lat}"/> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">参与赛点:</label> |
| | | <label class="col-sm-3 control-label">*参与赛点:</label> |
| | | <div class="col-sm-7"> |
| | | <button onclick="WorldCupInfo.openStore()">选择门店</button> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">赛事简介</label> |
| | | <label class="col-sm-3 control-label">*赛事简介</label> |
| | | <div class="col-sm-7"> |
| | | <textarea class="form-control" id="intro" style="height:200px">${item.intro}</textarea> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">比赛封面图</label> |
| | | <label class="col-sm-3 control-label head-scu-label">*比赛封面图</label> |
| | | <div class="col-sm-2"> |
| | | <div id="coverImgPreId"> |
| | | <div><img width="100px" height="100px" src="${item.coverImg}"></div> |
| | |
| | | </div> |
| | | </div> |
| | | <input type="hidden" id="coverImg" value="${item.coverImg}"/> |
| | | <label class="col-sm-1 control-label">首页默认背景图</label> |
| | | <label class="col-sm-1 control-label">*首页默认背景图</label> |
| | | <div class="col-sm-2"> |
| | | <div id="homeBackdropImgPreId"> |
| | | <div><img width="100px" height="100px" src="${item.homeBackdropImg}"></div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">比赛详情</label> |
| | | <label class="col-sm-3 control-label">*比赛详情</label> |
| | | <div class="col-sm-7" style="padding: 0px;"> |
| | | <textarea id="content" style="height: 800px;width: 100%;">${item.content}</textarea> |
| | | </div> |
| | |
| | | |
| | | Referee.search = function () { |
| | | var queryData = {}; |
| | | queryData['userName'] = $("#name").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['phone'] =$("#phone").val(); |
| | | queryData['provinceCode'] =$("#provinceCode").val(); |
| | | queryData['cityCode'] =$("#cityCode").val(); |
| | |
| | | return |
| | | } |
| | | if(null == basePeople || '' == basePeople){ |
| | | Feng.error("请填写有效的基础报名人数"); |
| | | return |
| | | basePeople = 0; |
| | | } |
| | | if(null == participationIntegral || '' == participationIntegral){ |
| | | Feng.error("请填写有效的参赛可获积分"); |
| | | return |
| | | participationIntegral = 0; |
| | | } |
| | | if(null == winIntegral || '' == winIntegral){ |
| | | Feng.error("请填写有效的胜场可获积分"); |
| | | return |
| | | winIntegral = 0; |
| | | } |
| | | if(null == address || '' == address){ |
| | | Feng.error("请填写有效的比赛地点"); |
| | |
| | | return |
| | | } |
| | | if(null == basePeople || '' == basePeople){ |
| | | Feng.error("请填写有效的基础报名人数"); |
| | | return |
| | | basePeople = 0; |
| | | } |
| | | if(null == participationIntegral || '' == participationIntegral){ |
| | | Feng.error("请填写有效的参赛可获积分"); |
| | | return |
| | | participationIntegral = 0; |
| | | } |
| | | if(null == winIntegral || '' == winIntegral){ |
| | | Feng.error("请填写有效的胜场可获积分"); |
| | | return |
| | | winIntegral = 0; |
| | | } |
| | | if(null == address || '' == address){ |
| | | Feng.error("请填写有效的比赛地点"); |