| @@ -157,4 +157,21 @@ public class WxShopController extends BaseController { | |||||
| wxShopService.exportNotRentShop(wxShop, request, response); | 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); | |||||
| } | |||||
| } | } | ||||
| @@ -14,9 +14,10 @@ public interface WxShopMapper extends CommonMapper<WxShop, String> { | |||||
| List<WxShop> findList(WxShop wxShop); | List<WxShop> findList(WxShop wxShop); | ||||
| List<Map<String,Object>> findListMap(WxShop record); | List<Map<String,Object>> findListMap(WxShop record); | ||||
| List<Map<String,Object>> notRentListMapAsPage(WxShop record); | |||||
| List<Map<String, Object>> getbshoplist(Map<String, Object> tenantId); | List<Map<String, Object>> getbshoplist(Map<String, Object> tenantId); | ||||
| Map<String, Object> getMerchantShopByShopId(Map<String,Object> params); | Map<String, Object> getMerchantShopByShopId(Map<String,Object> params); | ||||
| @@ -21,6 +21,8 @@ public interface WxShopService { | |||||
| PageInfo<Map<String,Object>> listMapAsPage(WxShop record, Integer pageIndex, Integer pageSize); | PageInfo<Map<String,Object>> listMapAsPage(WxShop record, Integer pageIndex, Integer pageSize); | ||||
| PageInfo<Map<String,Object>> notRentListMapAsPage(WxShop record, Integer pageIndex, Integer pageSize); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| * | * | ||||
| @@ -2250,6 +2250,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| private ResultData getIndexShopRentData(String tenantId, String startDateStr) { | private ResultData getIndexShopRentData(String tenantId, String startDateStr) { | ||||
| HashMap<String, Object> datamap = new HashMap<>(); | HashMap<String, Object> datamap = new HashMap<>(); | ||||
| Date startDate = DateUtils.getDateFromString(startDateStr,"yyyy-MM-dd HH:mm:ss").getTime(); | Date startDate = DateUtils.getDateFromString(startDateStr,"yyyy-MM-dd HH:mm:ss").getTime(); | ||||
| startDate = DateUtils.getFirstDayForCurrMonth(startDate); | |||||
| Date endDate = DateUtils.getLastDayForMonth(startDate); | Date endDate = DateUtils.getLastDayForMonth(startDate); | ||||
| WxShop query = new WxShop(); | WxShop query = new WxShop(); | ||||
| query.setTenantId(tenantId); | query.setTenantId(tenantId); | ||||
| @@ -2299,6 +2300,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| private ResultData getBillReceRate(String tenantId, String startDateStr) { | private ResultData getBillReceRate(String tenantId, String startDateStr) { | ||||
| HashMap<String, Object> datamap = new HashMap<>(); | HashMap<String, Object> datamap = new HashMap<>(); | ||||
| Date startDate = DateUtils.getDateFromString(startDateStr,"yyyy-MM-dd HH:mm:ss").getTime(); | Date startDate = DateUtils.getDateFromString(startDateStr,"yyyy-MM-dd HH:mm:ss").getTime(); | ||||
| startDate = DateUtils.getFirstDayForCurrMonth(startDate); | |||||
| Date endDate = DateUtils.getLastDayForMonth(startDate); | Date endDate = DateUtils.getLastDayForMonth(startDate); | ||||
| //租金收缴率 | //租金收缴率 | ||||
| @@ -55,6 +55,14 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| return pageInfo; | 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 | @Override | ||||
| public WxShop getById(Long id) { | public WxShop getById(Long id) { | ||||
| return wxShopMapper.selectByPrimaryKey(id); | return wxShopMapper.selectByPrimaryKey(id); | ||||
| @@ -267,6 +267,43 @@ | |||||
| </select> | </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"> | <resultMap id="VoResultMap" type="com.iformall.domain.vo.WxShopVo"> | ||||