用户故障上报分页查询
This commit is contained in:
parent
876fde6aed
commit
930e49bcd3
@ -1,6 +1,5 @@
|
|||||||
package com.cdzy.user.controller;
|
package com.cdzy.user.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
|
||||||
import com.cdzy.common.model.request.PageParam;
|
import com.cdzy.common.model.request.PageParam;
|
||||||
import com.cdzy.common.model.response.JsonResult;
|
import com.cdzy.common.model.response.JsonResult;
|
||||||
import com.cdzy.user.model.dto.EbikeFaultReportDto;
|
import com.cdzy.user.model.dto.EbikeFaultReportDto;
|
||||||
@ -114,14 +113,14 @@ public class EbikeFaultReportController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户id查询用户故障上报信息
|
* 根据用户id分页查询用户故障上报信息
|
||||||
*
|
*
|
||||||
* @param pageParam 分页参数
|
* @param pageParam 分页参数
|
||||||
*/
|
*/
|
||||||
@PostMapping("queryFaultReportByUserId")
|
@GetMapping("queryFaultReportByUserId")
|
||||||
public JsonResult<?> getFaultListByWeChatUser(PageParam pageParam) {
|
public JsonResult<?> getFaultListByWeChatUser(@RequestParam("userId") Long userId, PageParam pageParam) {
|
||||||
QueryWrapper queryWrapper = QueryWrapper.create()
|
QueryWrapper queryWrapper = QueryWrapper.create()
|
||||||
.where(EBIKE_FAULT_REPORT.CREATE_BY.eq(StpUtil.getLoginIdAsLong()));
|
.where(EBIKE_FAULT_REPORT.CREATE_BY.eq(userId));
|
||||||
Page<EbikeFaultReport> page = ebikeFaultReportService.page(pageParam.getPage(), queryWrapper);
|
Page<EbikeFaultReport> page = ebikeFaultReportService.page(pageParam.getPage(), queryWrapper);
|
||||||
return JsonResult.success(page);
|
return JsonResult.success(page);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.mybatisflex.annotation.Column;
|
import com.mybatisflex.annotation.Column;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -32,6 +33,12 @@ public class EbikeFaultReportDto {
|
|||||||
*/
|
*/
|
||||||
private Long reportId;
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "用户id不能为空")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆编号
|
* 车辆编号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -36,11 +36,10 @@ public class EbikeFaultReportVo {
|
|||||||
/**
|
/**
|
||||||
* 车辆编号
|
* 车辆编号
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "车辆编号不能为空!")
|
|
||||||
private String bikeCode;
|
private String bikeCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* operatorId
|
* 运营商id
|
||||||
*/
|
*/
|
||||||
private Long operatorId;
|
private Long operatorId;
|
||||||
|
|
||||||
|
|||||||
@ -71,6 +71,7 @@ public class EbikeFaultReportServiceImpl extends ServiceImpl<EbikeFaultReportMap
|
|||||||
.location(ebikeFaultReportDto.getLocation())
|
.location(ebikeFaultReportDto.getLocation())
|
||||||
.orderId(ebikeFaultReportDto.getOrderId())
|
.orderId(ebikeFaultReportDto.getOrderId())
|
||||||
.reviewId(ebikeFaultReportDto.getReviewId())
|
.reviewId(ebikeFaultReportDto.getReviewId())
|
||||||
|
.createBy(ebikeFaultReportDto.getUserId())
|
||||||
.build();
|
.build();
|
||||||
this.save(userFaultReport);
|
this.save(userFaultReport);
|
||||||
// 保存附件信息
|
// 保存附件信息
|
||||||
@ -162,7 +163,7 @@ public class EbikeFaultReportServiceImpl extends ServiceImpl<EbikeFaultReportMap
|
|||||||
.location(ebikeFaultReportDto.getLocation())
|
.location(ebikeFaultReportDto.getLocation())
|
||||||
.orderId(ebikeFaultReportDto.getOrderId())
|
.orderId(ebikeFaultReportDto.getOrderId())
|
||||||
.reviewId(ebikeFaultReportDto.getReviewId())
|
.reviewId(ebikeFaultReportDto.getReviewId())
|
||||||
//.updateBy(userId)
|
.updateBy(ebikeFaultReportDto.getUserId())
|
||||||
.build();
|
.build();
|
||||||
this.updateById(userFaultReport);
|
this.updateById(userFaultReport);
|
||||||
List<EbikeAttachmentFileDto> attachmentFiles = ebikeFaultReportDto.getAttachmentFiles();
|
List<EbikeAttachmentFileDto> attachmentFiles = ebikeFaultReportDto.getAttachmentFiles();
|
||||||
|
|||||||
@ -395,7 +395,7 @@ CREATE TABLE "public"."ebike_refund_file" (
|
|||||||
"is_deleted" bool NOT NULL DEFAULT false
|
"is_deleted" bool NOT NULL DEFAULT false
|
||||||
);
|
);
|
||||||
COMMENT ON COLUMN "public"."ebike_attachment_file"."file_id" IS '主键ID';
|
COMMENT ON COLUMN "public"."ebike_attachment_file"."file_id" IS '主键ID';
|
||||||
COMMENT ON COLUMN "public"."ebike_attachment_file"."report_id" IS '退款主键id';
|
COMMENT ON COLUMN "public"."ebike_attachment_file"."refund_id" IS '退款主键id';
|
||||||
COMMENT ON COLUMN "public"."ebike_attachment_file"."file_name" IS '附件文件名';
|
COMMENT ON COLUMN "public"."ebike_attachment_file"."file_name" IS '附件文件名';
|
||||||
COMMENT ON COLUMN "public"."ebike_attachment_file"."file_type" IS '附件类型';
|
COMMENT ON COLUMN "public"."ebike_attachment_file"."file_type" IS '附件类型';
|
||||||
COMMENT ON COLUMN "public"."ebike_attachment_file"."file_url" IS '附件地址';
|
COMMENT ON COLUMN "public"."ebike_attachment_file"."file_url" IS '附件地址';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user