| | |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.dto.SelectDto; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到优惠卷选择表页 |
| | | * 跳转到优惠券选择表页 |
| | | * @param model |
| | | * @param id |
| | | * @return |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/queryProvince") |
| | | @ResponseBody |
| | | public List<Map<String, Object>> queryProvince(){ |
| | | |
| | | List<Map<String, Object>> list = storeService.queryProvince(null); |
| | | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到审核详情页 |
| | | * @param model |
| | |
| | | public String showExamineCoursePackageDetails(Model model, Integer id){ |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | System.out.println("============"+ tCoursePackage.getAuditStatus()); |
| | | model.addAttribute("auditStatus", tCoursePackage.getAuditStatus()); |
| | | |
| | | model.addAttribute("authRemark", tCoursePackage.getAuthRemark()); |
| | | |
| | | model.addAttribute("classTime", tCoursePackage.getClassStartTime() + ":00 - " + tCoursePackage.getClassEndTime() + ":00"); |
| | | String[] split = tCoursePackage.getClassWeeks().split(";"); |
| | | List<String> list5 = Arrays.asList("周一", "周二", "周三", "周四", "周五", "周六", "周日"); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/queryCity") |
| | | public List<Map<String, Object>> queryCity(String code){ |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | String cityCode = null; |
| | |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | cityCode = cityManager.getCityCode(); |
| | | } |
| | | System.out.println("======="+storeService.queryCity(code, cityCode)); |
| | | return storeService.queryCity(code, cityCode); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryCity1/{code}") |
| | | public ResultUtil queryCity1(@PathVariable("code") String code){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | String cityCode = null; |
| | | if(objectType == 2){//城市管理员 |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | cityCode = cityManager.getCityCode(); |
| | | } |
| | | System.out.println("======="+storeService.queryCity(code, cityCode)); |
| | | // return storeService.queryCity(code, cityCode); |
| | | return new ResultUtil(0,null,null,storeService.queryCity(code, cityCode),null); |
| | | } |
| | | |
| | | |
| | |
| | | @PostMapping("/queryStore") |
| | | public List<TStore> queryStore(String cityCode){ |
| | | List<TStore> list = storeService.list(new QueryWrapper<TStore>().eq("cityCode", cityCode).eq("state", 1)); |
| | | System.out.println("====list="+list); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryStore1/{cityCode}") |
| | | public ResultUtil queryStore1(@PathVariable("cityCode") String cityCode){ |
| | | List<TStore> list = storeService.list(new QueryWrapper<TStore>().select("id","name").eq("cityCode", cityCode).eq("state", 1)); |
| | | // Map<String,Integer> map = new LinkedHashMap<>(); |
| | | List<SelectDto> selectDtos = new ArrayList<>(); |
| | | Map<String,Integer> map = new HashMap<>(); |
| | | // for (TStore store : list) { |
| | | // SelectDto selectDto = new SelectDto(); |
| | | // selectDto.setId(Long.valueOf(store.getId())); |
| | | // selectDto.setValue(store.getName()); |
| | | // selectDtos.add(selectDto); |
| | | // |
| | | // } |
| | | // map.put("options",selectDtos); |
| | | |
| | | return new ResultUtil(0,0,null,list,null); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ResponseBody |
| | | @PostMapping("/querySite") |
| | | public List<TSite> querySite(Integer storeId){ |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>().eq("storeId", storeId).eq("state", 1)); |
| | | System.out.println("==storeId==="+storeId); |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>().select("id","name").eq("storeId", storeId).eq("state", 1)); |
| | | return list; |
| | | } |
| | | |
| | |
| | | coursePackage.setStatus(1); |
| | | coursePackage.setState(1); |
| | | coursePackage.setInsertTime(new Date()); |
| | | // 详情多图片 |
| | | String substring = coursePackage.getDetailDrawing().substring(0, coursePackage.getDetailDrawing().length() - 1); |
| | | coursePackage.setDetailDrawing(substring); |
| | | coursePackageService.addCoursePackage(coursePackage, coursePackagePaymentConfig); |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | |
| | | String jsonString = jsonArray.getString(i); |
| | | String[] split = jsonString.split("-"); |
| | | System.out.println("============"+split); |
| | | if (split.length>1){ |
| | | first.add(split[0]); |
| | | second.add(split[1]); |
| | | second.add(split[1]);} |
| | | |
| | | } |
| | | String firstString = String.join(",",first); |