| | |
| | | import com.doumee.dao.vo.DriverCenterVO; |
| | | import com.doumee.dao.vo.DriverGrabOrderVO; |
| | | import com.doumee.dao.vo.DriverOrderDetailVO; |
| | | import com.doumee.core.utils.jpush.JPushUtil; |
| | | import com.doumee.service.business.DriverInfoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | return ApiResponse.success(driverInfoService.checkDriverToken(token)); |
| | | } |
| | | |
| | | @LoginDriverRequired |
| | | @ApiOperation("注册极光推送别名") |
| | | @PostMapping("/registerJpushAlias") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "司机token值", required = true) |
| | | }) |
| | | public ApiResponse registerJpushAlias(@RequestParam String jpushAlias) { |
| | | driverInfoService.registerJpushAlias(this.getDriverId(), jpushAlias); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | @ApiOperation("极光推送测试") |
| | | @GetMapping("/testJpush") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "title", value = "通知标题", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "content", value = "通知内容", required = true) |
| | | }) |
| | | public ApiResponse<Boolean> testJpush(@RequestParam String telephone, @RequestParam String title, @RequestParam String content) { |
| | | boolean result = JPushUtil.sendByAlias(org.springframework.util.DigestUtils.md5DigestAsHex(telephone.getBytes()), title, content, null); |
| | | return ApiResponse.success("推送" + (result ? "成功" : "失败"), result); |
| | | } |
| | | |
| | | } |