| @@ -88,12 +88,19 @@ public class NeuPosAdminController 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), | ||||
| @ApiImplicitParam(name = "tenantId", value = "租户号", dataType = "String", 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)) { | if (!tenantValid(tenantId)) { | ||||
| return new ResultData(Result.ERROR,"未安装POS系统"); | return new ResultData(Result.ERROR,"未安装POS系统"); | ||||
| } | } | ||||
| setDate(example); | setDate(example); | ||||
| example.setOrgId(24); | example.setOrgId(24); | ||||
| if (StringUtils.isNotBlank(phone)) { | |||||
| Integer shopId = getShopIdByPhone(phone); | |||||
| if (null == shopId) { | |||||
| return new ResultData(); | |||||
| } | |||||
| example.setShopId(shopId); | |||||
| } | |||||
| PageInfo<Map> maplist = neuPosOrderService.queryShopPayOrderListByType(example,pageNum,pageSize); | PageInfo<Map> maplist = neuPosOrderService.queryShopPayOrderListByType(example,pageNum,pageSize); | ||||
| return new ResultData(maplist); | return new ResultData(maplist); | ||||
| } | } | ||||
| @@ -132,6 +139,17 @@ public class NeuPosAdminController extends BaseController { | |||||
| } | } | ||||
| } | } | ||||
| private Integer getShopIdByPhone(String phone) { | |||||
| //phone账号登录名 | |||||
| List<Map> 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("集团单一商户流水") | @ApiOperation("集团单一商户流水") | ||||
| @GetMapping("oneMerchantOrderlist") | @GetMapping("oneMerchantOrderlist") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -144,13 +162,10 @@ public class NeuPosAdminController extends BaseController { | |||||
| // } | // } | ||||
| setDate(example); | setDate(example); | ||||
| example.setOrgId(24); | example.setOrgId(24); | ||||
| //phone账号登录名 | |||||
| List<Map> ushops = neuPosOrderService.selectUserShopList(24, phone); | |||||
| if (null == ushops || ushops.size() <= 0 ) { | |||||
| Integer shopId = getShopIdByPhone(phone); | |||||
| if (null == shopId) { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| Map us = ushops.get(0); | |||||
| Integer shopId = (Integer) us.get("shop"); | |||||
| //Long uid = (Long) us.get("id"); | //Long uid = (Long) us.get("id"); | ||||
| //String nickname = (String) us.get("nickname"); | //String nickname = (String) us.get("nickname"); | ||||
| example.setShopId(shopId); | example.setShopId(shopId); | ||||