| | |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/exploreWP/indexOfEx") |
| | | @ApiOperation(value = "联系客服-探索首页", tags = {"APP-探索玩湃"}) |
| | | @ApiImplicitParams({ |
| | | }) |
| | | public ResultUtil<List<StoreInfo>> indexOfExploreDetail1(LonLatRequest llrequest) { |
| | | try { |
| | | return ResultUtil.success(tsService.queryIndexOfExplores(llrequest)); |
| | | } catch (Exception e) { |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | pointsMerchandise.setCash(merchandise.getCash()); |
| | | pointsMerchandise.setCashPayType(exchangeType.getPayType()); |
| | | } |
| | | |
| | | Double m = new BigDecimal((merchandise.getIntegral() == null ? 0 : merchandise.getIntegral())).add((merchandise.getCash() == null ? BigDecimal.ZERO : merchandise.getCash())).doubleValue(); |
| | | if((m * goodsNums) == 0) { |
| | | pointsMerchandise.setPayStatus(2); |
| | | pointsMerchandise.setPaymentTime(new Date()); |
| | | } |
| | | returnId = mcClient.saveDetailsUserPointMercase(pointsMerchandise); |
| | | |
| | | if((m * goodsNums) == 0 && pointsMerchandise.getPayStatus() == 2){ |
| | | returnModel.setReturnId(returnId); |
| | | return ResultUtil.success(returnModel); |
| | | } |
| | | |
| | | switch (exchangeType.getExchangeType()) { |
| | | // 积分 |
| | |
| | | if ("TRADE_SUCCESS".equals(tradeStatus)) { |
| | | for (UserPointsMerchandise userPointsMerchandise : userPointsMerchandises) { |
| | | userPointsMerchandise.setPayStatus(2); |
| | | userPointsMerchandise.setPaymentTime(new Date()); |
| | | userPointsMerchandise.setOrderNumber(tradeNo); |
| | | userPointsMerchandise.setPayType(2); |
| | | userPointsMerchandise.setInsertTime(null); |
| | |
| | | } |
| | | if ("SUCCESS".equals(s)) { |
| | | userPointsMerchandise.setPayStatus(2); |
| | | userPointsMerchandise.setPaymentTime(new Date()); |
| | | userPointsMerchandise.setOrderNumber(transaction_id); |
| | | userPointsMerchandise.setPayType(1); |
| | | mcClient.updateDetailsUserPointMercase(userPointsMerchandise); |
| | |
| | | |
| | | private String key = "6f5e0c2dcabfa9c27b5da5836a362fef";//微信商户号 |
| | | |
| | | private String callbackPath = "http://8.137.22.229:56666/account";//支付回调网关地址 |
| | | private String callbackPath = "https://online.daowepark.com:443/account";//支付回调网关地址 |
| | | |
| | | private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径 |
| | | |
| | |
| | | import com.dsh.activity.entity.BenefitsVideoClassification; |
| | | import com.dsh.activity.entity.BenefitsVideos; |
| | | import com.dsh.activity.model.*; |
| | | import com.dsh.activity.model.request.GetBenefitVideoById; |
| | | import com.dsh.activity.service.BenefitsVideosService; |
| | | import com.dsh.activity.service.IBenefitsVideoClassificationService; |
| | | import com.dsh.activity.util.ResultUtil; |
| | |
| | | */ |
| | | @RequestMapping("/base/benefitVideo/getBenefitVideoById") |
| | | @ResponseBody |
| | | public List<BenefitsVideos> getBenefitVideoById(@RequestBody Integer id) { |
| | | return bfvService.getBenefitVideoById(id); |
| | | public List<BenefitsVideos> getBenefitVideoById(@RequestBody GetBenefitVideoById getBenefitVideoById) { |
| | | return bfvService.getBenefitVideoById(getBenefitVideoById.getBenefitsVideoClassificationId(), getBenefitVideoById.getState()); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | return benefitsVideoClassificationService.changeState(vo); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * @param changeBenefitsVedioState |
| | | */ |
| | | @RequestMapping("/base/benefitVideo/changeBenefitsVedioState") |
| | | public void changeBenefitsVedioState(@RequestBody ChangeBenefitsVedioState changeBenefitsVedioState){ |
| | | BenefitsVideos benefitsVideos = new BenefitsVideos(); |
| | | benefitsVideos.setState(changeBenefitsVedioState.getState()); |
| | | benefitsVideos.setId(changeBenefitsVedioState.getId()); |
| | | bfvService.updateById(benefitsVideos); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据视频课程id删除福利视频数据 |
| | | * @param courseId |
| | | */ |
| | | @RequestMapping("/base/benefitVideo/delBenefitsVedio") |
| | | public void delBenefitsVedio(@RequestBody Integer courseId){ |
| | | BenefitsVideos benefitsVideos = new BenefitsVideos(); |
| | | benefitsVideos.setState(3); |
| | | bfvService.update(benefitsVideos, new QueryWrapper<BenefitsVideos>().eq("courseId", courseId).ne("state", 3)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("base/benefitVideo/getList") |
| | | public BenefitsVideos getVideosWithIds(@RequestBody Integer id) { |
| | | return bfvService.getOne(new QueryWrapper<BenefitsVideos>().eq("id", id).eq("state", 1)); |
| | |
| | | } |
| | | List<UserPointsMerchandise> list = upmseService.list(userPointsMerchandiseLambdaQueryWrapper); |
| | | System.out.println(list); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | if (list.size() > 0) { |
| | | for (UserPointsMerchandise pointsMerchandise : list) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", pointsMerchandise.getId()); |
| | | map.put("userId", pointsMerchandise.getUserId()); |
| | | map.put("status", pointsMerchandise.getStatus()); |
| | | map.put("payTime", sdf.format(pointsMerchandise.getPaymentTime())); |
| | | mapList.add(map); |
| | | } |
| | | } |
| | |
| | | List<Map<String, Object>> queryBenefitsVideosList(@Param("uid") Integer uid, @Param("classificationId") Integer classificationId, |
| | | @Param("ids") List<Integer> ids, @Param("offset") Integer offset, @Param("limit") Integer limit); |
| | | |
| | | List<BenefitsVideos> getBenefitVideoById(@Param("id") Integer id); |
| | | List<BenefitsVideos> getBenefitVideoById(@Param("id") Integer id, @Param("state") Integer state); |
| | | |
| | | List<BenefitsVideos> getBybIdAndcId(@Param("bId") Integer benefitsVideoClassificationId, @Param("cId") Integer courseId); |
| | | } |
New file |
| | |
| | | package com.dsh.activity.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/4/8 10:24 |
| | | */ |
| | | @Data |
| | | public class ChangeBenefitsVedioState { |
| | | /** |
| | | * 视频id |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 装药(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | } |
New file |
| | |
| | | package com.dsh.activity.model.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/6/17 11:12 |
| | | */ |
| | | @Data |
| | | public class GetBenefitVideoById { |
| | | private Integer benefitsVideoClassificationId; |
| | | |
| | | private Integer state; |
| | | } |
| | |
| | | void receiveAward(Integer uid, Integer id) throws Exception; |
| | | |
| | | |
| | | List<BenefitsVideos> getBenefitVideoById(Integer id); |
| | | List<BenefitsVideos> getBenefitVideoById(Integer id, Integer state); |
| | | |
| | | List<BenefitsVideos> getBybIdAndcId(Integer benefitsVideoClassificationId, Integer courseId); |
| | | } |
| | |
| | | |
| | | @Resource |
| | | private UserIntegralChangesClient userIntegralChangesClient; |
| | | @Autowired |
| | | private BenefitsVideoClassificationMapper benefitsVideoClassificationMapper; |
| | | @Autowired |
| | | @Resource |
| | | private BenefitsVideosMapper benefitsVideosMapper; |
| | | |
| | | |
| | |
| | | wrapper.like("name", search); |
| | | } |
| | | |
| | | List<BenefitsVideoClassification> list = benefitsVideoClassificationService.list(wrapper.orderByAsc("sort")); |
| | | List<UserBenefitsVideos> userBenefitsVideos = userBenefitsVideosService.list(new QueryWrapper<UserBenefitsVideos>().eq("appUserId", uid)); |
| | | List<BenefitsVideoClassification> list = benefitsVideoClassificationService.list(wrapper.eq("state", 1) |
| | | .orderByDesc("sort")); |
| | | List<UserBenefitsVideos> userBenefitsVideos = userBenefitsVideosService.list(new QueryWrapper<UserBenefitsVideos>() |
| | | .eq("appUserId", uid)); |
| | | List<Integer> collect = userBenefitsVideos.stream().map(UserBenefitsVideos::getBenefitsVideosId).collect(Collectors.toList()); |
| | | |
| | | List<BenefitsVideoClassificationListVo> listVos = new ArrayList<>(); |
| | |
| | | BenefitsVideoClassificationListVo benefitsVideoClassificationListVo = new BenefitsVideoClassificationListVo(); |
| | | benefitsVideoClassificationListVo.setId(benefitsVideoClassification.getId()); |
| | | benefitsVideoClassificationListVo.setName(benefitsVideoClassification.getName()); |
| | | QueryWrapper<BenefitsVideos> benefitsVideosQueryWrapper = new QueryWrapper<BenefitsVideos>().eq("state", 1).eq("benefitsVideoClassificationId", benefitsVideoClassification.getId()); |
| | | QueryWrapper<BenefitsVideos> benefitsVideosQueryWrapper = new QueryWrapper<BenefitsVideos>() |
| | | .eq("state", 1).eq("benefitsVideoClassificationId", benefitsVideoClassification.getId()); |
| | | if (collect.size() > 0) { |
| | | benefitsVideosQueryWrapper.notIn("id", collect); |
| | | } |
| | | List<BenefitsVideos> list1 = this.list(benefitsVideosQueryWrapper.eq("state", 1).orderByDesc("insertTime").last(" limit 0, 4")); |
| | | List<BenefitsVideos> list1 = this.list(benefitsVideosQueryWrapper.orderByAsc("insertTime").last(" limit 0, 4")); |
| | | List<BenefitsVideosListVo> lists = new ArrayList<>(); |
| | | for (BenefitsVideos benefitsVideos : list1) { |
| | | if (benefitsVideos.getState() == 1) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<BenefitsVideos> getBenefitVideoById(Integer id) { |
| | | return benefitsVideosMapper.getBenefitVideoById(id); |
| | | public List<BenefitsVideos> getBenefitVideoById(Integer id, Integer state) { |
| | | return benefitsVideosMapper.getBenefitVideoById(id, state); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <select id="getBenefitVideoById" resultType="com.dsh.activity.entity.BenefitsVideos"> |
| | | select * from t_benefits_videos where |
| | | t_benefits_videos.benefitsVideoClassificationId = #{id} |
| | | <if test="null != state"> |
| | | and state = #{state} |
| | | </if> |
| | | </select> |
| | | <select id="getBybIdAndcId" resultType="com.dsh.activity.entity.BenefitsVideos"> |
| | | select * from t_benefits_videos |
| | |
| | | worldCup.setProvinceCode(provinceCode); |
| | | worldCup.setCity(city.replace("市", "")); |
| | | worldCup.setCityCode(cityCode); |
| | | String[] split = worldCup.getPayType().split(","); |
| | | List<String> strings = Arrays.asList(split); |
| | | if(strings.contains("0")){ |
| | | worldCup.setCash(null); |
| | | worldCup.setClassHour(null); |
| | | worldCup.setPaiCoin(null); |
| | | } |
| | | if(!strings.contains("1")){ |
| | | worldCup.setCash(null); |
| | | } |
| | | if(!strings.contains("2")){ |
| | | worldCup.setPaiCoin(null); |
| | | } |
| | | if(!strings.contains("3")){ |
| | | worldCup.setClassHour(null); |
| | | } |
| | | worldCupService.save(worldCup); |
| | | return worldCup.getId(); |
| | | } |
| | |
| | | WorldCup worldCup1 = worldCupService.getById(worldCup2.getId()); |
| | | worldCup2.setCreateTime(worldCup1.getCreateTime()); |
| | | worldCup2.setMatchNumber(worldCup1.getMatchNumber()); |
| | | String[] split = worldCup2.getPayType().split(","); |
| | | List<String> strings = Arrays.asList(split); |
| | | if(strings.contains("0")){ |
| | | worldCup2.setCash(null); |
| | | worldCup2.setClassHour(null); |
| | | worldCup2.setPaiCoin(null); |
| | | } |
| | | if(!strings.contains("1")){ |
| | | worldCup2.setCash(null); |
| | | } |
| | | if(!strings.contains("2")){ |
| | | worldCup2.setPaiCoin(null); |
| | | } |
| | | if(!strings.contains("3")){ |
| | | worldCup2.setClassHour(null); |
| | | } |
| | | worldCupService.updateWorldCupAll(worldCup2); |
| | | return worldCup2.getId(); |
| | | } |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/worldCup/endWorldCupCallback") |
| | | public void endWorldCupCallback(String custom, Integer red_score, Integer blue_score){ |
| | | log.warn("世界杯游戏成绩回调:custom->" + custom + ",red_score->" + red_score + ",blue_score->" + blue_score); |
| | | worldCupCompetitorService.endWorldCupCallback(custom, red_score, blue_score); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getWorldCupRank(@Param("item") WorldCupRank worldCupRank, @Param("appUserIds") List<Integer> appUserIds); |
| | | |
| | | |
| | | List<Map<String, Object>> getWorldCupRank1(@Param("item") WorldCupRank worldCupRank, @Param("appUserIds") List<Integer> appUserIds); |
| | | |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> worldCupRecordsList(@Param("item") WorldCupRecords worldCupRecords, @Param("appUserIds") List<Integer> appUserIds); |
| | | |
| | | /** |
| | | * 获取比赛排行榜列表数据 |
| | | * @param worldCupRecords |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> worldCupRecordsList1(@Param("item") WorldCupRecords worldCupRecords, @Param("appUserIds") List<Integer> appUserIds); |
| | | |
| | | |
| | | int worldCupRecordsListCount(@Param("appUserIds") List<Integer> appUserIds); |
| | |
| | | |
| | | |
| | | Map<String, Object> getUserGameRecordList(@Param("participantType") Integer participantType, @Param("participantId") Long participantId); |
| | | |
| | | Map<String, Object> getUserGameRecordList1(@Param("participantType") Integer participantType, @Param("participantId") Long participantId); |
| | | |
| | | |
| | | /** |
| | |
| | | }else{ |
| | | wrapper.eq("participantType", 1); |
| | | } |
| | | int win = this.count(wrapper.eq("participantId", entrantRank.getId()).eq("matchResult", 1)); |
| | | int win = this.count(wrapper.eq("participantId", entrantRank.getId()).in("matchResult", Arrays.asList(0, 1))); |
| | | entrantRankVo.setWin(win); |
| | | |
| | | wrapper = new QueryWrapper<>(); |
| | |
| | | AppUser appUser = appUserClient.getAppUser(worldCupRank.getAppUserId()); |
| | | appUserIds = appUserClient.getAppUserIds(appUser.getCityCode()); |
| | | } |
| | | //总场次 |
| | | List<Map<String, Object>> lists = this.baseMapper.getWorldCupRank(worldCupRank, appUserIds); |
| | | List<WorldCupRankVo> list = new ArrayList<>(); |
| | | //未负的数据 |
| | | List<Map<String, Object>> lists1 = this.baseMapper.getWorldCupRank1(worldCupRank, appUserIds); |
| | | List<Map<String, Object>> mapList = new ArrayList<>(); |
| | | for (int i = 0; i < lists.size(); i++) { |
| | | Map<String, Object> map = lists.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()); |
| | | Integer num = Integer.valueOf(null == map.get("num") ? "0" : map.get("num").toString()); |
| | | //学员 |
| | | if(participantType == 1){ |
| | | TStudent tStudent = studentClient.queryById(participantId.intValue()); |
| | | if(tStudent.getState() != 1){ |
| | | continue; |
| | | } |
| | | } |
| | | //参赛人员 |
| | | if(participantType == 2){ |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | if(participant.getState() != 1){ |
| | | continue; |
| | | } |
| | | } |
| | | map.put("totalSession", num); |
| | | map.put("winRate", "0"); |
| | | for (Map<String, Object> objectMap : lists1) { |
| | | Integer participantType1 = Integer.valueOf(objectMap.get("participantType").toString()); |
| | | Long participantId1 = Long.valueOf(objectMap.get("participantId").toString()); |
| | | Integer appUserId1 = Integer.valueOf(objectMap.get("appUserId").toString()); |
| | | Integer num1 = Integer.valueOf(null == objectMap.get("num") ? "0" : objectMap.get("num").toString()); |
| | | if(participantType.compareTo(participantType1) == 0 && participantId.compareTo(participantId1) == 0 && appUserId.compareTo(appUserId1) == 0){ |
| | | map.put("winRate", new BigDecimal(num1).divide(new BigDecimal(num), new MathContext(4, RoundingMode.HALF_EVEN)).multiply(new BigDecimal(100)).doubleValue()); |
| | | break; |
| | | } |
| | | } |
| | | mapList.add(map); |
| | | } |
| | | if(worldCupRank.getSort() == 1){ |
| | | mapList.sort(new Comparator<Map<String, Object>>() { |
| | | @Override |
| | | public int compare(Map<String, Object> o1, Map<String, Object> o2) { |
| | | return Double.valueOf(o1.get("totalSession").toString()).compareTo(Double.valueOf(o2.get("totalSession").toString())) * -1; |
| | | } |
| | | }); |
| | | } |
| | | if(worldCupRank.getSort() == 2){ |
| | | mapList.sort(new Comparator<Map<String, Object>>() { |
| | | @Override |
| | | public int compare(Map<String, Object> o1, Map<String, Object> o2) { |
| | | return Double.valueOf(o1.get("winRate").toString()).compareTo(Double.valueOf(o2.get("winRate").toString())) * -1; |
| | | } |
| | | }); |
| | | } |
| | | List<WorldCupRankVo> 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()); |
| | |
| | | appUserIdsByCityName.setCity(worldCupRecords.getCity()); |
| | | List<Integer> appUserIds = appUserClient.getAppUserIdsByCityName(appUserIdsByCityName); |
| | | List<Map<String, Object>> mapList = this.baseMapper.worldCupRecordsList(worldCupRecords, appUserIds); |
| | | List<Map<String, Object>> mapList1 = this.baseMapper.worldCupRecordsList1(worldCupRecords, appUserIds); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | int row_num = 0; |
| | | 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()); |
| | | Integer totalSession = Integer.valueOf(map.get("totalSession").toString()); |
| | | Integer num = Integer.valueOf(null == map.get("num") ? "0" : map.get("num").toString()); |
| | | //学员 |
| | | if(participantType == 1){ |
| | | TStudent tStudent = studentClient.queryById(participantId.intValue()); |
| | | if(tStudent.getState() != 1){ |
| | | continue; |
| | | } |
| | | } |
| | | //参赛人员 |
| | | if(participantType == 2){ |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | if(participant.getState() != 1){ |
| | | continue; |
| | | } |
| | | } |
| | | map.put("totalSession", num); |
| | | map.put("winRate", "0"); |
| | | map.put("win", "0"); |
| | | for (Map<String, Object> objectMap : mapList1) { |
| | | Integer participantType1 = Integer.valueOf(objectMap.get("participantType").toString()); |
| | | Long participantId1 = Long.valueOf(objectMap.get("participantId").toString()); |
| | | Integer appUserId1 = Integer.valueOf(objectMap.get("appUserId").toString()); |
| | | Integer num1 = Integer.valueOf(null == objectMap.get("num") ? "0" : objectMap.get("num").toString()); |
| | | if(participantType.compareTo(participantType1) == 0 && participantId.compareTo(participantId1) == 0 && appUserId.compareTo(appUserId1) == 0){ |
| | | map.put("winRate", new BigDecimal(num1).divide(new BigDecimal(num), new MathContext(4, RoundingMode.HALF_EVEN)).multiply(new BigDecimal(100)).doubleValue()); |
| | | map.put("win", num1); |
| | | break; |
| | | } |
| | | } |
| | | Integer win = Integer.valueOf(map.get("win").toString()); |
| | | Integer lose = totalSession - win; |
| | | Integer lose = num - win; |
| | | map.put("lose", lose); |
| | | AppUser appUser = appUserClient.getAppUser(appUserId); |
| | | map.put("province", appUser.getProvince() + appUser.getCity()); |
| | | if(1 == participantType){ |
| | | TStudent tStudent = studentClient.queryById(participantId.intValue()); |
| | | if(tStudent.getState() != 1){ |
| | | continue; |
| | | } |
| | | map.put("name", tStudent.getName()); |
| | | map.put("phone", ToolUtil.isNotEmpty(tStudent.getPhone()) ? tStudent.getPhone() : appUser.getPhone()); |
| | | }else{ |
| | | Participant participant = participantClient.getParticipant(participantId); |
| | | if(participant.getState() != 1){ |
| | | continue; |
| | | } |
| | | map.put("name", participant.getName()); |
| | | map.put("phone", ToolUtil.isNotEmpty(participant.getPhone()) ? participant.getPhone() : appUser.getPhone()); |
| | | } |
| | | row_num++; |
| | | map.put("row_num", row_num); |
| | | list.add(map); |
| | | } |
| | | list.sort(new Comparator<Map<String, Object>>() { |
| | | @Override |
| | | public int compare(Map<String, Object> o1, Map<String, Object> o2) { |
| | | return Double.valueOf(o1.get("totalSession").toString()).compareTo(Double.valueOf(o2.get("totalSession").toString())) * -1; |
| | | } |
| | | }); |
| | | |
| | | Integer offset = worldCupRecords.getOffset(); |
| | | Integer limit = worldCupRecords.getLimit(); |
| | | limit += offset; |
| | | map1.put("rows", mapList.subList(offset, mapList.size() >= limit ? limit : mapList.size())); |
| | | int count = this.baseMapper.worldCupRecordsListCount(appUserIds); |
| | | map1.put("total", count); |
| | | map1.put("rows", list.subList(offset, list.size() >= limit ? limit : list.size())); |
| | | map1.put("total", list.size()); |
| | | return map1; |
| | | } |
| | | |
| | |
| | | Long participantId = Long.valueOf(map.get("participantId").toString()); |
| | | Integer appUserId = Integer.valueOf(map.get("appUserId").toString()); |
| | | Map<String, Object> userGameRecordList = worldCupCompetitorMapper.getUserGameRecordList(participantType, participantId); |
| | | Map<String, Object> userGameRecordList1 = worldCupCompetitorMapper.getUserGameRecordList1(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"); |
| | | totalSession = Integer.valueOf(null != userGameRecordList && null != userGameRecordList.get("num") ? userGameRecordList.get("num").toString() : "0"); |
| | | win = Integer.valueOf(null != userGameRecordList1 && null != userGameRecordList1.get("num") ? userGameRecordList1.get("num").toString() : "0"); |
| | | }else{ |
| | | userGameRecordList = new HashMap<>(); |
| | | } |
| | |
| | | map.put("space_id", tGame.getSiteId() + ""); |
| | | 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"); |
| | | map.put("api_url", "https://online.daowepark.com:443/communityWorldCup/base/worldCup/endWorldCupCallback"); |
| | | map.put("custom", jsonObject.toJSONString()); |
| | | |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/quickStart", map); |
| | | String s = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/quickStart", map); |
| | | JSONObject jsonObject1 = JSONObject.parseObject(s); |
| | | Integer code1 = jsonObject1.getInteger("code"); |
| | | String message = jsonObject1.getString("message"); |
| | |
| | | |
| | | private String key = "6f5e0c2dcabfa9c27b5da5836a362fef";//微信商户号 |
| | | |
| | | private String callbackPath = "http://8.137.22.229:56666/communityWorldCup";//支付回调网关地址 |
| | | private String callbackPath = "https://online.daowepark.com:443/communityWorldCup";//支付回调网关地址 |
| | | |
| | | private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径 |
| | | |
| | |
| | | spring.flyway.enabled=false |
| | | # \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0479\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD |
| | | feign.compression.request.mime-types=text/xml,application/xml,application/json |
| | | feign.compression.request.min-request-size=4096 |
| | | feign.compression.request.min-request-size=102400 |
| | | feign.compression.request.enabled=true |
| | | feign.compression.response.enabled=true |
| | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- |
| | | <select id="getWorldCupRank" resultType="java.util.Map"> |
| | | select |
| | | aa.participantType, |
| | |
| | | order by aa.winRate desc,aa.participantId |
| | | </if> |
| | | </select> |
| | | --> |
| | | |
| | | <select id="getWorldCupRank" resultType="java.util.Map"> |
| | | select |
| | | participantType, |
| | | participantId, |
| | | appUserId, |
| | | count(*) as num |
| | | from t_world_cup_competitor |
| | | where matchResult is not null |
| | | <if test="null != item.year"> |
| | | and DATE_FORMAT(startTime, '%Y') = #{item.year} |
| | | </if> |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | | <foreach collection="appUserIds" item="iten" index="index" open="(" separator="," close=")"> |
| | | #{iten} |
| | | </foreach> |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | </select> |
| | | |
| | | |
| | | <select id="getWorldCupRank1" resultType="java.util.Map"> |
| | | select |
| | | participantType, |
| | | participantId, |
| | | appUserId, |
| | | count(*) as num |
| | | from t_world_cup_competitor |
| | | where matchResult is not null and matchResult != -1 |
| | | <if test="null != item.year"> |
| | | and DATE_FORMAT(startTime, '%Y') = #{item.year} |
| | | </if> |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | | <foreach collection="appUserIds" item="iten" index="index" open="(" separator="," close=")"> |
| | | #{iten} |
| | | </foreach> |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="worldCupRecordsList" resultType="map"> |
| | | select @row_num := @row_num + 1 AS row_num, |
| | | bb.participantType, |
| | | bb.participantId, |
| | | bb.appUserId, |
| | | bb.totalSession, |
| | | bb.win, |
| | | ROUND(bb.winRate, 2) as winRate |
| | | from ( |
| | | select |
| | | aa.participantType, |
| | | aa.participantId, |
| | | aa.appUserId, |
| | | aa.totalSession, |
| | | aa.win, |
| | | aa.winRate |
| | | from ( |
| | | 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 matchResult is not null |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | | <foreach collection="appUserIds" item="iten" index="index" open="(" separator="," close=")"> |
| | | #{iten} |
| | | </foreach> |
| | | </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 != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | | <foreach collection="appUserIds" item="iten" index="index" open="(" separator="," close=")"> |
| | | #{iten} |
| | | </foreach> |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | ) as b on (a.participantId = b.participantId and a.participantType = b.participantType) |
| | | ) as aa order by aa.totalSession desc |
| | | ) as bb, (SELECT @row_num := 0) AS r |
| | | select |
| | | participantType, |
| | | participantId, |
| | | appUserId, |
| | | count(*) as num |
| | | from t_world_cup_competitor |
| | | where matchResult is not null |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | | <foreach collection="appUserIds" item="iten" index="index" open="(" separator="," close=")"> |
| | | #{iten} |
| | | </foreach> |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | </select> |
| | | |
| | | <select id="worldCupRecordsList1" resultType="map"> |
| | | select |
| | | participantType, |
| | | participantId, |
| | | appUserId, |
| | | count(*) as num |
| | | from t_world_cup_competitor |
| | | where matchResult is not null and matchResult != -1 |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | | <foreach collection="appUserIds" item="iten" index="index" open="(" separator="," close=")"> |
| | | #{iten} |
| | | </foreach> |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | </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 matchResult is not null |
| | | <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) |
| | | participantType, |
| | | participantId, |
| | | appUserId, |
| | | count(*) as num |
| | | from t_world_cup_competitor |
| | | where matchResult is not null |
| | | <if test="null != participantType"> |
| | | and participantType = #{participantType} |
| | | </if> |
| | | <if test="null != participantId"> |
| | | and participantId = #{participantId} |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getUserGameRecordList1" resultType="map"> |
| | | 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 |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | |
| | | #datasource.names=master0 |
| | | #datasource.master0.type=com.alibaba.druid.pool.DruidDataSource |
| | | #datasource.master0.driverClassName=com.mysql.cj.jdbc.Driver |
| | | #datasource.master0.url=jdbc:mysql://192.168.110.80:3306/playpai_community_world_cup?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | #datasource.master0.url=jdbc:mysql://8.137.22.229:3306/playpai_community_world_cup?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | #datasource.master0.username=root |
| | | #datasource.master0.password=123456 |
| | | #datasource.master0.password=playpai2023! |
| | | #datasource.master0.maxActive=20 |
| | | #datasource.master0.maxWait=60000 |
| | | #datasource.master0.minIdle=5 |
| | |
| | | //package com.dsh; |
| | | // |
| | | //import com.alibaba.fastjson.JSONObject; |
| | | //import com.dsh.communityWorldCup.feignclient.account.model.AppUser; |
| | | //import com.dsh.communityWorldCup.feignclient.account.model.TStudent; |
| | | //import com.dsh.communityWorldCup.feignclient.competition.model.Participant; |
| | | //import com.dsh.communityWorldCup.mapper.WorldCupCompetitorMapper; |
| | | //import com.dsh.communityWorldCup.model.WorldCupRank; |
| | | //import com.dsh.communityWorldCup.service.impl.WorldCupCompetitorServiceImpl; |
| | | //import org.junit.Test; |
| | | //import org.junit.runner.RunWith; |
| | | //import org.springframework.boot.test.context.SpringBootTest; |
| | | //import org.springframework.test.context.junit4.SpringRunner; |
| | | // |
| | | //import javax.annotation.Resource; |
| | | //import java.math.BigDecimal; |
| | | //import java.math.MathContext; |
| | | //import java.math.RoundingMode; |
| | | //import java.util.ArrayList; |
| | | //import java.util.HashMap; |
| | | //import java.util.List; |
| | | //import java.util.Map; |
| | | // |
| | | ///** |
| | | // * @author zhibing.pu |
| | |
| | | //public class CommunityWorldCupApplicationTest { |
| | | // |
| | | // |
| | | // @Resource |
| | | // private WorldCupCompetitorMapper worldCupCompetitorMapper; |
| | | // |
| | | // |
| | | // @Test |
| | | // public void test(){ |
| | | // 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://8.137.22.229: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); |
| | | // WorldCupRank worldCupRank = new WorldCupRank(); |
| | | // worldCupRank.setYear(2024); |
| | | // //总场次 |
| | | // List<Map<String, Object>> lists = worldCupCompetitorMapper.getWorldCupRank(worldCupRank, null); |
| | | // //未负的数据 |
| | | // List<Map<String, Object>> lists1 = worldCupCompetitorMapper.getWorldCupRank1(worldCupRank, null); |
| | | // List<Map<String, Object>> mapList = new ArrayList<>(); |
| | | // for (int i = 0; i < lists.size(); i++) { |
| | | // Map<String, Object> map = lists.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()); |
| | | // Integer num = Integer.valueOf(null == map.get("num") ? "0" : map.get("num").toString()); |
| | | // map.put("totalSession", num); |
| | | // map.put("winRate", "0"); |
| | | // for (Map<String, Object> objectMap : lists1) { |
| | | // Integer participantType1 = Integer.valueOf(objectMap.get("participantType").toString()); |
| | | // Long participantId1 = Long.valueOf(objectMap.get("participantId").toString()); |
| | | // Integer appUserId1 = Integer.valueOf(objectMap.get("appUserId").toString()); |
| | | // Integer num1 = Integer.valueOf(null == objectMap.get("num") ? "0" : objectMap.get("num").toString()); |
| | | // if(participantType.compareTo(participantType1) == 0 && participantId.compareTo(participantId1) == 0 && appUserId.compareTo(appUserId1) == 0){ |
| | | // map.put("winRate", new BigDecimal(num1).divide(new BigDecimal(num), new MathContext(2, RoundingMode.HALF_EVEN)).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN).doubleValue()); |
| | | // break; |
| | | // } |
| | | // } |
| | | // mapList.add(map); |
| | | // } |
| | | // } |
| | | // |
| | |
| | | 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.util.Date; |
| | |
| | | * 生日 |
| | | */ |
| | | @TableField("birthday") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date birthday; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | } |
| | |
| | | |
| | | private String key = "6f5e0c2dcabfa9c27b5da5836a362fef";//微信商户号 |
| | | |
| | | private String callbackPath = "http://8.137.22.229:56666/competition";//支付回调网关地址 |
| | | private String callbackPath = "https://online.daowepark.com:443/competition";//支付回调网关地址 |
| | | |
| | | private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径 |
| | | |
| | |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/course/queryCoursePackageType") |
| | | @ApiOperation(value = "获取课程类型列表", tags = {"APP-课程列表"}) |
| | | @ApiImplicitParams({ |
| | | }) |
| | | public ResultUtil<List<BaseVo>> queryCoursePackageType1() { |
| | | try { |
| | | List<TCoursePackageType> coursePackageTypes = coursePackageTypeService.list(new QueryWrapper<TCoursePackageType>().eq("state", 1)); |
| | | List<BaseVo> list = new ArrayList<>(); |
| | | coursePackageTypes.forEach(c -> { |
| | | BaseVo baseVo = new BaseVo(); |
| | | BeanUtils.copyProperties(c, baseVo); |
| | | list.add(baseVo); |
| | | }); |
| | | return ResultUtil.success(list); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | |
| | | |
| | | public List<Integer> getIds(Integer siteId) { |
| | | HttpRequest httpRequest = HttpRequest.get("https://try.daowepark.com/v7/user_api/general/get_space_area?space_id=" + siteId); |
| | | HttpRequest httpRequest = HttpRequest.get("https://port.daowepark.com/v7/user_api/general/get_space_area?space_id=" + siteId); |
| | | HttpResponse execute = httpRequest.execute(); |
| | | String body = execute.body(); |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | |
| | | } |
| | | |
| | | public List<Integer> getIds(Integer siteId) { |
| | | HttpRequest httpRequest = HttpRequest.get("https://try.daowepark.com/v7/user_api/general/get_space_area?space_id=" + siteId); |
| | | HttpRequest httpRequest = HttpRequest.get("https://port.daowepark.com/v7/user_api/general/get_space_area?space_id=" + siteId); |
| | | HttpResponse execute = httpRequest.execute(); |
| | | String body = execute.body(); |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | |
| | | |
| | | private String key = "6f5e0c2dcabfa9c27b5da5836a362fef";//微信商户号 |
| | | |
| | | private String callbackPath = "http://8.137.22.229:56666/course";//支付回调网关地址 |
| | | private String callbackPath = "https://online.daowepark.com:443/course";//支付回调网关地址 |
| | | |
| | | private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径 |
| | | |
| | |
| | | package com.dsh.course.feignClient.activity; |
| | | |
| | | import com.dsh.course.feignClient.activity.model.BenefitsVedioChangeStateVO; |
| | | import com.dsh.course.feignClient.activity.model.BenefitsVideoClassification; |
| | | import com.dsh.course.feignClient.activity.model.BenefitsVideos; |
| | | import com.dsh.course.feignClient.activity.model.QueryBenefitsVedioVO; |
| | | import com.dsh.course.feignClient.activity.model.*; |
| | | import com.dsh.guns.modular.system.model.TQueryBenefitsVO; |
| | | import com.dsh.guns.modular.system.model.dto.GetBenefitVideoById; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | */ |
| | | @RequestMapping("/base/benefitVideo/changeState") |
| | | Object changeState(@RequestBody BenefitsVedioChangeStateVO vo); |
| | | |
| | | |
| | | /** |
| | | * 修改福利视频状态 |
| | | * @param changeBenefitsVedioState |
| | | */ |
| | | @RequestMapping("/base/benefitVideo/changeBenefitsVedioState") |
| | | void changeBenefitsVedioState(@RequestBody ChangeBenefitsVedioState changeBenefitsVedioState); |
| | | |
| | | /** |
| | | * 根据视频课程id删除福利视频数据 |
| | | * @param courseId |
| | | */ |
| | | @RequestMapping("/base/benefitVideo/delBenefitsVedio") |
| | | void delBenefitsVedio(@RequestBody Integer courseId); |
| | | |
| | | |
| | | /** |
| | | * 查看福利视频分类下视频 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/benefitVideo/getBenefitVideoById") |
| | | public List<BenefitsVideos> getBenefitVideoById(@RequestBody Integer id); |
| | | public List<BenefitsVideos> getBenefitVideoById(@RequestBody GetBenefitVideoById getBenefitVideoById); |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/4/8 10:24 |
| | | */ |
| | | @Data |
| | | public class ChangeBenefitsVedioState { |
| | | /** |
| | | * 视频id |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 装药(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | } |
| | |
| | | List<CoachSerchVO> coachSerchVOS = coachClient.listAll(coachQuery); |
| | | for (CoachSerchVO coachSerchVO : coachSerchVOS) { |
| | | Integer cityManagerId = coachSerchVO.getCityManagerId(); |
| | | TOperator byId = operatorService.getById(cityManagerId); |
| | | Integer userId = byId.getUserId(); |
| | | User byId1 = userService.getById(userId); |
| | | coachSerchVO.setNameAndPhone(byId.getName()+""+byId1.getPhone()); |
| | | if(0 == cityManagerId){ |
| | | coachSerchVO.setNameAndPhone("平台"); |
| | | }else { |
| | | TOperator byId = operatorService.getById(cityManagerId); |
| | | Integer userId = byId.getUserId(); |
| | | User byId1 = userService.getById(userId); |
| | | coachSerchVO.setNameAndPhone(byId.getName()+""+byId1.getPhone()); |
| | | } |
| | | } |
| | | return coachSerchVOS; |
| | | } |
| | |
| | | if(cityCode==null){ |
| | | cityCode=""; |
| | | } |
| | | String apiUrl1 = "https://try.daowepark.com/v7/user_api/general/cityGameRanking?space_id="+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; |
| | | String apiUrl1 = "https://port.daowepark.com/v7/user_api/general/cityGameRanking?space_id="+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; |
| | | URL url1 = null; |
| | | try { |
| | | url1 = new URL(apiUrl1); |
| | |
| | | if(cityCode==null){ |
| | | cityCode=""; |
| | | } |
| | | // String apiUrl1 = "https://try.daowepark.com/v7/user_api/general/accuracyGameRanking?space_id=1001"+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; |
| | | String apiUrl1 = "https://try.daowepark.com/v7/user_api/general/accuracyGameRanking?space_id="+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; |
| | | // String apiUrl1 = "https://port.daowepark.com/v7/user_api/general/accuracyGameRanking?space_id=1001"+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; |
| | | String apiUrl1 = "https://port.daowepark.com/v7/user_api/general/accuracyGameRanking?space_id="+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; |
| | | URL url1 = null; |
| | | try { |
| | | url1 = new URL(apiUrl1); |
| | |
| | | // 创建 HttpClient 实例 |
| | | HttpClient httpClient = HttpClients.createDefault(); |
| | | // 创建 POST 请求 |
| | | HttpPost httpPost = new HttpPost("https://try.daowepark.com/v7/user_api/general/gameList"); |
| | | HttpPost httpPost = new HttpPost("https://port.daowepark.com/v7/user_api/general/gameList"); |
| | | // 设置请求体数据 |
| | | String postData = "sign=0DB011836143EEE2C2E072967C9F4E4B&space_id=1001&sutu_id=1001"; |
| | | |
| | |
| | | // 创建 HttpClient 实例 |
| | | HttpClient httpClient = HttpClients.createDefault(); |
| | | // 创建 POST 请求 |
| | | HttpPost httpPost = new HttpPost("https://try.daowepark.com/v7/user_api/general/getBatterData"); |
| | | HttpPost httpPost = new HttpPost("https://port.daowepark.com/v7/user_api/general/getBatterData"); |
| | | // 设置请求体数据 |
| | | String postData = "sign=0DB011836143EEE2C2E072967C9F4E4B&space_id="+storeId+"&date_type="+range+"&year="; |
| | | |
| | |
| | | public Object listSUTU() { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/gameDataRate"; |
| | | String apiUrl = "https://port.daowepark.com/v7/user_api/general/gameDataRate"; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | public Object listSUTU1(String range,String gameId, String time, String spaceId, String cityCode) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/getSingleGameData?game_id=" + gameId + "&date_type=" + range + "&date=" + time + "&space_id=" + spaceId + "&city_code=" + cityCode; |
| | | String apiUrl = "https://port.daowepark.com/v7/user_api/general/getSingleGameData?game_id=" + gameId + "&date_type=" + range + "&date=" + time + "&space_id=" + spaceId + "&city_code=" + cityCode; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | public Object cityGameOne() { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/getAccuracyGameCount?space_id="; |
| | | String apiUrl = "https://port.daowepark.com/v7/user_api/general/getAccuracyGameCount?space_id="; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | public Object cityGame() { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/getCityGameCount"; |
| | | String apiUrl = "https://port.daowepark.com/v7/user_api/general/getCityGameCount"; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | public Object list(Integer storeId) { |
| | | try { |
| | | if (storeId!=null){ |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id="+storeId; |
| | | String apiUrl = "https://port.daowepark.com/v7/user_api/general/spaceDoorData?space_id="+storeId; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | @ResponseBody |
| | | public Object totalNum(Integer storeId) { |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id="+storeId; |
| | | String apiUrl = "https://port.daowepark.com/v7/user_api/general/spaceDoorData?space_id="+storeId; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | map.put("device_id",device); |
| | | map.put("region_id",""+siteId); |
| | | // 添加门禁 |
| | | String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); |
| | | String s1 = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/addDevice", map); |
| | | System.out.println(s1); |
| | | Gson gson = new Gson(); |
| | | // 解析请求结果,json: |
| | |
| | | map.put("device_id",device); |
| | | map.put("region_id",""+siteId); |
| | | // 添加门禁 |
| | | String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/editDevice/ids/"+id, map); |
| | | String s1 = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/editDevice/ids/"+id, map); |
| | | System.out.println(s1); |
| | | Gson gson = new Gson(); |
| | | // 解析请求结果,json: |
| | |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | // 添加门禁 |
| | | String s1 = HttpRequestUtil.postRequest |
| | | ("https://try.daowepark.com/v7/user_api/general/deleteDevice/ids/"+gateId, map); |
| | | ("https://port.daowepark.com/v7/user_api/general/deleteDevice/ids/"+gateId, map); |
| | | |
| | | System.out.println(s1); |
| | | Gson gson = new Gson(); |
| | |
| | | //// map.put("space_id","2010"); |
| | | //// // 获取门禁列表 |
| | | //// String s1 = HttpRequestUtil.getRequest |
| | | //// ("https://try.daowepark.com/v7/user_api/general/getDevice", map); |
| | | //// ("https://port.daowepark.com/v7/user_api/general/getDevice", map); |
| | | //// System.err.println(s1); |
| | | // |
| | | // HashMap<String, String> map = new HashMap<>(); |
| | |
| | | // map.put("region_id","2010"); |
| | | // // 获取门禁列表 |
| | | // String s1 = HttpRequestUtil.getRequest |
| | | // ("https://try.daowepark.com/v7/user_api/general/getDevice", map); |
| | | // ("https://port.daowepark.com/v7/user_api/general/getDevice", map); |
| | | // System.err.println(s1); |
| | | // }; |
| | | /** |
| | |
| | | map1.put("remark",tStore.getIntroduce()); |
| | | map1.put("lat",tStore.getLat()); |
| | | map1.put("lng",tStore.getLon()); |
| | | String result = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpace", map1); |
| | | String result = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/addSpace", map1); |
| | | System.out.println(result); |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | |
| | | // mapSite.put("name",tStore.getName()); |
| | | // mapSite.put("space_id",tStore.getId().toString()); |
| | | // mapSite.put("area_id",tSite.getId().toString()); |
| | | // HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceArea", mapSite); |
| | | // HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/addSpaceArea", mapSite); |
| | | // for (String s : tStore.getIds().split(",")) { |
| | | // HashMap<String, String> map = new HashMap<>(); |
| | | // map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | |
| | | // map.put("device_id",s); |
| | | // map.put("region_id",tSite.getId().toString()); |
| | | // // 添加门禁 |
| | | // String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); |
| | | // String s1 = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/addDevice", map); |
| | | // System.out.println(s1); |
| | | // } |
| | | return new SuccessTip<>(); |
| | |
| | | map.put("name",site.getName()); |
| | | map.put("space_id",store.getId().toString()); |
| | | String s = HttpRequestUtil.postRequest |
| | | ("https://try.daowepark.com/v7/user_api/general/addSpaceArea", map); |
| | | ("https://port.daowepark.com/v7/user_api/general/addSpaceArea", map); |
| | | JSONObject jsonObject = JSONObject.parseObject(s); |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | String area_id = data.getString("area_id"); |
| | |
| | | // map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | // if(StringUtils.hasLength(ids)) { |
| | | // for (String s : ids.split(",")) { |
| | | // String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/deleteDevice/ids/" + s, map); |
| | | // String s1 = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/deleteDevice/ids/" + s, map); |
| | | // System.out.println(s1); |
| | | // } |
| | | // } |
| | |
| | | // map1.put("device_id", s); |
| | | // map1.put("region_id", site.getId() + ""); |
| | | // // 添加门禁 |
| | | // String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map1); |
| | | // String s1 = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/addDevice", map1); |
| | | // System.out.println(s1); |
| | | // } |
| | | // } |
| | |
| | | model.addAttribute("time",startTime+" - " + endTime); |
| | | System.out.println("StartTime: " + startTime); |
| | | System.out.println("EndTime: " + endTime); |
| | | }else{ |
| | | model.addAttribute("time",""); |
| | | } |
| | | return PREFIX + "StoreValueConfig.html"; |
| | | } |
| | |
| | | |
| | | import com.dsh.course.feignClient.activity.BenefitsVideoClient; |
| | | import com.dsh.course.feignClient.activity.PointMercharsClient; |
| | | import com.dsh.course.feignClient.activity.model.BenefitsVedioChangeStateVO; |
| | | import com.dsh.course.feignClient.activity.model.BenefitsVideoClassification; |
| | | import com.dsh.course.feignClient.activity.model.BenefitsVideos; |
| | | import com.dsh.course.feignClient.activity.model.QueryBenefitsVedioVO; |
| | | import com.dsh.course.feignClient.activity.model.*; |
| | | import com.dsh.course.feignClient.course.CourseClient; |
| | | import com.dsh.course.feignClient.course.model.CourseChangeStateDTO; |
| | | import com.dsh.guns.config.UserExt; |
| | |
| | | import com.dsh.guns.modular.system.model.TQueryBenefitsVO; |
| | | import com.dsh.guns.modular.system.model.TQueryBenefitsVideosDTO; |
| | | import com.dsh.guns.modular.system.model.TQueryBenefitsVideosVO; |
| | | import com.dsh.guns.modular.system.model.dto.GetBenefitVideoById; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @RequestMapping("/addBenefitsVideos/{id}") |
| | | public String addBenefitsVideos(Model model,@PathVariable("id")Integer id) { |
| | | model.addAttribute("id",id); |
| | | List<BenefitsVideos> benefitVideoById = benefitsVideoClient.getBenefitVideoById(id); |
| | | // // 所选福利视频分类下的视频的courseId集合 |
| | | // List<Integer> list = new ArrayList<>(); |
| | | // for (BenefitsVideos benefitsVideos : benefitVideoById) { |
| | | // list.add(benefitsVideos.getCourseId()); |
| | | // } |
| | | TQueryBenefitsVideosDTO dto = new TQueryBenefitsVideosDTO(); |
| | | // dto.setCoursIds(list); |
| | | List<TQueryBenefitsVideosVO> courseByCourseIds = courseClient.getCourseByCourseIds(dto); |
| | | List<TQueryBenefitsVideosVO> tQueryBenefitsVideosVOS = new ArrayList<>(); |
| | | for (TQueryBenefitsVideosVO courseByCourseId : courseByCourseIds) { |
| | |
| | | @ResponseBody |
| | | public List<TQueryBenefitsVideosVO> listBenefitsVideos(@PathVariable("id")Integer bId, String name, Integer type, Integer state) { |
| | | TQueryBenefitsVideosDTO vo = new TQueryBenefitsVideosDTO(); |
| | | List<BenefitsVideos> benefitVideoById = benefitsVideoClient.getBenefitVideoById(bId); |
| | | GetBenefitVideoById getBenefitVideoById = new GetBenefitVideoById(); |
| | | getBenefitVideoById.setBenefitsVideoClassificationId(bId); |
| | | getBenefitVideoById.setState(state); |
| | | List<BenefitsVideos> benefitVideoById = benefitsVideoClient.getBenefitVideoById(getBenefitVideoById); |
| | | vo.setCoursIds(new ArrayList<>()); |
| | | for (BenefitsVideos benefitsVideos : benefitVideoById) { |
| | | // 获取课程id集合 |
| | |
| | | for (BenefitsVideos benefitsVideos : benefitVideoById) { |
| | | for (TQueryBenefitsVideosVO courseByCourseId : courseByCourseIds) { |
| | | if (benefitsVideos.getCourseId().equals(courseByCourseId.getId())){ |
| | | courseByCourseId.setId(benefitsVideos.getId()); |
| | | courseByCourseId.setIntegral(benefitsVideos.getIntegral()); |
| | | courseByCourseId.setBenefitsVideosId(benefitsVideos.getId()); |
| | | courseByCourseId.setState(benefitsVideos.getState()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | return courseByCourseIds; |
| | | } |
| | | /** |
| | |
| | | @RequestMapping("/changeCourseState") |
| | | @ResponseBody |
| | | public Object changeCourseState(@RequestBody CourseChangeStateDTO dto){ |
| | | |
| | | courseClient.changeState(dto); |
| | | mercharsClient.changeState(dto); |
| | | |
| | | ChangeBenefitsVedioState changeBenefitsVedioState = new ChangeBenefitsVedioState(); |
| | | changeBenefitsVedioState.setId(dto.getIds().get(0)); |
| | | changeBenefitsVedioState.setState(dto.getState()); |
| | | benefitsVideoClient.changeBenefitsVedioState(changeBenefitsVedioState); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | public static MultipartFile convert(BufferedImage bufferedImage, String fileName) throws IOException { |
| | | // 将 BufferedImage 转换为字节数组 |
| | | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | |
| | | |
| | | return multipartFile; |
| | | } |
| | | public static void main(String[] args) throws Exception { |
| | | // 生成红蓝sutu二维码 |
| | | HashMap<String, String> blueCode = new HashMap<>(); |
| | | blueCode.put("scan_type", "1000"); |
| | | blueCode.put("sutu_id", ""+1041); |
| | | blueCode.put("space_id", 46 + ""); |
| | | HashMap<String, String> redCode = new HashMap<>(); |
| | | redCode.put("scan_type", "1000"); |
| | | redCode.put("sutu_id", 1040+""); |
| | | redCode.put("space_id", 46 + ""); |
| | | String blueS= "{\"scan_type\": 1000, \"space_id\": "+46+", \"sutu_id\": "+1041+"}"; |
| | | String redS= "{\"scan_type\": 1000, \"space_id\": "+46+", \"sutu_id\": "+1040+"}"; |
| | | MyQrCodeUtil.createCodeToFile(blueS); |
| | | MyQrCodeUtil.createCodeToFile(redS); |
| | | BufferedImage blueImage = QRCodeUtil.createImage(blueS); |
| | | BufferedImage redImage = QRCodeUtil.createImage(redS); |
| | | MultipartFile blueFile = convert(blueImage, new Date().getTime()+UUIDUtil.getRandomCode(3)+".PNG"); |
| | | MultipartFile redFile = convert(redImage, new Date().getTime()+UUIDUtil.getRandomCode(3)+".PNG"); |
| | | String s = OssUploadUtil.ossUpload("img/", blueFile); |
| | | String s1 = OssUploadUtil.ossUpload("img/", redFile); |
| | | System.err.println("蓝色"+ s); |
| | | System.err.println("蓝色"+s1); |
| | | } |
| | | |
| | | @RequestMapping("/save") |
| | | @ResponseBody |
| | | public ResultUtil save(Integer id, String operationId, String red, String blue, String province, String city, Integer site, Integer store |
| | |
| | | game.setOperationId(0); |
| | | } |
| | | System.out.println("============"+game); |
| | | |
| | | |
| | | // 判断是新增还是修改 修改不会重新生成sutuId |
| | | if (game.getId()==null){ |
| | | if (game.getId()==null) { |
| | | HashMap<String, String> map5 = new HashMap<>(); |
| | | map5.put("space_id", store+""); |
| | | map5.put("area_id", site+""); |
| | | map5.put("space_id", store + ""); |
| | | map5.put("area_id", site + ""); |
| | | String s5 = HttpRequestUtil.getRequest("https://try.daowepark.com/v7/user_api/general/get_space_sutu", map5); |
| | | System.err.println(s5); |
| | | JSONObject jsonObject5 = new JSONObject(s5); |
| | | // 获取 data 字段的值 |
| | | JSONArray data = jsonObject5.getJSONArray("data"); |
| | | Integer temp = null; // 临时sutuid |
| | | Integer temp1 = null; // 临时sutuid |
| | | TSite si = siteService.getById(site); |
| | | if (data.length() == 0){ |
| | | if (data.length() == 0) { |
| | | // 这个场地没有添加过sutu |
| | | HashMap<String, String> map3 = new HashMap<>(); |
| | | HashMap<String, String> map4 = new HashMap<>(); |
| | |
| | | String sutuIdValue1 = dataObject1.getString("sutu_id"); |
| | | Integer sutuId = Integer.valueOf(sutuIdValue); |
| | | Integer sutuId1 = Integer.valueOf(sutuIdValue1); |
| | | game.setBlue(""+sutuId); |
| | | game.setRed(""+sutuId1); |
| | | game.setBlue("" + sutuId); |
| | | game.setRed("" + sutuId1); |
| | | // 生成红蓝sutu二维码 |
| | | HashMap<String, String> blueCode = new HashMap<>(); |
| | | blueCode.put("scan_type", "1000"); |
| | | blueCode.put("sutu_id", ""+sutuId); |
| | | blueCode.put("sutu_id", "" + sutuId); |
| | | blueCode.put("space_id", si.getId() + ""); |
| | | HashMap<String, String> redCode = new HashMap<>(); |
| | | redCode.put("scan_type", "1000"); |
| | | redCode.put("sutu_id", sutuId1+""); |
| | | redCode.put("sutu_id", sutuId1 + ""); |
| | | redCode.put("space_id", si.getId() + ""); |
| | | String blueS= "{\"scan_type\": 1000, \"space_id\": "+si.getId()+", \"sutu_id\": "+sutuId+"}"; |
| | | String redS= "{\"scan_type\": 1000, \"space_id\": "+si.getId()+", \"sutu_id\": "+sutuId1+"}"; |
| | | String blueS = "{\"scan_type\": 1000, \"space_id\": " + si.getId() + ", \"sutu_id\": " + sutuId + "}"; |
| | | String redS = "{\"scan_type\": 1000, \"space_id\": " + si.getId() + ", \"sutu_id\": " + sutuId1 + "}"; |
| | | MyQrCodeUtil.createCodeToFile(blueS); |
| | | MyQrCodeUtil.createCodeToFile(redS); |
| | | BufferedImage blueImage = QRCodeUtil.createImage(blueS); |
| | | BufferedImage redImage = QRCodeUtil.createImage(redS); |
| | | MultipartFile blueFile = convert(blueImage, new Date().getTime()+UUIDUtil.getRandomCode(3)+".PNG"); |
| | | MultipartFile redFile = convert(redImage, new Date().getTime()+UUIDUtil.getRandomCode(3)+".PNG"); |
| | | MultipartFile blueFile = convert(blueImage, new Date().getTime() + UUIDUtil.getRandomCode(3) + ".PNG"); |
| | | MultipartFile redFile = convert(redImage, new Date().getTime() + UUIDUtil.getRandomCode(3) + ".PNG"); |
| | | String s = OssUploadUtil.ossUpload("img/", blueFile); |
| | | String s1 = OssUploadUtil.ossUpload("img/", redFile); |
| | | game.setBlueCode(s); |
| | | game.setRedCode(s1); |
| | | }else{ |
| | | Integer sutuid=0; |
| | | Integer sutuid1=0; |
| | | } else { |
| | | Integer sutuid = 0; |
| | | Integer sutuid1 = 0; |
| | | JSONObject element = data.getJSONObject(0); |
| | | if (site==27){ |
| | | sutuid=1036; |
| | | sutuid1=1037; |
| | | if (site == 27) { |
| | | sutuid = 1036; |
| | | sutuid1 = 1037; |
| | | game.setBlue(sutuid.toString()); |
| | | game.setRed(sutuid1.toString()); |
| | | }else{ |
| | | } else { |
| | | sutuid = element.getInt("id"); |
| | | game.setBlue(sutuid.toString()); |
| | | JSONObject element1 = data.getJSONObject(1); |
| | |
| | | // 生成红蓝sutu二维码 |
| | | HashMap<String, String> blueCode = new HashMap<>(); |
| | | blueCode.put("scan_type", "1000"); |
| | | blueCode.put("sutu_id", ""+sutuid); |
| | | blueCode.put("sutu_id", "" + sutuid); |
| | | blueCode.put("space_id", si.getId() + ""); |
| | | HashMap<String, String> redCode = new HashMap<>(); |
| | | redCode.put("scan_type", "1000"); |
| | | redCode.put("sutu_id", sutuid1+""); |
| | | redCode.put("sutu_id", sutuid1 + ""); |
| | | redCode.put("space_id", si.getId() + ""); |
| | | String blueS= "{\"scan_type\": 1000, \"space_id\": "+si.getId()+", \"sutu_id\": "+sutuid+"}"; |
| | | String redS= "{\"scan_type\": 1000, \"space_id\": "+si.getId()+", \"sutu_id\": "+sutuid1+"}"; |
| | | String blueS = "{\"scan_type\": 1000, \"space_id\": " + si.getId() + ", \"sutu_id\": " + sutuid + "}"; |
| | | String redS = "{\"scan_type\": 1000, \"space_id\": " + si.getId() + ", \"sutu_id\": " + sutuid1 + "}"; |
| | | MyQrCodeUtil.createCodeToFile(blueS); |
| | | MyQrCodeUtil.createCodeToFile(redS); |
| | | BufferedImage blueImage = QRCodeUtil.createImage(blueS); |
| | | BufferedImage redImage = QRCodeUtil.createImage(redS); |
| | | MultipartFile blueFile = convert(blueImage, new Date().getTime()+UUIDUtil.getRandomCode(3)+".PNG"); |
| | | MultipartFile redFile = convert(redImage, new Date().getTime()+UUIDUtil.getRandomCode(3)+".PNG"); |
| | | MultipartFile blueFile = convert(blueImage, new Date().getTime() + UUIDUtil.getRandomCode(3) + ".PNG"); |
| | | MultipartFile redFile = convert(redImage, new Date().getTime() + UUIDUtil.getRandomCode(3) + ".PNG"); |
| | | String s = OssUploadUtil.ossUpload("img/", blueFile); |
| | | String s1 = OssUploadUtil.ossUpload("img/", redFile); |
| | | game.setBlueCode(s); |
| | | game.setRedCode(s1); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | Integer gameId = ballClient.save(game); |
| | | List<TGameConfig> gameConfigList = new ArrayList<>(); |
| | | //玩湃跨城赛 |
| | |
| | | gameConfigly.setIntegral(lyInt); |
| | | gameConfigly.setOtherId(gameId); |
| | | gameConfigList.add(gameConfigly); |
| | | |
| | | |
| | | //激战3V3 |
| | | TGameConfig gameConfigv3 = new TGameConfig(); |
| | | gameConfigv3.setGameId(v3Id); |
| | |
| | | // map1.put("device_id", red); |
| | | // map1.put("region_id", st.getId() + ""); |
| | | // // 添加门禁 |
| | | // String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map1); |
| | | // String s1 = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/addDevice", map1); |
| | | // map2.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); |
| | | // map2.put("space_id", si.getId() + ""); |
| | | // map2.put("device_id", blue); |
| | | // map2.put("region_id", st.getId() + ""); |
| | | // // 添加门禁 |
| | | // String s2 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map2); |
| | | // String s2 = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/addDevice", map2); |
| | | |
| | | |
| | | |
| | |
| | | return null; |
| | | } |
| | | |
| | | // public static void main(String[] args) { |
| | | // HashMap<String, String> map3 = new HashMap<>(); |
| | | // map3.put("space_id", "1001"); |
| | | // map3.put("area_id", "4352"); |
| | | // String s3 = HttpRequestUtil.getRequest("https://try.daowepark.com/v7/user_api/general/get_space_sutu", map3); |
| | | // |
| | | // System.err.println(s3); |
| | | // } |
| | | |
| | | |
| | | @RequestMapping("/pre_add") |
| | | public String add(Model model) { |
| | | |
| | |
| | | |
| | | TGameConfig ly = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 5)); |
| | | model.addAttribute("ly",ly); |
| | | |
| | | |
| | | TGameConfig v3 = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 0)); |
| | | model.addAttribute("v3",v3); |
| | | |
| | |
| | | |
| | | TGameConfig ly = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 5)); |
| | | model.addAttribute("ly",ly); |
| | | |
| | | |
| | | TGameConfig v3 = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 0)); |
| | | model.addAttribute("v3",v3); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | if (Integer.parseInt(vo.get("status").toString())==1 ){ |
| | | String dateTimeStr = vo.get("times").toString(); |
| | | String formattedDateTimeStr = dateTimeStr.substring(0, 11) + dateTimeStr.substring(17); |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | try { |
| | | Date date = sdf.parse(formattedDateTimeStr); |
| | | if (new Date().after(date)){ |
| | | vo.put("status",4); |
| | | } |
| | | |
| | | System.out.println(date); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | // if (Integer.parseInt(vo.get("status").toString())==1 ){ |
| | | // String dateTimeStr = vo.get("times").toString(); |
| | | // String formattedDateTimeStr = dateTimeStr.substring(0, 11) + dateTimeStr.substring(17); |
| | | // |
| | | // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | // try { |
| | | // Date date = sdf.parse(formattedDateTimeStr); |
| | | // if (new Date().after(date)){ |
| | | // vo.put("status",4); |
| | | // } |
| | | // |
| | | // System.out.println(date); |
| | | // } catch (ParseException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | } |
| | | return orders; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/6/17 11:12 |
| | | */ |
| | | @Data |
| | | public class GetBenefitVideoById { |
| | | private Integer benefitsVideoClassificationId; |
| | | |
| | | private Integer state; |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.activity.BenefitsVideoClient; |
| | | import com.dsh.course.feignClient.activity.model.ChangeBenefitsVedioState; |
| | | import com.dsh.course.feignClient.course.CourseClient; |
| | | import com.dsh.course.feignClient.course.model.QueryCourseList; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | |
| | | |
| | | @Resource |
| | | private CourseClient courseClient; |
| | | |
| | | @Resource |
| | | private BenefitsVideoClient benefitsVideoClient; |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public void delCourse(Integer id) { |
| | | courseClient.delCourseById(id); |
| | | benefitsVideoClient.delBenefitsVedio(id); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | private String key = "";//微信商户号 |
| | | |
| | | private String callbackPath = "http://8.137.22.229:56666/account";//支付回调网关地址 |
| | | private String callbackPath = "https://online.daowepark.com:443/account";//支付回调网关地址 |
| | | |
| | | private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径 |
| | | |
| | |
| | | |
| | | # \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0479\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD |
| | | feign.compression.request.mime-types=text/xml,application/xml,application/json |
| | | feign.compression.request.min-request-size=2048 |
| | | feign.compression.request.min-request-size=102400 |
| | | feign.compression.request.enabled=true |
| | | feign.compression.response.enabled=true |
| | | |
| | |
| | | "value": "14", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | }, |
| | | { |
| | | "name": "jieshao", |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | | "label": "文件上传", |
| | |
| | | "value": "16", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | }, |
| | | { |
| | | "name": "jieshao", |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | | "label": "文件上传", |
| | |
| | | "value": "13", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | }, |
| | | { |
| | | "name": "jieshao", |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | | "label": "文件上传", |
| | |
| | | "value": "15", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | }, |
| | | { |
| | | "name": "jieshao", |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | | "label": "文件上传", |
| | |
| | | "value": "1", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | }, |
| | | { |
| | | "name": "jieshao", |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | | "label": "文件上传", |
| | |
| | | "value": "7", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | }, |
| | | { |
| | | "name": "jieshao", |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | | "label": "文件上传", |
| | |
| | | "value": "8", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | }, |
| | | { |
| | | "name": "jieshao", |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | | "label": "文件上传", |
| | |
| | | "value": "10", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | }, |
| | | { |
| | | "name": "jieshao", |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | | "label": "文件上传", |
| | |
| | | "value": "11", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | }, |
| | | { |
| | | "name": "jieshao", |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | | "label": "文件上传", |
| | |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "type": "input-rich-text", |
| | | "receiver": { |
| | | "url": "/mgr/uploadImgAmis", |
| | | "method": "post" |
| | | }, |
| | | "label": "文字介绍", |
| | | "name": "jieshao", |
| | | "id": "u:aa105bcfd51b", |
| | | "minRows": 10, |
| | | "maxRows": 20, |
| | | "required": true |
| | | "type": "textarea", |
| | | "label": "文字介绍" |
| | | }, |
| | | { |
| | | "type": "input-file", |
| | |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | <#button name="上架" icon="fa-plus" clickFun="TCompetition.updateState(1)"/> |
| | | <#button name="下架" icon="fa-edit" clickFun="TCompetition.updateState(2)" space="true"/> |
| | | <#button name="查看详情" icon="fa-remove" clickFun="TCompetition.info()" space="true"/> |
| | | </div> |
| | | <div class="ibox-title"> |
| | | <h5 id = "amount"></h5> |
| | |
| | | <div class="ibox-title"> |
| | | <h5>储值管理</h5> |
| | | </div> |
| | | <input type="hidden" id="content" value='${content}'> |
| | | <input type="hidden" id="time" value="${time}"> |
| | | <input type="hidden" id="content" value='${content}'> |
| | | <input type="hidden" id="time" value="${time}"> |
| | | <div class="ibox-title"> |
| | | <div style="display: flex"> |
| | | <label for="editor_1">*常规储值:</label> |
| | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属账号:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="account" name="account"> |
| | | <select style="width: 300px;display: inline" class="form-control" id="account" name="account"> |
| | | <option value="" style="color: #676A6C" disabled selected>请选择所属账号</option> |
| | | </select> |
| | | |
| | | <input type="checkbox" id="platform_account" value="0">平台 |
| | | </div> |
| | | </div> |
| | | @} |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属账号:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="account" name="account"> |
| | | @for(obj in cityManagers){ |
| | | <select style="width: 300px;display: inline" class="form-control" id="account" name="account" ${data.cityManagerId == 0 ? 'disabled' : ''}> |
| | | <option value="" style="color: #b6b6b6" disabled selected>请选择所属账号</option> |
| | | @for(obj in cityManagers){ |
| | | <option value="${obj.id}" ${obj.id == data.cityManagerId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | |
| | | <input type="checkbox" id="platform_account" value="0" ${data.cityManagerId == 0 ? 'checked' : ''}>平台 |
| | | </div> |
| | | </div> |
| | | @} |
| | |
| | | <div class="form-group" id="siteType"> |
| | | <label class="col-sm-3 control-label">*教练类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="coachTypeId" name = "typeId"> |
| | | <select style="width: 300px" class="form-control" id="coachTypeId" name = "typeId" > |
| | | <option value="" style="color: #b6b6b6" disabled selected>请选择教练类型</option> |
| | | @for(obj in coachType){ |
| | | <option value="${obj.id}" ${obj.id == data.coachTypeId ? 'selected=selected' : ''}>${obj.name}</option> |
| | |
| | | @} |
| | | <#button name="免费福利" icon="fa-remove" clickFun="TCompetition.gift()" space="true"/> |
| | | <#button name="首页设置" icon="fa-remove" clickFun="TCompetition.indexSet()" space="true"/> |
| | | <#button name="SUTU设置" icon="fa-plus" clickFun="TCompetition.addDevice()" space="true"/> |
| | | |
| | | @if(role == '1'){ |
| | | @if(shiro.hasPermission("/tHomeModule/tHomeModule_platformSet")){ |
| | | <#button name="图文模块设置" icon="fa-edit" clickFun="TCompetition.platformSet()" space="true"/> |
| | |
| | | return {1:"是",0:"否"}[data] |
| | | } |
| | | }, |
| | | {title: '注册时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"正常",2:"冻结",3:"已注销"}[data] |
| | |
| | | visible: true, |
| | | align: 'center', |
| | | valign: 'middle', |
| | | formatter: function(value, row) { |
| | | formatter: function(value, row) {//0=待支付,1=待核销,2=已到店,3=已完成,4=已过期,5=已取消 |
| | | switch (value) { |
| | | case 0: |
| | | return '待支付'; |
| | |
| | | TQuestion.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'benefitsVideosId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: 'benefitsVideosId', field: 'benefitsVideosId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '视频类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.ids.push(obj.benefitsVideosId); |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 1; |
| | | $.ajax({ |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.ids.push(obj.benefitsVideosId); |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 2; |
| | | $.ajax({ |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 3; |
| | |
| | | TQuestion.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: 'id', field: 'benefitsVideosId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '视频类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"课后练习",2:"运动教学视频",3:"器材教学视频"}[data] |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 1; |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 2; |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 3; |
| | |
| | | TQuestion.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: 'id', field: 'benefitsVideosId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '视频类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"课后练习",2:"运动教学视频",3:"器材教学视频"}[data] |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 1; |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 2; |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 3; |
| | |
| | | TQuestion.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'benefitsVideosId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '视频类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"课后练习",2:"运动教学视频",3:"器材教学视频"}[data] |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 1; |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 2; |
| | |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | var id = obj.benefitsVideosId; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 3; |
| | |
| | | data.graduateSchool = $('#graduateSchool').val() |
| | | data.diploma = $('#img').val() |
| | | data.certificate = $('#certificate').val() |
| | | |
| | | if($('#platform_account').is(':checked')){ |
| | | data.cityManagerId = $("#platform_account").val() |
| | | } |
| | | |
| | | var temp = "" |
| | | |
| | | for (let i = 0; i < TSite.goodsPicArray.length; i++) { |
| | |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if($("#account").val()=='' ){ |
| | | if(data.cityManagerId=='' ){ |
| | | Feng.info("请选择账号") |
| | | return; |
| | | } |
| | |
| | | data.graduateSchool = $('#graduateSchool').val() |
| | | data.diploma = $('#img').val() |
| | | data.certificate = $('#certificate').val() |
| | | if($('#platform_account').is(':checked')){ |
| | | data.cityManagerId = $("#platform_account").val() |
| | | } |
| | | var goodImgs = this.goodsPicArray; |
| | | if(goodImgs.length==0){ |
| | | Feng.info("请上传实景图") |
| | |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if($("#account").val()=='' ){ |
| | | if(data.cityManagerId=='' ){ |
| | | Feng.info("请选择账号") |
| | | return; |
| | | } |
| | |
| | | var carPhoto = new $WebUpload("img"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | |
| | | |
| | | $('#platform_account').on('click', function (){ |
| | | if($('#platform_account').is(':checked')){ |
| | | $('#account').val(""); |
| | | $('#account').attr("disabled", 'disabled'); |
| | | }else{ |
| | | $('#account').removeAttr("disabled"); |
| | | } |
| | | }); |
| | | }); |
| | |
| | | var sm =data.appointmentStartTime.split(':')[1]; |
| | | var eh =data.appointmentEndTime.split(':')[0]; |
| | | var em =data.appointmentEndTime.split(':')[1]; |
| | | if($('#platform_account').is(':checked')){ |
| | | data.cityManagerId = $("#platform_account").val() |
| | | } |
| | | |
| | | if($("#pCode").val()==''){ |
| | | Feng.info("请选择省") |
| | |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if($("#account").val()=='' ){ |
| | | if(data.cityManagerId=='' ){ |
| | | Feng.info("请选择账号") |
| | | return; |
| | | } |
| | |
| | | carPhoto1.setUploadBarId("progressBar"); |
| | | carPhoto1.init(); |
| | | TSiteInfo.getTime() |
| | | |
| | | |
| | | |
| | | $('#platform_account').on('click', function (){ |
| | | if($('#platform_account').is(':checked')){ |
| | | $('#account').val(""); |
| | | $('#account').attr("disabled", 'disabled'); |
| | | }else{ |
| | | $('#account').removeAttr("disabled"); |
| | | } |
| | | }); |
| | | }); |
| | |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '购买时间', field: 'payTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '使用状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "未使用", 2: "已核销"}[value] |
| | |
| | | }; |
| | | |
| | | TCompetition.saveAllImg = function (e) { |
| | | var id = $("#id").val() |
| | | var id1 = $("#id").val() |
| | | var px1 = $("#px1").val() |
| | | var px2 = $("#px2").val() |
| | | var px3 = $("#px3").val() |
| | |
| | | Feng.error("保存失败!" + data.responseJSON.message + "!"); |
| | | |
| | | }); |
| | | ajax.set("id",id); |
| | | ajax.set("id",id1); |
| | | ajax.set("px1",px1); |
| | | ajax.set("px2",px2); |
| | | ajax.set("px3",px3); |
| | |
| | | $('.cash').hide(); |
| | | } |
| | | if(v == 2){ |
| | | $('.classHour').hide(); |
| | | $('.paiCoin').hide(); |
| | | } |
| | | if(v == 3){ |
| | | $('.paiCoin').hide(); |
| | | $('.classHour').hide(); |
| | | } |
| | | } |
| | | |
| | |
| | | map.put("space_id", spaceId + ""); |
| | | map.put("sutu_id", sutuId + ""); |
| | | |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/gameStart", map); |
| | | String s = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/gameStart", map); |
| | | JSONObject jsonObject = JSONObject.parseObject(s); |
| | | Object code = jsonObject.get("code"); |
| | | if (String.valueOf(code) != null && "200".equals(String.valueOf(code))) { |
| | |
| | | map.put("api_url", "http://221.182.45.100:56666/communityWorldCup/base/worldCup/endWorldCupCallback"); |
| | | map.put("custom", "{\"gameType\": 2}"); |
| | | |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/quickStart", map); |
| | | String s = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/quickStart", map); |
| | | JSONObject jsonObject = JSONObject.parseObject(s); |
| | | Integer code1 = jsonObject.getInteger("code"); |
| | | String message = jsonObject.getString("message"); |
| | |
| | | map.put("space_id", spaceId + ""); |
| | | map.put("sutu_id", sutuId + ""); |
| | | |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/gameStart", map); |
| | | String s = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/gameStart", map); |
| | | JSONObject jsonObject = JSONObject.parseObject(s); |
| | | Object code = jsonObject.get("code"); |
| | | if (String.valueOf(code) != null && "200".equals(String.valueOf(code))) { |
| | |
| | | } |
| | | |
| | | public List<Integer> getIds(Integer siteId) { |
| | | HttpRequest httpRequest = HttpRequest.get("https://try.daowepark.com/v7/user_api/general/get_space_area?space_id=" + siteId); |
| | | HttpRequest httpRequest = HttpRequest.get("https://port.daowepark.com/v7/user_api/general/get_space_area?space_id=" + siteId); |
| | | HttpResponse execute = httpRequest.execute(); |
| | | String body = execute.body(); |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | |
| | | }) |
| | | public ResultUtil getSpaceId(String name) { |
| | | try { |
| | | HttpRequest httpRequest = HttpRequest.get("https://try.daowepark.com/v7/user_api/general/space_list?page=1&page_num=100"); |
| | | HttpRequest httpRequest = HttpRequest.get("https://port.daowepark.com/v7/user_api/general/space_list?page=1&page_num=100"); |
| | | HttpResponse execute = httpRequest.execute(); |
| | | String body = execute.body(); |
| | | return ResultUtil.success(); |
| | |
| | | |
| | | private String key = "6f5e0c2dcabfa9c27b5da5836a362fef";//微信商户号 |
| | | |
| | | private String callbackPath = "http://8.137.22.229:56666/other";//支付回调网关地址 |
| | | private String callbackPath = "https://online.daowepark.com:443/other";//支付回调网关地址 |
| | | |
| | | private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径 |
| | | |
| | |
| | | select tb.id as id,tb.img as img, tb.page as page,tb.name as name,tb.type as type, |
| | | tb.turnId as turnId , tb.model as model, tb.typeId |
| | | from t_banner tb |
| | | where tb.position = #{position} and tb.state =1 |
| | | where tb.position = #{position} and tb.state =1 order by tb.sort desc |
| | | </select> |
| | | |
| | | </mapper> |