From 8f8607fba2d5796e61251ae5d3dbc7af125f0046 Mon Sep 17 00:00:00 2001 From: Burce Date: Fri, 25 Oct 2019 19:09:14 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=8B=9B=E5=95=86]=E6=9F=A5=E8=AF=A2=E5=95=86?= =?UTF-8?q?=E9=93=BA=E5=8F=AF=E5=87=BA=E7=A7=9F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/invest/InvestController.java | 12 ++++++++++++ .../iformall/service/invest/InvestBizService.java | 3 +++ .../service/invest/impl/InvestBizServiceImpl.java | 14 ++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestController.java b/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestController.java index ccb80fe9c..8e7032336 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestController.java @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Collection; +import java.util.Map; @Slf4j @@ -35,4 +36,15 @@ public class InvestController extends InvestBaseController { return execute(null, p -> bizService.queryUserList()); } + + /** + * 查询商铺可出租时间 + */ + @ApiOperation("查询商铺可出租时间") + @SystemControllerLog(description = "查询商铺可出租时间") + @GetMapping("/shopRentInfo") + public InvestResultData shopRentInfo(Long shopId) { + return execute(shopId, p -> bizService.shopRentInfo(p)); + } + } diff --git a/mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java b/mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java index 7961b5fe2..ef15c5708 100644 --- a/mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java @@ -11,6 +11,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.util.Collection; import java.util.List; +import java.util.Map; public interface InvestBizService { @@ -38,6 +39,8 @@ public interface InvestBizService { */ Collection queryUserList() ; + Map shopRentInfo(Long shopId) ; + boolean saveCustomerAndDemand(InvestDemandDto customerDemandDto) ; boolean updateCustomerAndDemand(InvestDemandDto customerDto) ; diff --git a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java index 97bd1eb37..6a2cfc027 100644 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java @@ -705,6 +705,20 @@ public class InvestBizServiceImpl implements InvestBizService { return queryUserList(EnumInvestUserType.ALL); } + @Override + public Map shopRentInfo(Long shopId) { + WxShop shop = shopService.getById(shopId); + InvestHelper.notNull(shop, "shop 不存在"); + //3、商品合同信息 + Map shopContractMap = rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()), StringUtils.join(shop.getId()), InvestUserContext.getUser().getTenantId()); + WxRentContract contract = shopContractMap.get(shop.getId()); + InvestHelper.notNull(contract,"合同信息不存在"); + Map map = new HashMap<>(); + map.put("startdate", contract.getRentalStartDate()); + map.put("enddate", contract.getRentalEndDate()); + return map; + } + public List queryUserList(EnumInvestUserType userType) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(MallUserInfo::getStatus, 1);