diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxShopController.java b/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxShopController.java index c7c1c386f..6e75523a3 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxShopController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxShopController.java @@ -33,12 +33,20 @@ public class WxShopController extends BaseController { @Autowired private WxShopService wxShopService; + + private void setDataRule(WxShop wxShop) { + WxUserDataRule dataRule = this.getCurrentDataFloors(); + if (null != dataRule) { + wxShop.setFloorForRule(dataRule.getFloorIds()); + wxShop.setBusinessForRule(dataRule.getBussinessIds()); + } + } + @ApiOperation("分页列表接口") @GetMapping("list") @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 list(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) { logger.debug("[" + getIpAddr() + "] WxShopController::list"); if (null == wxShop){ @@ -46,7 +54,7 @@ public class WxShopController extends BaseController { } wxShop.updateTenantInfo(getTenantInfo()); wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); - + setDataRule(wxShop); final PageInfo> page = wxShopService.listMapAsPage(wxShop, pageNum, pageSize); return new ResultData(page); } @@ -94,18 +102,14 @@ public class WxShopController extends BaseController { @ApiOperation("获取商铺数据") @GetMapping("getShopListByShopNumber") @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true) - @SystemControllerLog(description = "店铺管理-获取商铺数据") public ResultData getShoplist(String shopNumber) { - logger.debug("[" + getIpAddr() + "] WxShopController::getbshoplist"); return wxShopService.getShopList(getTenantInfo(), shopNumber); } @ApiOperation("获取商户商铺数据") @GetMapping("getMerchantShopByShopId") @ApiImplicitParam(name = "shopId", value = "shopId", dataType = "String", paramType = "query", required = true) - @SystemControllerLog(description = "店铺管理-获取商户商铺数据") public ResultData getMerchantShopByShopId(String shopId) { - logger.debug("[" + getIpAddr() + "] WxShopController::getMerchantShopByShopId"); return wxShopService.getMerchantShopByShopId(getTenantInfo(), shopId); } @@ -115,7 +119,6 @@ public class WxShopController extends BaseController { @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query"), @ApiImplicitParam(name = "type", value = "type", dataType = "Integer", paramType = "query", required = true)}) - @SystemControllerLog(description = "店铺管理-查询商铺号是否存在") public ResultData hasShopNumber(String shopNumber, Long id, Integer type) { logger.debug("[" + getIpAddr() + "] WxShopController::hasShopNumber"); WxShop wxShop = new WxShop(); @@ -133,7 +136,6 @@ public class WxShopController extends BaseController { @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query"), @ApiImplicitParam(name = "type", value = "type", dataType = "Integer", paramType = "query", required = true)}) - @SystemControllerLog(description = "店铺管理-查询商铺号是否存在") public ResultData hasShopSid(String shopSid, Long id) { logger.debug("[" + getIpAddr() + "] WxShopController::hasShopSid"); WxShop wxShop = new WxShop(); @@ -150,9 +152,7 @@ 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 listShopFromContract(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) { - logger.debug("[" + getIpAddr() + "] WxShopController::listShopFromContract"); if (null == wxShop){ wxShop = new WxShop(); } @@ -172,6 +172,7 @@ public class WxShopController extends BaseController { } wxShop.updateTenantInfo(getTenantInfo()); wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); + setDataRule(wxShop); wxShopService.exportShop(wxShop, request, response); } @@ -185,11 +186,7 @@ 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()); - } + setDataRule(wxShop); wxShopService.exportNotRentShop(wxShop, request, response); } @@ -206,11 +203,7 @@ 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()); - } + setDataRule(wxShop); final PageInfo> page = wxShopService.notRentListMapAsPage(wxShop, pageNum, pageSize); return new ResultData(page); } diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxRaffleActivityController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxRaffleActivityController.java index 5328a243b..ecc5872a9 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxRaffleActivityController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxRaffleActivityController.java @@ -112,6 +112,7 @@ public class WxRaffleActivityController extends BaseController { TenantEntity tenantInfo = getTenantInfo(); wxCashBackActivityRecord.updateTenantInfo(tenantInfo); wxCashBackActivityRecord.setSortColumns(SortField.CreateDate_DESC); + wxCashBackActivityRecord.setMerchantId(getLoginBUser().getMerchantId()); final PageInfo page = wxCashBackActivityService.listActivityRecordAsPage(wxCashBackActivityRecord, pageNum, pageSize); return new ResultData(page); } @@ -159,6 +160,7 @@ public class WxRaffleActivityController extends BaseController { WxRaffleActivityRecord r = new WxRaffleActivityRecord(); r.setActivityId(a.getId()); r.updateTenantInfo(a); + wxCashBackActivityRecord.setMerchantId(getLoginBUser().getMerchantId()); int allRecordCount = wxCashBackActivityService.getRecordCount(r); r.setAuditStatus(EnumCashBackActivityRecordStatus.AUDI_SUCCESS.getCode()); diff --git a/mallinkService/src/main/resources/mapper/WxShopMapper.xml b/mallinkService/src/main/resources/mapper/WxShopMapper.xml index 8ceaab5ec..d36bb8a05 100644 --- a/mallinkService/src/main/resources/mapper/WxShopMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxShopMapper.xml @@ -425,6 +425,10 @@ and s.business_id = #{businessId} + + + and s.`floor` in (${floorForRule}) + and s.id in