From 6593a67fdfb688c70365b419c0e9658c690524b5 Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期一, 16 十月 2023 09:50:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java | 70 +++++++++++++++++++++++++++++++---
1 files changed, 63 insertions(+), 7 deletions(-)
diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
index 8b391ea..380617c 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
@@ -5,9 +5,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.dsh.other.entity.Site;
-import com.dsh.other.entity.SiteBooking;
-import com.dsh.other.entity.SiteType;
+import com.dsh.other.entity.*;
import com.dsh.other.feignclient.account.CityManagerClient;
import com.dsh.other.feignclient.activity.UserCouponClient;
import com.dsh.other.feignclient.activity.model.QueryUserCouponByIdAndUserId;
@@ -19,9 +17,7 @@
import com.dsh.other.model.dto.siteDto.TSiteDTO;
import com.dsh.other.model.vo.siteVo.ExpireSiteSearchVO;
import com.dsh.other.model.vo.siteVo.SiteSearchVO;
-import com.dsh.other.service.ISiteBookingService;
-import com.dsh.other.service.ISiteService;
-import com.dsh.other.service.ISiteTypeService;
+import com.dsh.other.service.*;
import com.dsh.other.util.PayMoneyUtil;
import com.dsh.other.util.ResultUtil;
import com.dsh.other.util.TokenUtil;
@@ -66,7 +62,14 @@
@Autowired
private CityManagerClient cityManagerClient;
-
+ /**
+ * 获取所有场地
+ */
+ @RequestMapping("/base/site/getList")
+ @ResponseBody
+ public List<Site> getList(){
+ return siteService.list(new QueryWrapper<Site>().ne("state",3));
+ }
/**
* 获取场地预约记录
*/
@@ -115,6 +118,33 @@
}
}
+
+ /**
+ * 添加场地管理
+ * @return
+ */
+ @RequestMapping("/base/site/addSiteBooking")
+ public Object addSiteBooking(@RequestBody SiteBooking siteBooking){
+ if(siteBooking.getId()!= null ){
+
+ return siteBookingService.updateById(siteBooking);
+ }else {
+ return siteBookingService.save(siteBooking);
+ }
+ }
+
+ @RequestMapping("/base/site/listById")
+ public Site listById(@RequestParam("id") Integer id){
+ Site byId = siteService.getById(id);
+ return byId;
+ }
+
+
+ @RequestMapping("/base/site/listBooks")
+ public List<SiteBooking> listBooks(@RequestParam("id") Integer id){
+ List<SiteBooking> siteId = siteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", id));
+ return siteId;
+ }
@ResponseBody
@PostMapping("/base/site/querySiteType")
@ApiOperation(value = "获取场地类型", tags = {"用户—预约场地"})
@@ -486,6 +516,32 @@
@ResponseBody
+ @PostMapping("/base/site/queryByCode")
+ public Integer queryByCode(@RequestBody String code){
+
+ return siteBookingService.queryByCode(code);
+ }
+
+
+ @Autowired
+ private StoreService service;
+
+ @Autowired
+ private IOperatorUserService operatorUserService;
+
+ @ResponseBody
+ @PostMapping("/base/site/queryOperator")
+ public OperatorUser queryOperator(@RequestBody List<Integer> stores){
+
+ Store one = service.getOne(new QueryWrapper<Store>().in("id", stores));
+ OperatorUser o = operatorUserService.getById(one.getOperatorId());
+
+ return o;
+ }
+
+
+
+ @ResponseBody
@PostMapping("/base/site/getNewAddSiteList")
public List<SiteVo> getAppUserSiteList(){
List<SiteVo> siteVos = new ArrayList<>();
--
Gitblit v1.7.1