| @@ -675,7 +675,7 @@ public class WxCarController extends BaseController { | |||||
| } | } | ||||
| @ApiOperation("券包分页列表接口") | @ApiOperation("券包分页列表接口") | ||||
| @GetMapping("couponOrderList") | |||||
| @GetMapping("/couponOrderList") | |||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @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), | ||||
| @@ -697,4 +697,31 @@ public class WxCarController extends BaseController { | |||||
| wxCouponOrder.setSortColumns(WxCouponOrder.Field.UpdateDate_DESC); | wxCouponOrder.setSortColumns(WxCouponOrder.Field.UpdateDate_DESC); | ||||
| return wxCouponOrderService.carlistCUserVoAsPage(wxCouponOrder, pageNum, pageSize); | return wxCouponOrderService.carlistCUserVoAsPage(wxCouponOrder, pageNum, pageSize); | ||||
| } | } | ||||
| @ApiOperation(value = "停车场状态") | |||||
| @GetMapping("/getParkStatus") | |||||
| public ResultData getParkStatus() { | |||||
| WxCUser user = getUser(); | |||||
| /// 1, get mall's park | |||||
| WxPark park = getCurrentPark(user); | |||||
| if (park.getVendorType() == EnumCarVendor.CAR_ETCP.getCode()) { | |||||
| String params = park.getVendorParams(); | |||||
| JSONObject objParams = JSON.parseObject(params); | |||||
| String url = objParams.getString("url"); | |||||
| String merchantNo = objParams.getString("merchantNo"); | |||||
| String merchantKey = objParams.getString("merchantKey"); | |||||
| String version = objParams.getString("version"); | |||||
| String ret = etcp.parkingStatus(url, merchantNo, merchantKey, version, park.getParkId()); | |||||
| JSONObject retObj = JSON.parseObject(ret); | |||||
| if (retObj.getIntValue("code") == EnumETCPCode.SUCCESS.getCode()) { | |||||
| return new ResultData(retObj.getJSONArray("data").getJSONObject(0)); | |||||
| } | |||||
| } | |||||
| return new ResultData(ErrorCode.CAR_VENDOR_NOT_SUPPORT.getCode(), "车场不支持"); | |||||
| } | |||||
| } | } | ||||