Просмотр исходного кода

[招商]查询商铺可出租时间

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
8f8607fba2
3 измененных файлов: 29 добавлений и 0 удалений
  1. +12
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestController.java
  2. +3
    -0
      mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java
  3. +14
    -0
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

+ 12
- 0
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<Map> shopRentInfo(Long shopId) {
return execute(shopId, p -> bizService.shopRentInfo(p));
}

}

+ 3
- 0
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<MallUserInfo> queryUserList() ;

Map<String,Object> shopRentInfo(Long shopId) ;

boolean saveCustomerAndDemand(InvestDemandDto customerDemandDto) ;

boolean updateCustomerAndDemand(InvestDemandDto customerDto) ;


+ 14
- 0
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<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) {
LambdaQueryWrapper<MallUserInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(MallUserInfo::getStatus, 1);


Загрузка…
Отмена
Сохранить