diff --git a/mallinkNeuPosAdmin/src/main/java/com/iformall/controller/NeuPosAdminController.java b/mallinkNeuPosAdmin/src/main/java/com/iformall/controller/NeuPosAdminController.java index 1bd991081..f8f5d9b8d 100644 --- a/mallinkNeuPosAdmin/src/main/java/com/iformall/controller/NeuPosAdminController.java +++ b/mallinkNeuPosAdmin/src/main/java/com/iformall/controller/NeuPosAdminController.java @@ -88,12 +88,19 @@ public class NeuPosAdminController extends BaseController { @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "tenantId", value = "租户号", dataType = "String", paramType = "query", required = true)}) - public ResultData payTypeOrderlist(@ModelAttribute NeuPosOrderMasterExt example, Integer pageNum, Integer pageSize,String tenantId) { + public ResultData payTypeOrderlist(@ModelAttribute NeuPosOrderMasterExt example, Integer pageNum, Integer pageSize,String tenantId,String phone) { if (!tenantValid(tenantId)) { return new ResultData(Result.ERROR,"未安装POS系统"); } setDate(example); example.setOrgId(24); + if (StringUtils.isNotBlank(phone)) { + Integer shopId = getShopIdByPhone(phone); + if (null == shopId) { + return new ResultData(); + } + example.setShopId(shopId); + } PageInfo maplist = neuPosOrderService.queryShopPayOrderListByType(example,pageNum,pageSize); return new ResultData(maplist); } @@ -132,6 +139,17 @@ public class NeuPosAdminController extends BaseController { } } + private Integer getShopIdByPhone(String phone) { + //phone账号登录名 + List ushops = neuPosOrderService.selectUserShopList(24, phone); + if (null == ushops || ushops.size() <= 0 ) { + return null; + } + Map us = ushops.get(0); + Integer shopId = (Integer) us.get("shop"); + return shopId; + } + @ApiOperation("集团单一商户流水") @GetMapping("oneMerchantOrderlist") @ApiImplicitParams({ @@ -144,13 +162,10 @@ public class NeuPosAdminController extends BaseController { // } setDate(example); example.setOrgId(24); - //phone账号登录名 - List ushops = neuPosOrderService.selectUserShopList(24, phone); - if (null == ushops || ushops.size() <= 0 ) { + Integer shopId = getShopIdByPhone(phone); + if (null == shopId) { return new ResultData(); } - Map us = ushops.get(0); - Integer shopId = (Integer) us.get("shop"); //Long uid = (Long) us.get("id"); //String nickname = (String) us.get("nickname"); example.setShopId(shopId);