| @@ -84,9 +84,12 @@ public class WxRentContractController extends BaseController { | |||||
| return wxRentContractService.updateMerchant(wxRentContract); | return wxRentContractService.updateMerchant(wxRentContract); | ||||
| } | } | ||||
| @GetMapping("/getRentContractList") | |||||
| public ResultData getRentContractList() { | |||||
| return new ResultData(Result.SUCCESS, "查询成功", wxRentContractService.getRentContractList(getTenantId())); | |||||
| @GetMapping("getRentContractList") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData getRentContractList(Integer pageNum, Integer pageSize) { | |||||
| return new ResultData(wxRentContractService.getRentContractList(getTenantId(),pageNum, pageSize)); | |||||
| } | } | ||||
| @@ -15,6 +15,9 @@ import org.springframework.web.bind.annotation.*; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @RestController | @RestController | ||||
| @RequestMapping("wxShop") | @RequestMapping("wxShop") | ||||
| public class WxShopController extends BaseController { | public class WxShopController extends BaseController { | ||||
| @@ -29,7 +32,9 @@ public class WxShopController extends BaseController { | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | ||||
| public ResultData list(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) { | public ResultData list(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) { | ||||
| if (null == wxShop) wxShop = new WxShop(); | |||||
| if (null == wxShop){ | |||||
| wxShop = new WxShop(); | |||||
| } | |||||
| wxShop.setTenantId(getTenantId()); | wxShop.setTenantId(getTenantId()); | ||||
| wxShop.setSortColumns(WxShop.Field.Id_DESC); | wxShop.setSortColumns(WxShop.Field.Id_DESC); | ||||
| @@ -89,5 +94,19 @@ public class WxShopController extends BaseController { | |||||
| } | } | ||||
| @ApiOperation("分页列表接品-合同访问") | |||||
| @GetMapping("listShopFromContract") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData listShopFromContract(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) { | |||||
| if (null == wxShop){ | |||||
| wxShop = new WxShop(); | |||||
| } | |||||
| wxShop.setTenantId(getTenantId()); | |||||
| wxShop.setSortColumns(WxShop.Field.Id_DESC); | |||||
| final PageInfo<Map<String, Object>> page = wxShopService.listShopFromContract(wxShop, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| } | } | ||||
| @@ -46,6 +46,28 @@ public class WxRentContract implements Serializable { | |||||
| @Transient | @Transient | ||||
| private String shopNumber; | private String shopNumber; | ||||
| @Transient | |||||
| private String building; | |||||
| @Transient | |||||
| private String floor; | |||||
| public String getBuilding() { | |||||
| return building; | |||||
| } | |||||
| public void setBuilding(String building) { | |||||
| this.building = building; | |||||
| } | |||||
| public String getFloor() { | |||||
| return floor; | |||||
| } | |||||
| public void setFloor(String floor) { | |||||
| this.floor = floor; | |||||
| } | |||||
| public String getShopNumber() { | public String getShopNumber() { | ||||
| return shopNumber; | return shopNumber; | ||||
| } | } | ||||
| @@ -7,10 +7,10 @@ package com.iformall.enums; | |||||
| public enum EnumBillDailyStatus { | public enum EnumBillDailyStatus { | ||||
| NOT_EXPIRED(1,"未到期"), | |||||
| NOT_PAID(1, "欠缴"), | |||||
| WAIT_PAY(2,"待缴"), | WAIT_PAY(2,"待缴"), | ||||
| NOT_PAID(3, "欠缴"), | |||||
| PAID(4, "已结清"), | |||||
| PAID(3, "已结清"), | |||||
| NOT_EXPIRED(4,"未到期"), | |||||
| ; | ; | ||||
| public static EnumBillDailyStatus getEnum(Integer code) { | public static EnumBillDailyStatus getEnum(Integer code) { | ||||
| @@ -6,6 +6,9 @@ import com.iformall.domain.po.WxShop; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| public interface WxShopMapper extends CommonMapper<WxShop, String> { | public interface WxShopMapper extends CommonMapper<WxShop, String> { | ||||
| List<WxShop> findList(WxShop wxShop); | List<WxShop> findList(WxShop wxShop); | ||||
| @@ -19,4 +22,6 @@ public interface WxShopMapper extends CommonMapper<WxShop, String> { | |||||
| Map<String,Object> queryShopLeftInfo(Map<String,Object> shopparams); | Map<String,Object> queryShopLeftInfo(Map<String,Object> shopparams); | ||||
| List<Map<String,Object>> listShopFromContract(WxShop wxShop); | |||||
| } | } | ||||
| @@ -53,6 +53,6 @@ public interface WxRentContractService { | |||||
| ResultData updateMerchant(WxRentContract wxRentContract); | ResultData updateMerchant(WxRentContract wxRentContract); | ||||
| Object getRentContractList(String tenantId); | |||||
| Object getRentContractList(String tenantId, Integer pageNum, Integer pageSize); | |||||
| } | } | ||||
| @@ -48,4 +48,6 @@ public interface WxShopService { | |||||
| ResultData hasShopNumber(String tenantId, String shopNumber, Long id); | ResultData hasShopNumber(String tenantId, String shopNumber, Long id); | ||||
| PageInfo<Map<String,Object>> listShopFromContract(WxShop wxShop, Integer pageNum, Integer pageSize); | |||||
| } | } | ||||
| @@ -32,7 +32,6 @@ import java.io.*; | |||||
| import java.net.HttpURLConnection; | import java.net.HttpURLConnection; | ||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.util.*; | import java.util.*; | ||||
| import java.util.stream.Collectors; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -445,9 +444,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public Object getRentContractList(String tenantId) { | |||||
| return wxRentContractMapper.getRentContractList(tenantId); | |||||
| public PageInfo<WxRentContract> getRentContractList(String tenantId, Integer pageIndex, Integer pageSize) { | |||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.getRentContractList(tenantId)); | |||||
| } | } | ||||
| public Map<String, Object> updateStatus(String tenantId) { | public Map<String, Object> updateStatus(String tenantId) { | ||||
| @@ -99,5 +99,12 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| return new ResultData(ResultData.SUCCESS,"查询成功",list.size()>0?true:false); | return new ResultData(ResultData.SUCCESS,"查询成功",list.size()>0?true:false); | ||||
| } | } | ||||
| @Override | |||||
| public PageInfo<Map<String, Object>> listShopFromContract(WxShop wxShop, Integer pageIndex, Integer pageSize) { | |||||
| PageHelper.startPage(pageIndex, pageSize); | |||||
| List<Map<String,Object>> shops = wxShopMapper.listShopFromContract(wxShop); | |||||
| PageInfo<Map<String,Object>> pageInfo = new PageInfo<>(shops); | |||||
| return pageInfo; | |||||
| } | |||||
| } | } | ||||
| @@ -139,7 +139,10 @@ | |||||
| </update> | </update> | ||||
| <select id="getRentContractList" parameterType="String" resultType="com.iformall.domain.po.WxRentContract"> | <select id="getRentContractList" parameterType="String" resultType="com.iformall.domain.po.WxRentContract"> | ||||
| select rc.*,s.shop_number from wx_rent_contract rc left join wx_shop s on rc.shop_id=s.id | |||||
| select rc.*,s.shop_number,b.building_name building, f.floor_name floor from wx_rent_contract rc | |||||
| left join wx_shop s on rc.shop_id=s.id | |||||
| left join wx_mall_building b on s.building=b.id | |||||
| left join wx_mall_floor f on s.floor=f.id | |||||
| where rc.status not in(1,6,7) and rc.tenant_id=#{tenantId} | where rc.status not in(1,6,7) and rc.tenant_id=#{tenantId} | ||||
| </select> | </select> | ||||
| @@ -174,11 +174,6 @@ | |||||
| and s.`status` = #{status} | and s.`status` = #{status} | ||||
| </if> | </if> | ||||
| <if test="null!=status and status==1"> | |||||
| and s.id not in( | |||||
| SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status!=1 and status!=6 and status!=7 and merchant_id is not null | |||||
| ) | |||||
| </if> | |||||
| <if test=" null != x "> | <if test=" null != x "> | ||||
| and s.`x` = #{x} | and s.`x` = #{x} | ||||
| @@ -251,4 +246,26 @@ | |||||
| where tenant_id=#{tenantId} and status=#{status} | where tenant_id=#{tenantId} and status=#{status} | ||||
| </select> | </select> | ||||
| <select id="listShopFromContract" 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,m.`name` merchantName,m.id merchantId, | |||||
| m.link_person linkPerson,m.link_phone linkPhone | |||||
| from wx_shop s left join wx_merchant_shop ms on ms.shop_id=s.id and ms.is_del=0 | |||||
| left join wx_merchant m on ms.merchant_id=m.id | |||||
| left join wx_mall_building b on s.building=b.id | |||||
| left join wx_mall_floor f on s.floor=f.id | |||||
| where 1=1 | |||||
| and s.tenant_id=#{tenantId} | |||||
| <if test=" null != status"> | |||||
| and s.`status` = #{status} | |||||
| </if> | |||||
| <if test="null!=status and status==1"> | |||||
| and s.id not in( | |||||
| SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status!=1 and status!=6 and status!=7 and merchant_id is not null | |||||
| ) | |||||
| </if> | |||||
| <if test=" null != sortColumns">order by s.${sortColumns}</if> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||