| | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.order.api.model.TChargingOrder; |
| | | import com.ruoyi.order.api.model.TOrderEvaluate; |
| | | import com.ruoyi.order.api.query.TChargingCountQuery; |
| | | import com.ruoyi.order.dto.GetMyChargingOrderList; |
| | | import com.ruoyi.order.dto.MyChargingOrderInfo; |
| | | import com.ruoyi.order.dto.OrderEvaluateVo; |
| | | import com.ruoyi.order.service.TChargingOrderService; |
| | | import com.ruoyi.order.service.TOrderEvaluateService; |
| | | import com.ruoyi.order.service.TOrderEvaluateTagService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | private TChargingOrderService chargingOrderService; |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | @Autowired |
| | | private TOrderEvaluateService orderEvaluateService; |
| | | @Autowired |
| | | private TOrderEvaluateTagService orderEvaluateTagService; |
| | | |
| | | @ResponseBody |
| | | @PostMapping(value = "/addEvaluate") |
| | | @ApiOperation(value = "添加评价", tags = {"小程序-扫一扫"}) |
| | | public AjaxResult getMyChargingOrderList(@RequestBody OrderEvaluateVo dto){ |
| | | dto.setAppUserId(tokenService.getLoginUserApplet().getUserId()); |
| | | orderEvaluateService.addOrderEvaluate(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | /** |
| | | * 查询用户最近一次充电记录使用的车辆 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/getCar") |
| | | @GetMapping(value = "/getCar") |
| | | public R<Long> getCar() { |
| | | List<TChargingOrder> list = chargingOrderService.list(new LambdaQueryWrapper<TChargingOrder>() |
| | | .eq(TChargingOrder::getAppUserId, tokenService.getLoginUserApplet().getUserid()) |
| | | .eq(TChargingOrder::getAppUserId, tokenService.getLoginUserApplet().getUserId()) |
| | | .isNotNull(TChargingOrder::getAppUserCarId)); |
| | | if (!list.isEmpty()){ |
| | | // 最近使用的车辆id |
| | |
| | | .eq(TChargingOrder::getDelFlag, 0).eq(TChargingOrder::getStatus, 3)); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping(value = "/getMyChargingOrderList") |