Browse Source

fix bug

release_toaliyun_real
winter 2 years ago
parent
commit
d65770ad5d
2 changed files with 16 additions and 3 deletions
  1. +11
    -3
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxShopController.java
  2. +5
    -0
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 11
- 3
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxShopController.java View File

@@ -7,6 +7,7 @@ import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.WxShop;
import com.iformall.domain.po.WxUserDataRule;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.service.WxShopService;
import io.swagger.annotations.ApiImplicitParam;
@@ -179,12 +180,16 @@ public class WxShopController extends BaseController {
@GetMapping("/exportNotRentShop")
@SystemControllerLog(description = "商铺出租数据-未出租商铺列表-导出")
public void exportNotRentShop(@ModelAttribute WxShop wxShop, HttpServletRequest request, HttpServletResponse response) {
logger.debug("[" + getIpAddr() + "] WxShopController::exportNotRentShop");
if (null == wxShop){
wxShop = new WxShop();
}
wxShop.updateTenantInfo(getTenantInfo());
wxShop.setSortColumns(BaseEntity.SortField.SCreateDate_DESC,BaseEntity.SortField.SId_DESC);
WxUserDataRule dataRule = this.getCurrentDataFloors();
if (null != dataRule) {
wxShop.setFloorForRule(dataRule.getFloorIds());
wxShop.setBusinessForRule(dataRule.getBussinessIds());
}
wxShopService.exportNotRentShop(wxShop, request, response);
}

@@ -194,7 +199,6 @@ public class WxShopController extends BaseController {
@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){
@@ -202,7 +206,11 @@ public class WxShopController extends BaseController {
}
wxShop.updateTenantInfo(getTenantInfo());
wxShop.setSortColumns(BaseEntity.SortField.SCreateDate_DESC,BaseEntity.SortField.SId_DESC);

WxUserDataRule dataRule = this.getCurrentDataFloors();
if (null != dataRule) {
wxShop.setFloorForRule(dataRule.getFloorIds());
wxShop.setBusinessForRule(dataRule.getBussinessIds());
}
final PageInfo<Map<String, Object>> page = wxShopService.notRentListMapAsPage(wxShop, pageNum, pageSize);
return new ResultData(page);
}


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

@@ -317,6 +317,11 @@
<if test=" null != pointType ">
and s.`point_type` = #{pointType}
</if>
<if test=" null != floorForRule and '' != floorForRule ">
and s.`floor` in (${floorForRule})
</if>
<if test="null != sortColumn">
order by ${sortColumn} ${sortOrder}
</if>


Loading…
Cancel
Save