Browse Source

[首页统计][修改][修改未出租商铺统计]

release_toaliyun_real
luozukai 7 years ago
parent
commit
445ab0fc37
6 changed files with 68 additions and 1 deletions
  1. +17
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/WxShopController.java
  2. +2
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxShopMapper.java
  3. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxShopService.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
  5. +8
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java
  6. +37
    -0
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 17
- 0
mallinkAdmin/src/main/java/com/iformall/controller/WxShopController.java View File

@@ -157,4 +157,21 @@ public class WxShopController extends BaseController {
wxShopService.exportNotRentShop(wxShop, request, response);
}

@ApiOperation("未出租商铺分页列表接口")
@GetMapping("notRentShopList")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "未出租商铺分页列表接口")
public ResultData notRentShopList(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxShopController::notRentShopList");
if (null == wxShop){
wxShop = new WxShop();
}
wxShop.setTenantId(getTenantId());
wxShop.setSortColumns(WxShop.Field.Id_DESC);

final PageInfo<Map<String, Object>> page = wxShopService.notRentListMapAsPage(wxShop, pageNum, pageSize);
return new ResultData(page);
}
}

+ 2
- 1
mallinkService/src/main/java/com/iformall/mapper/WxShopMapper.java View File

@@ -14,9 +14,10 @@ public interface WxShopMapper extends CommonMapper<WxShop, String> {

List<WxShop> findList(WxShop wxShop);


List<Map<String,Object>> findListMap(WxShop record);

List<Map<String,Object>> notRentListMapAsPage(WxShop record);

List<Map<String, Object>> getbshoplist(Map<String, Object> tenantId);

Map<String, Object> getMerchantShopByShopId(Map<String,Object> params);


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxShopService.java View File

@@ -21,6 +21,8 @@ public interface WxShopService {

PageInfo<Map<String,Object>> listMapAsPage(WxShop record, Integer pageIndex, Integer pageSize);

PageInfo<Map<String,Object>> notRentListMapAsPage(WxShop record, Integer pageIndex, Integer pageSize);

/**
* 根据Id获得实体
*


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java View File

@@ -2250,6 +2250,7 @@ public class WxChartServiceImpl implements WxChartDataService {
private ResultData getIndexShopRentData(String tenantId, String startDateStr) {
HashMap<String, Object> datamap = new HashMap<>();
Date startDate = DateUtils.getDateFromString(startDateStr,"yyyy-MM-dd HH:mm:ss").getTime();
startDate = DateUtils.getFirstDayForCurrMonth(startDate);
Date endDate = DateUtils.getLastDayForMonth(startDate);
WxShop query = new WxShop();
query.setTenantId(tenantId);
@@ -2299,6 +2300,7 @@ public class WxChartServiceImpl implements WxChartDataService {
private ResultData getBillReceRate(String tenantId, String startDateStr) {
HashMap<String, Object> datamap = new HashMap<>();
Date startDate = DateUtils.getDateFromString(startDateStr,"yyyy-MM-dd HH:mm:ss").getTime();
startDate = DateUtils.getFirstDayForCurrMonth(startDate);
Date endDate = DateUtils.getLastDayForMonth(startDate);

//租金收缴率


+ 8
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java View File

@@ -55,6 +55,14 @@ public class WxShopServiceImpl implements WxShopService {
return pageInfo;
}

@Override
public PageInfo<Map<String, Object>> notRentListMapAsPage(WxShop record, Integer pageIndex, Integer pageSize) {
PageHelper.startPage(pageIndex, pageSize);
List<Map<String,Object>> shops = wxShopMapper.notRentListMapAsPage(record);
PageInfo<Map<String,Object>> pageInfo = new PageInfo<>(shops);
return pageInfo;
}

@Override
public WxShop getById(Long id) {
return wxShopMapper.selectByPrimaryKey(id);


+ 37
- 0
mallinkService/src/main/resources/mapper/WxShopMapper.xml View File

@@ -267,6 +267,43 @@

</select>

<select id="notRentListMapAsPage" parameterType="com.iformall.domain.po.WxShop" resultType="hashmap">
select s.id,s.shop_number shopNumber,s.build_area buildArea,
s.img_url imgUrl,s.operation_area operationArea,
s.status,b.building_name building,f.floor_name floor,s.manager,s.manager_phone managerPhone,
s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay
from wx_shop s
left join wx_mall_building b on s.building=b.id
left join wx_mall_floor f on s.floor=f.id
where s.is_del=0

<if test=" null != id ">
and s.`id` = #{id}
</if>

<if test=" null != tenantId ">
and s.`tenant_id`= #{tenantId}
</if>

<if test=" null != shopNumber and ''!=shopNumber">
and s.`shop_number` like concat('%', #{shopNumber},'%')
</if>
<if test=" null != status">
and s.`status` = #{status}
</if>
<if test=" null != type ">
and s.`type` = #{type}
</if>
<if test=" null != pointType ">
and s.`point_type` = #{pointType}
</if>
<if test="null != sortColumn">
order by s.${sortColumn} ${sortOrder}
</if>
<if test="null == sortColumn">
<if test=" null != sortColumns">order by s.${sortColumns}</if>
</if>
</select>


<resultMap id="VoResultMap" type="com.iformall.domain.vo.WxShopVo">


Loading…
Cancel
Save