| | |
| | | import com.dsh.other.model.BannerVo; |
| | | import com.dsh.other.service.GameService; |
| | | import com.dsh.other.service.IBannerService; |
| | | import com.dsh.other.service.IRegionService; |
| | | import com.dsh.other.service.TGameConfigService; |
| | | import com.dsh.other.util.ResultUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | return games; |
| | | } |
| | | |
| | | @Autowired |
| | | private IRegionService regionService; |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/save") |
| | | public Integer save(@RequestBody Game game){ |
| | | |
| | | Region city = regionService.getOne(new QueryWrapper<Region>().eq("code", game.getCityCode())); |
| | | game.setCity(city.getName()); |
| | | |
| | | |
| | | Region province = regionService.getOne(new QueryWrapper<Region>().eq("code", game.getProvinceCode())); |
| | | game.setProvince(province.getName()); |
| | | |
| | | |
| | | |
| | | |
| | | gameService.save(game); |
| | | System.out.println("==========="+game); |
| | | return game.getId(); |
| | | } |
| | | @Autowired |
| | | private TGameConfigService config; |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/saveConfig") |
| | | public void saveConfig(@RequestBody List<TGameConfig> gameConfigList){ |
| | | System.out.println("=======gameConfigList===="+gameConfigList); |
| | | config.saveBatch(gameConfigList); |
| | | // return game.getId(); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryGame") |
| | | public Game queryGame(@RequestParam Integer id){ |
| | | return gameService.getById(id); |
| | | // return game.getId(); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/listorder") |
| | | public List<Map<String, Object>> listorder(@RequestBody BookingQuery bookingQuery){ |
| | | System.out.println("===bookingQuery===="+bookingQuery); |
| | | return gameService.orderlist(bookingQuery); |
| | | // return game.getId(); |
| | | } |
| | | |
| | | |
| | | |
| | | |