| | |
| | | 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.GameClient; |
| | | import com.dsh.communityWorldCup.feignclient.other.SiteClient; |
| | | import com.dsh.communityWorldCup.feignclient.other.StoreClient; |
| | | import com.dsh.communityWorldCup.feignclient.other.model.Site; |
| | | import com.dsh.communityWorldCup.feignclient.other.model.Store; |
| | | import com.dsh.communityWorldCup.feignclient.other.model.TGame; |
| | | import com.dsh.communityWorldCup.model.*; |
| | | import com.dsh.communityWorldCup.service.*; |
| | | import com.dsh.communityWorldCup.util.GDMapGeocodingUtil; |
| | |
| | | |
| | | @Autowired |
| | | private IWorldCupPaymentService worldCupPaymentService; |
| | | |
| | | @Resource |
| | | private GameClient gameClient; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据门店id获取门店关系数据 |
| | |
| | | .eq("worldCupId", worldCupPeople.getWorldCupId()).eq("participantId", id).eq("participantType", isStudent) |
| | | .orderByDesc("createTime").last(" limit 0, 1")); |
| | | if(null == worldCupPaymentParticipant){ |
| | | return ResultUtil.error("无效二维码"); |
| | | return ResultUtil.error("报名失败,当前用户未报名当前比赛"); |
| | | } |
| | | WorldCupPeopleVo worldCupPeopleVo = new WorldCupPeopleVo(); |
| | | worldCupPeopleVo.setId(worldCupPaymentParticipant.getParticipantId()); |
| | |
| | | if(null == store){ |
| | | return ResultUtil.error("无法获取场地信息"); |
| | | } |
| | | String sutu_id = jsonObject.getString("sutu_id"); |
| | | TGame tGame = gameClient.getTGameBySutuId(sutu_id); |
| | | if(null == tGame){ |
| | | return ResultUtil.error("无效的游戏二维码"); |
| | | } |
| | | Site site = siteClient.getSite(tGame.getSiteId()); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("name", store.getName()); |
| | | map.put("address", store.getAddress()); |
| | | map.put("address", site.getName()); |
| | | return ResultUtil.success(map); |
| | | } |
| | | |
| | |
| | | if(null != map){ |
| | | String code = map.get("out_trade_no"); |
| | | String transaction_id = map.get("trade_no"); |
| | | String result = map.get("result"); |
| | | ResultUtil resultUtil = worldCupService.paymentWorldCupCallback(code, transaction_id); |
| | | if(resultUtil.getCode() == 200){ |
| | | PrintWriter out = response.getWriter(); |
| | | out.println(result); |
| | | out.println("success"); |
| | | out.flush(); |
| | | out.close(); |
| | | }else{ |
| | |
| | | @PostMapping("/api/worldCup/getMyWorldCupInfo") |
| | | @ApiOperation(value = "获取已报名世界杯详情【2.0】", tags = {"APP-个人中心"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "列表中的id", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "id", value = "列表中的id", required = true, dataType = "Long"), |
| | | @ApiImplicitParam(name = "lon", value = "经度", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "lat", value = "纬度", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<MyWorldCupInfo> getMyWorldCupInfo(String id, String lon, String lat){ |
| | | public ResultUtil<MyWorldCupInfo> getMyWorldCupInfo(Long id, String lon, String lat){ |
| | | MyWorldCupInfo myWorldCupInfo = worldCupPaymentParticipantService.getMyWorldCupInfo(id, lon, lat); |
| | | return ResultUtil.success(myWorldCupInfo); |
| | | } |
| | |
| | | @PostMapping("/api/worldCup/cancelMyWorldCup") |
| | | @ApiOperation(value = "取消已报名的世界杯【2.0】", tags = {"APP-个人中心"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "列表中的id", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "id", value = "列表中的id", required = true, dataType = "Long"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil cancelMyWorldCup(String id){ |
| | | public ResultUtil cancelMyWorldCup(Long id){ |
| | | return worldCupPaymentService.cancelMyWorldCup(id); |
| | | } |
| | | |
| | |
| | | worldCupPayment.setRefundOrderNo(refund_id); |
| | | worldCupPayment.setRefundTime(new Date()); |
| | | worldCupPayment.setPayStatus(3); |
| | | worldCupPayment.setWorldCupId(null); |
| | | worldCupPaymentService.updateById(worldCupPayment); |
| | | PrintWriter out = null; |
| | | try { |
| | |
| | | @PostMapping("/worldCup/getWorldCupPayment") |
| | | public List<WorldCupPayment> getWorldCupPayment(@RequestBody GetWorldCupPayment getWorldCupPayment){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String payType = getWorldCupPayment.getPayType(); |
| | | return worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("appUserId", getWorldCupPayment.getAppUserId()) |
| | | .eq("payType", getWorldCupPayment.getPayType()).ne("payStatus", 1).eq("state", 1) |
| | | .in("payType", Arrays.asList(payType.split(","))).ne("payStatus", 1).eq("state", 1) |
| | | .last(" and createTime between '" + sdf.format(getWorldCupPayment.getStartTime()) + "' and '" + sdf.format(getWorldCupPayment.getEndTime()) + "' order by createTime desc")); |
| | | } |
| | | } |