cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java
@@ -179,7 +179,6 @@ return appUser; } // todo 短信验证码 @ResponseBody @PostMapping("/base/appUser/getSMSCode") @ApiOperation(value = "获取短信验证码", tags = {"APP-登录注册"}) cloud-server-management/src/main/java/com/dsh/course/feignClient/other/BallClient.java
@@ -4,6 +4,7 @@ import com.dsh.course.dto.TStudentDto; import com.dsh.course.feignClient.other.model.Banner; import com.dsh.course.feignClient.other.model.GameDataQuery; import com.dsh.course.feignClient.other.model.Site; import com.dsh.course.feignClient.other.model.TGameRecord; import com.dsh.guns.modular.system.model.*; import com.dsh.guns.modular.system.model.dto.BallQueryDto; @@ -33,6 +34,13 @@ void saveConfig(@RequestBody List<TGameConfig> gameConfigList); @PostMapping("/queryGame") Game queryGame(@RequestParam("id") Integer id); // 查询未配置智慧球场的场地 智慧球场添加使用 @PostMapping("/getSiteList") List<Site> getSiteList(@RequestParam("storeId") Integer storeId); // 查询未配置智慧球场的场地 包含当前配置的场地 智慧球场编辑使用 @PostMapping("/getSiteList1") List<Site> getSiteList1(@RequestParam("id") Integer id); @PostMapping("/listorder") List<Map<String, Object>> listorder(@RequestBody BookingQuery bookingQuery); } cloud-server-management/src/main/java/com/dsh/course/mapper/GameMapper.java
New file @@ -0,0 +1,10 @@ package com.dsh.course.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.dsh.guns.modular.system.model.Bank; import com.dsh.guns.modular.system.model.Game; import org.apache.ibatis.annotations.Mapper; @Mapper public interface GameMapper extends BaseMapper<Game> { } cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java
@@ -487,7 +487,6 @@ " \"mobile\":\""+phone+"\"," + " }" + " ],"; // todo 拼接 String biz_cards=" \"biz_cards\":[" + " {" + " \"account_holder_name\":\""+accountName+"\"," + cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCoursePackageController.java
@@ -13,6 +13,7 @@ import com.dsh.course.feignClient.account.model.CoachSerchVO; import com.dsh.course.feignClient.course.*; import com.dsh.course.feignClient.course.model.*; import com.dsh.course.feignClient.other.BallClient; import com.dsh.course.feignClient.other.model.Site; import com.dsh.guns.config.UserExt; import com.dsh.guns.core.base.controller.BaseController; @@ -886,6 +887,37 @@ return list; } /** * 根据门店id获取场地(智慧球场添加使用 过滤掉已经添加过的场地) * @param storeId * @return */ @Autowired private BallClient ballClient; @ResponseBody @PostMapping("/querySite3/{id}") public List<Site> querySite3(@PathVariable("id") Integer storeId){ return ballClient.getSiteList(storeId); } @ResponseBody @PostMapping("/querySite3/") public Object querySite3(){ return new ResultUtil(0,0,null,null,null); } /** * 根据门店id获取场地(智慧球场编辑使用 过滤掉已经添加过的场地 包含当前的场地) * @param storeId * @return */ @ResponseBody @PostMapping("/querySite5/{id}") public List<Site> querySite5(@PathVariable("id") Integer storeId){ return ballClient.getSiteList1(storeId); } /** * 根据门店id获取场地 * @param storeId * @return cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java
@@ -106,7 +106,6 @@ @Autowired private AppUserClient appUserClient; @RequestMapping("/tolist") public String tolist(Model model) { List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); @@ -190,7 +189,6 @@ SiteBooking byId = iSiteBookingService.getById(id); String money = byId.getMoney(); // todo 这里手动支付 默认按照现金当作支付金额 后续可能要问下产品 String[] split = money.split(","); Double aDouble = Double.valueOf(split[0]); System.out.println("============"+id); @@ -325,58 +323,116 @@ } System.out.println("============"+game); // 添加sutu编号 HashMap<String, String> map3 = new HashMap<>(); HashMap<String, String> map4 = new HashMap<>(); // 添加sutu编号 // 调用两次 创建sutu TSite si = siteService.getById(site); TStore st = storeService.getById(store); map3.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); map4.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); map3.put("space_id", si.getId() + ""); map4.put("space_id", si.getId() + ""); map3.put("name", blue); map4.put("name", red); map3.put("city_code", city); map4.put("city_code", city); String s3 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceSutu", map3); String s4 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceSutu", map4); System.out.println("---------------------------"+s3); JSONObject jsonObject = new JSONObject(s3); JSONObject jsonObject1 = new JSONObject(s4); // 获取 data 字段的值 JSONObject dataObject = jsonObject.getJSONObject("data"); JSONObject dataObject1 = jsonObject1.getJSONObject("data"); // 获取 sutu_id 字段的值 String sutuIdValue = dataObject.getString("sutu_id"); String sutuIdValue1 = dataObject1.getString("sutu_id"); Integer sutuId = Integer.valueOf(sutuIdValue); Integer sutuId1 = Integer.valueOf(sutuIdValue1); game.setBlue(""+sutuId); game.setRed(""+sutuId1); // 判断一下新增还是修改 // 如果是修改的话判断 有没有修改场地id 有的话需要重新生成二维码 和sutuid if(id!=null){ Game game1 = ballClient.queryGame(id); // 如果场地id不相同那么要重新生成sutu二维码 if (!game1.getSiteId().equals(site)){ // 添加sutu编号 HashMap<String, String> map3 = new HashMap<>(); HashMap<String, String> map4 = new HashMap<>(); // 添加sutu编号 // 调用两次 创建sutu TSite si = siteService.getById(site); map3.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); map4.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); map3.put("space_id", si.getId() + ""); map4.put("space_id", si.getId() + ""); map3.put("name", blue); map4.put("name", red); map3.put("city_code", city); map4.put("city_code", city); String s3 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceSutu", map3); String s4 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceSutu", map4); JSONObject jsonObject = new JSONObject(s3); JSONObject jsonObject1 = new JSONObject(s4); // 获取 data 字段的值 JSONObject dataObject = jsonObject.getJSONObject("data"); JSONObject dataObject1 = jsonObject1.getJSONObject("data"); // 获取 sutu_id 字段的值 String sutuIdValue = dataObject.getString("sutu_id"); String sutuIdValue1 = dataObject1.getString("sutu_id"); Integer sutuId = Integer.valueOf(sutuIdValue); Integer sutuId1 = Integer.valueOf(sutuIdValue1); 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("space_id", si.getId() + ""); HashMap<String, String> redCode = new HashMap<>(); redCode.put("scan_type", "1000"); 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+"}"; 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); game.setBlueCode(s); game.setRedCode(s1); // 生成红蓝sutu二维码 HashMap<String, String> blueCode = new HashMap<>(); blueCode.put("scan_type", "1000"); 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("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+"}"; 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); game.setBlueCode(s); game.setRedCode(s1); } }else{ // 添加sutu编号 HashMap<String, String> map3 = new HashMap<>(); HashMap<String, String> map4 = new HashMap<>(); // 添加sutu编号 // 调用两次 创建sutu TSite si = siteService.getById(site); map3.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); map4.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); map3.put("space_id", si.getId() + ""); map4.put("space_id", si.getId() + ""); map3.put("name", blue); map4.put("name", red); map3.put("city_code", city); map4.put("city_code", city); String s3 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceSutu", map3); String s4 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceSutu", map4); System.out.println("---------------------------"+s3); JSONObject jsonObject = new JSONObject(s3); JSONObject jsonObject1 = new JSONObject(s4); // 获取 data 字段的值 JSONObject dataObject = jsonObject.getJSONObject("data"); JSONObject dataObject1 = jsonObject1.getJSONObject("data"); // 获取 sutu_id 字段的值 String sutuIdValue = dataObject.getString("sutu_id"); String sutuIdValue1 = dataObject1.getString("sutu_id"); Integer sutuId = Integer.valueOf(sutuIdValue); Integer sutuId1 = Integer.valueOf(sutuIdValue1); 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("space_id", si.getId() + ""); HashMap<String, String> redCode = new HashMap<>(); redCode.put("scan_type", "1000"); 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+"}"; 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); game.setBlueCode(s); game.setRedCode(s1); } Integer gameId = ballClient.save(game); List<TGameConfig> gameConfigList = new ArrayList<>(); //玩湃跨城赛 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/LoginController.java
@@ -124,7 +124,6 @@ // // todo 短信验证码 // @ResponseBody // @PostMapping("/getSMSCode") // public String getSMSCode( String phone) { cloud-server-management/src/main/resources/mapper/GameMapper.xml
New file @@ -0,0 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.dsh.course.mapper.GameMapper"> </mapper> cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/ball_pre_add.html
@@ -236,7 +236,7 @@ "leftFixed": "lg" }, "source": { "url": "/coursePackage/querySite/$store", "url": "/coursePackage/querySite3/$store", "method": "post", "messages": {}, "dataType": "form", cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/ball_pre_add1.html
@@ -161,7 +161,7 @@ "leftFixed": "lg" }, "source": { "url": "/coursePackage/querySite/$store", "url": "/coursePackage/querySite3/$store", "method": "post", "messages": { }, cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/ball_pre_add2.html
@@ -213,7 +213,7 @@ "leftFixed": "lg" }, "source": { "url": "/coursePackage/querySite/$store", "url": "/coursePackage/querySite3/$store", "method": "post", "messages": { }, cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/ball_pre_edit.html
@@ -233,7 +233,7 @@ "leftFixed": "lg" }, "source": { "url": "/coursePackage/querySite/$store", "url": "/coursePackage/querySite5/$id", "method": "post", "messages": { }, cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/ball_pre_edit1.html
@@ -240,7 +240,7 @@ "leftFixed": "lg" }, "source": { "url": "/coursePackage/querySite/$store", "url": "/coursePackage/querySite5/$id", "method": "post", "messages": { }, cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/ball_pre_edit2.html
@@ -213,7 +213,7 @@ "leftFixed": "lg" }, "source": { "url": "/coursePackage/querySite/$store", "url": "/coursePackage/querySite5/$id", "method": "post", "messages": { }, cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop.html
@@ -71,7 +71,9 @@ <#button name="首页设置" icon="fa-remove" clickFun="TCompetition.indexSet()" space="true"/> <#button name="SUTU设置" icon="fa-plus" clickFun="TCompetition.addDevice()" space="true"/> @if(role == '1'){ <#button name="平台首页设置" icon="fa-edit" clickFun="TCompetition.platformSet()" space="true"/> @if(shiro.hasPermission("/tHomeModule/tHomeModule_platformSet")){ <#button name="平台首页设置" icon="fa-edit" clickFun="TCompetition.platformSet()" space="true"/> @} @} </div> <#table id="TCompetitionTable"/> cloud-server-management/src/main/webapp/WEB-INF/view/system/tStudent/tOrderCrossCity_add.html
@@ -189,7 +189,6 @@ // console.log(result.regeocode.formattedAddress); var address = result.regeocode.formattedAddress; str.push('详细地址:' + address); // todo 不弹出信息框 // alert(str.join(' | ')); } else { // alert(str.join(' | ')); //获取地址失败 cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java
@@ -1,5 +1,6 @@ package com.dsh.other.controller; import com.alibaba.nacos.api.config.filter.IFilterConfig; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.dsh.other.entity.*; import com.dsh.other.feignclient.model.AdvertisementChangeStateDTO; @@ -12,10 +13,12 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import io.swagger.models.auth.In; import org.omg.CORBA.PUBLIC_MEMBER; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.print.DocFlavor; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -33,6 +36,8 @@ private GameService gameService; @Autowired private TGameRecordService gameRecordService; @Autowired private ISiteService siteService; // 数据统计 @ResponseBody @@ -132,7 +137,36 @@ return gameService.getById(id); // return game.getId(); } @ResponseBody @PostMapping("/getSiteList") // 查询未配置智慧球场的场地 智慧球场添加使用 public List<Site> getSiteList(@RequestParam("storeId") Integer storeId){ List<Integer> collect = gameService.list().stream().map(Game::getSiteId).collect(Collectors.toList()); if (collect.size() == 0 ){ collect.add(-1); } List<Site> list = siteService.list(new QueryWrapper<Site>().select("id","name") .eq("storeId", storeId) .eq("state", 1) .notIn("id",collect) ); return list; } // 查询未配置智慧球场的场地 包含当前配置的场地 智慧球场编辑使用 @ResponseBody @PostMapping("/getSiteList1") public List<Site> getSiteList1(@RequestParam Integer id) { Game game = gameService.getById(id); List<Integer> collect = gameService.list().stream().map(Game::getSiteId).collect(Collectors.toList()); Site byId = siteService.getById(game.getSiteId()); List<Site> list = siteService.list(new QueryWrapper<Site>().select("id","name") .eq("state", 1) .eq("storeId",game.getStoreId()) .notIn("id",collect) ); list.add(byId); return list; } @ResponseBody @PostMapping("/listorder") public List<Map<String, Object>> listorder(@RequestBody BookingQuery bookingQuery) {