Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0
| | |
| | | /** |
| | | * 参赛数据id |
| | | */ |
| | | private Long id; |
| | | private Long participantId; |
| | | /** |
| | | * 参赛人员类型 |
| | | */ |
| | | private Integer participantType; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | |
| | | */ |
| | | @Override |
| | | public Map<String, Object> worldCupGameStatisticsListInfo(WorldCupGameStatisticsListInfo worldCupGameStatisticsListInfo) { |
| | | Long id = worldCupGameStatisticsListInfo.getId(); |
| | | Long participantId = worldCupGameStatisticsListInfo.getParticipantId(); |
| | | Integer participantType = worldCupGameStatisticsListInfo.getParticipantType(); |
| | | String name = worldCupGameStatisticsListInfo.getName(); |
| | | WorldCupCompetitor worldCupCompetitor = this.getById(id); |
| | | List<WorldCupCompetitor> list = this.list(new QueryWrapper<WorldCupCompetitor>().eq("code", worldCupCompetitor.getCode())); |
| | | List<WorldCupCompetitor> list = this.list(new QueryWrapper<WorldCupCompetitor>() |
| | | .eq("participantType", participantType).eq("participantId", participantId) |
| | | .isNotNull("matchResult").orderByDesc("startTime")); |
| | | List<Map<String, Object>> mapList = new ArrayList<>(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy.HH.dd HH:mm"); |
| | | for (WorldCupCompetitor cupCompetitor : list) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", cupCompetitor.getId()); |
| | | Integer participantType = cupCompetitor.getParticipantType(); |
| | | Long participantId = cupCompetitor.getParticipantId(); |
| | | if(1 == participantType){ |
| | | TStudent tStudent = studentClient.queryById(participantId.intValue()); |
| | | if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){ |
| | |
| | | //package com.dsh; |
| | | // |
| | | //import com.dsh.communityWorldCup.model.WorldCupRank; |
| | | //import com.dsh.communityWorldCup.model.WorldCupRankVo; |
| | | //import com.dsh.communityWorldCup.service.IWorldCupCompetitorService; |
| | | //import com.alibaba.fastjson.JSONObject; |
| | | //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.HashMap; |
| | | //import java.util.List; |
| | | // |
| | | ///** |
| | |
| | | //@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); |
| | | // HashMap<String, String> map = new HashMap<>(); |
| | | // map.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); |
| | | // map.put("space_id", "2024"); |
| | | // map.put("red_sutu_id", "1037"); |
| | | // map.put("blue_sutu_id", "1036"); |
| | | // map.put("api_url", "http://221.182.45.100:56666/communityWorldCup/base/worldCup/endWorldCupCallback"); |
| | | // map.put("custom", ""); |
| | | // |
| | | // String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/batterGame", map); |
| | | // JSONObject jsonObject = JSONObject.parseObject(s); |
| | | // Integer code1 = jsonObject.getInteger("code"); |
| | | // String message = jsonObject.getString("message"); |
| | | // if (200 == code1) { |
| | | // return ResultUtil.success(); |
| | | // } else { |
| | | // return ResultUtil.error(message); |
| | | // } |
| | | // } |
| | | // |
| | | //} |
| | |
| | | /** |
| | | * 参赛数据id |
| | | */ |
| | | private Long id; |
| | | private Long participantId; |
| | | /** |
| | | * 参赛人员类型 |
| | | */ |
| | | private Integer participantType; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | |
| | | @ResponseBody |
| | | @PostMapping("/addWorldCup") |
| | | public ResultUtil addWorldCup(WorldCup worldCup, String stores){ |
| | | worldCup.setStatus(1); |
| | | if(worldCup.getStartTime().before(new Date())){ |
| | | worldCup.setStatus(2); |
| | | }else{ |
| | | worldCup.setStatus(1); |
| | | } |
| | | worldCup.setCreateTime(new Date()); |
| | | worldCup.setMatchNumber(0); |
| | | Integer integer = worldCupClient.addWorldCup(worldCup); |
| | |
| | | if(worldCup1.getStartTime().before(DateUtil.getDate())){ |
| | | return ResultUtil.error("赛事已开始,不能编辑"); |
| | | } |
| | | if(worldCup.getStartTime().before(new Date())){ |
| | | worldCup.setStatus(2); |
| | | }else{ |
| | | worldCup.setStatus(1); |
| | | } |
| | | worldCupClient.editWorldCup(worldCup); |
| | | worldCupStoreClient.delWorldCupStore(worldCup.getId()); |
| | | JSONArray jsonArray = JSON.parseArray(stores); |
| | |
| | | |
| | | |
| | | @RequestMapping("/openWorldCupGameStatisticsListInfo") |
| | | public String openWorldCupGameStatisticsListInfo(Model model, Integer id){ |
| | | model.addAttribute("id", id); |
| | | public String openWorldCupGameStatisticsListInfo(Model model, Long participantId, Integer participantType){ |
| | | model.addAttribute("participantId", participantId); |
| | | model.addAttribute("participantType", participantType); |
| | | return PREFIX + "worldCupGameStatisticsListInfo.html"; |
| | | } |
| | | |
| | |
| | | text-indent: 10px; |
| | | } |
| | | .el-upload__input{ |
| | | display: none; |
| | | display: none !important; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | |
| | | text-indent: 10px; |
| | | } |
| | | .el-upload__input{ |
| | | display: none; |
| | | display: none !important; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input type="hidden" id="id" value="${id}"> |
| | | <input type="hidden" id="participantId" value="${participantId}"> |
| | | <input type="hidden" id="participantType" value="${participantType}"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="用户姓名:" /> |
| | |
| | | '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") : null), |
| | | 'startAge': startAge, |
| | | 'endAge': endAge, |
| | | 'gender': gender, |
| | |
| | | 'intro': intro, |
| | | 'content': content, |
| | | 'stores': JSON.stringify(WorldCupInfo.stores) |
| | | } |
| | | if(null != registrationClosingTime && '' != registrationClosingTime){ |
| | | data.registrationClosingTime = registrationClosingTime; |
| | | } |
| | | |
| | | //提交信息 |
| | |
| | | '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") : null), |
| | | 'startAge': startAge, |
| | | 'endAge': endAge, |
| | | 'gender': gender, |
| | |
| | | 'content': content, |
| | | 'stores': JSON.stringify(WorldCupInfo.stores) |
| | | } |
| | | if(null != registrationClosingTime && '' != registrationClosingTime){ |
| | | data.registrationClosingTime = registrationClosingTime; |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/worldCup/editWorldCup", function (res) { |
| | |
| | | |
| | | WorldCupGameStatisticsListInfo.search = function () { |
| | | var queryData = {}; |
| | | queryData['id'] = $("#id").val(); |
| | | queryData['participantId'] = $("#participantId").val(); |
| | | queryData['participantType'] = $("#participantType").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | WorldCupGameStatisticsListInfo.table.refresh({query: queryData}); |
| | | }; |
| | |
| | | var table = new BSTable(WorldCupGameStatisticsListInfo.id, "/worldCupRecords/worldCupGameStatisticsListInfo", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | table.setQueryParams({ |
| | | 'id': $('#id').val() |
| | | 'participantId': $('#participantId').val(), |
| | | 'participantType': $('#participantType').val() |
| | | }) |
| | | WorldCupGameStatisticsListInfo.table = table.init(); |
| | | |