From b2573583e7c70827fa90111ff1d769f79603edd0 Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期五, 27 十月 2023 14:57:05 +0800
Subject: [PATCH] 10.27.2

---
 cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 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 46a38e2..19817df 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
@@ -4,6 +4,7 @@
 import cn.hutool.http.HttpResponse;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.dsh.other.entity.*;
 import com.dsh.other.feignclient.account.CityManagerClient;
@@ -34,7 +35,9 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @author zhibing.pu
@@ -402,7 +405,28 @@
 
             List<Integer> ids = getIds(byId.getSiteId());
             byId.setStorePhone(byId1.getPhone());
+            
+            //拼接开始结束时间
+            Date startTime = byId.getStartTime();
+            Date endTime = byId.getEndTime();
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+
+            String startTimeString = sdf.format(startTime);
+            String endTimeString = sdf.format(endTime);
+
+            String result = startTimeString + "-" + endTimeString.substring(11);
+            byId.setTimes(result);
+
+
+
+
+            byId.setSid(Arrays.asList(storeId));
+            List<Site> list = siteService.list(new LambdaQueryWrapper<Site>().eq(Site::getStoreId, storeId).eq(Site::getSign, 1));
+            List<Integer> collect = list.stream().map(Site::getId).collect(Collectors.toList());
+            byId.setRid(collect);
             map.put("data",byId);
+
+
             map.put("ids",ids);
             return ResultUtil.success(map);
         }catch (Exception e){

--
Gitblit v1.7.1