| @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | |||||
| import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||
| import java.util.Collection; | import java.util.Collection; | ||||
| import java.util.Map; | |||||
| @Slf4j | @Slf4j | ||||
| @@ -35,4 +36,15 @@ public class InvestController extends InvestBaseController { | |||||
| return execute(null, p -> bizService.queryUserList()); | return execute(null, p -> bizService.queryUserList()); | ||||
| } | } | ||||
| /** | |||||
| * 查询商铺可出租时间 | |||||
| */ | |||||
| @ApiOperation("查询商铺可出租时间") | |||||
| @SystemControllerLog(description = "查询商铺可出租时间") | |||||
| @GetMapping("/shopRentInfo") | |||||
| public InvestResultData<Map> shopRentInfo(Long shopId) { | |||||
| return execute(shopId, p -> bizService.shopRentInfo(p)); | |||||
| } | |||||
| } | } | ||||
| @@ -11,6 +11,7 @@ import org.springframework.web.multipart.MultipartFile; | |||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import java.util.Collection; | import java.util.Collection; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | |||||
| public interface InvestBizService { | public interface InvestBizService { | ||||
| @@ -38,6 +39,8 @@ public interface InvestBizService { | |||||
| */ | */ | ||||
| Collection<MallUserInfo> queryUserList() ; | Collection<MallUserInfo> queryUserList() ; | ||||
| Map<String,Object> shopRentInfo(Long shopId) ; | |||||
| boolean saveCustomerAndDemand(InvestDemandDto customerDemandDto) ; | boolean saveCustomerAndDemand(InvestDemandDto customerDemandDto) ; | ||||
| boolean updateCustomerAndDemand(InvestDemandDto customerDto) ; | boolean updateCustomerAndDemand(InvestDemandDto customerDto) ; | ||||
| @@ -705,6 +705,20 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| return queryUserList(EnumInvestUserType.ALL); | return queryUserList(EnumInvestUserType.ALL); | ||||
| } | } | ||||
| @Override | |||||
| public Map<String, Object> shopRentInfo(Long shopId) { | |||||
| WxShop shop = shopService.getById(shopId); | |||||
| InvestHelper.notNull(shop, "shop 不存在"); | |||||
| //3、商品合同信息 | |||||
| Map<Long, WxRentContract> shopContractMap = rentContractService.selectRentContractByShopIds(Arrays.asList(shop.getId()), StringUtils.join(shop.getId()), InvestUserContext.getUser().getTenantId()); | |||||
| WxRentContract contract = shopContractMap.get(shop.getId()); | |||||
| InvestHelper.notNull(contract,"合同信息不存在"); | |||||
| Map<String, Object> map = new HashMap<>(); | |||||
| map.put("startdate", contract.getRentalStartDate()); | |||||
| map.put("enddate", contract.getRentalEndDate()); | |||||
| return map; | |||||
| } | |||||
| public List<MallUserInfo> queryUserList(EnumInvestUserType userType) { | public List<MallUserInfo> queryUserList(EnumInvestUserType userType) { | ||||
| LambdaQueryWrapper<MallUserInfo> queryWrapper = new LambdaQueryWrapper<>(); | LambdaQueryWrapper<MallUserInfo> queryWrapper = new LambdaQueryWrapper<>(); | ||||
| queryWrapper.eq(MallUserInfo::getStatus, 1); | queryWrapper.eq(MallUserInfo::getStatus, 1); | ||||