| | |
| | | import com.xiaopeng.api.feignClient.account.UserResourcesClient; |
| | | import com.xiaopeng.api.feignClient.maintenance.XpVehicleModelClient; |
| | | import com.xiaopeng.api.model.maintenance.XpVehicleModel; |
| | | import com.xiaopeng.api.model.operation.XpOfficialPartner; |
| | | import com.xiaopeng.api.model.operation.XpPricing; |
| | | import com.xiaopeng.api.model.operation.XpWhitelist; |
| | | import com.xiaopeng.api.vo.operation.RouteAndFareVo; |
| | |
| | | import com.xiaopeng.common.core.exception.ServiceException; |
| | | import com.xiaopeng.common.core.web.controller.BaseController; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import com.xiaopeng.operation.constant.I18nKeyConstant; |
| | | import com.xiaopeng.operation.dto.*; |
| | | import com.xiaopeng.operation.query.PricingPageListQuery; |
| | |
| | | |
| | | @Resource |
| | | private XpVehicleModelClient xpVehicleModelClient; |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | public XpPricingController(XpPricingService xpPricingService, IXpGeoQueryEntityService xpGeoQueryEntityService, UserResourcesClient userResourcesClient, IXpWhitelistService xpWhitelistService, XpRegionService xpRegionService, XpOpenCityService xpOpenCityService, ImageTagProcessor imageTagProcessor) { |
| | | this.xpPricingService = xpPricingService; |
| | |
| | | } |
| | | |
| | | |
| | | // /** |
| | | // * 合作商添加计费策略 todo 现在的版本不支持手动选择车型 |
| | | // * @param vo |
| | | // * @return |
| | | // */ |
| | | // @PostMapping("/v1/pricing/save") |
| | | // @ApiOperation(value = "保存计价规则", notes = "流量接入-基础信息") |
| | | // @ApiImplicitParams({ |
| | | // @ApiImplicitParam(value = "token", name = "token", required = true, paramType = "header") |
| | | // }) |
| | | // public R<?> save(@RequestBody PricingInfoVo vo) { |
| | | // |
| | | // return R.ok(); |
| | | // } |
| | | /** |
| | | * 合作商添加计费策略 |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | @PostMapping("/drainage/v1/pricing/save") |
| | | @ApiOperation(value = "保存计价规则", notes = "流量接入-基础信息") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "token", name = "token", required = true, paramType = "header") |
| | | }) |
| | | public R<?> save(@RequestBody PricingInfoVo vo) { |
| | | XpOfficialPartner officialPartner = tokenService.getOfficialPartner(); |
| | | xpPricingService.savePrice(vo, officialPartner); |
| | | return R.ok(); |
| | | } |
| | | } |