| | |
| | | package com.xiaopeng.operation.controller; |
| | | |
| | | import com.xiaopeng.api.model.operation.XpRideGuide; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.controller.BaseController; |
| | | import com.xiaopeng.common.core.web.domain.AjaxResult; |
| | | import com.xiaopeng.operation.dto.XpRideGuideDTO; |
| | | import com.xiaopeng.operation.service.XpRideGuideService; |
| | | import com.xiaopeng.operation.vo.XpAgreementVo; |
| | | import com.xiaopeng.operation.vo.XpRideGuideVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | |
| | | @Validated |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/base/v1/mini-program") |
| | | @Api(tags = "乘车指南模块") |
| | | public class XpRideGuideController extends BaseController { |
| | | |
| | | private final XpRideGuideService xpRideGuideService; |
| | |
| | | |
| | | |
| | | @ApiOperation(value = "获取乘车指南",tags = {"小程序首页"},response = XpAgreementVo.class) |
| | | @GetMapping("/guide/list") |
| | | @GetMapping("/base/v1/mini-program/guide/list") |
| | | public AjaxResult<XpRideGuideVo> getList() { |
| | | return success(xpRideGuideService.getXpRideGuideList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取乘车指南",tags = {"管理后台-内容中心"},response = XpRideGuide.class) |
| | | @GetMapping("/api/v1/guide/list") |
| | | public R<List<XpRideGuide>> getGideList() { |
| | | return R.ok(xpRideGuideService.getGideList()); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "保存乘车指南",tags = {"管理后台-内容中心"}) |
| | | @PostMapping("/api/v1/guide/save") |
| | | public R<?> saveGuide(@Valid @RequestBody XpRideGuideDTO dto) { |
| | | xpRideGuideService.saveGuide(dto); |
| | | return R.ok(); |
| | | } |
| | | } |