Commit 6eb1cb86 by 林冲 Committed by 崔彦峰

refactor(carcondition): 移除车况控制器的Spring注解

- 删除了 @RestController 注解
- 删除了 @PostMapping 注解
- 将方法注解改为注释形式,保留业务逻辑实现
1 parent 0bd515bc
package cn.com.glsx.stoassistant.controller.carcondition;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.scrm.system.model.wechatapplets.LoginUserInfoResponse;
import cn.com.glsx.stoassistant.request.carcondition.CarConditionPadPageRequest;
import cn.com.glsx.stoassistant.response.carcondition.CarConditionPageVO;
import cn.com.glsx.stoassistant.service.cardition.CarConditionService;
import cn.com.glsx.stoassistant.utils.Pagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.oreframework.boot.autoconfigure.rop.util.RopThreadLocal;
import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@Api("车况管理")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
//@RestController
public class CarConditionController {
@Autowired
private CarConditionService carConditionService;
@ApiOperation("PAD端车况分页查询")
@ServiceMethod(method = "scrm.api.stoassistant.carCondition.page", needInSession = NeedInSessionType.YES)
// @PostMapping("/scrm.api.stoassistant.carCondition.page/1.0.0")
public RopResponse<Pagination<CarConditionPageVO>> page(CarConditionPadPageRequest request) {
try {
if (request == null) {
return RopResponse.error("参数不能为空");
}
if (StringUtils.isBlank(request.getOperatorId())) {
LoginUserInfoResponse loginUser = RopThreadLocal.getLoginUser(LoginUserInfoResponse.class);
request.setOperatorId(loginUser.getUuid());
}
return carConditionService.page(request);
} catch (Exception e) {
log.error("PAD端车况分页查询失败", e);
return RopResponse.error(e.getMessage());
}
}
// @ApiOperation("PAD端车况详情接口")
// @ServiceMethod(method = "scrm.api.stoassistant.carCondition.detail", needInSession = NeedInSessionType.YES)
// @PostMapping("/scrm.api.stoassistant.carCondition.detail/1.0.0")
// public RopResponse<CarConditionPadDetailVO> detail(CarConditionDetailRequest request) {
// try {
// if (request == null || request.getId() == null) {
// return RopResponse.error("车况唯一ID不能为空");
// }
// return carConditionService.detail(request);
// } catch (Exception e) {
// log.error("PAD端车况详情接口失败", e);
// return RopResponse.error(e.getMessage());
// }
// }
//
//
// @ApiOperation("新增车况录入")
// @ServiceMethod(method = "scrm.api.stoassistant.carCondition.add", needInSession = NeedInSessionType.YES)
// public RopResponse<Integer> add(CarConditionAddRequest request) {
// try {
// if (request == null || request.getSource() == null) {
// return RopResponse.error("车况来源不能为空");
// }
// return carConditionService.add(request);
// } catch (Exception e) {
// log.error("新增车况录入失败", e);
// return RopResponse.error(e.getMessage());
// }
//
// }
//
// @ApiOperation("编辑车况录入")
// @ServiceMethod(method = "scrm.api.stoassistant.carCondition.edit", needInSession = NeedInSessionType.YES)
// public RopResponse<Integer> edit(CarConditionEditRequest request) {
// try {
// if (request == null || request.getId() == null) {
// return RopResponse.error("车况唯一ID不能为空");
// }
// if (request.getSource() == null) {
// return RopResponse.error("车况来源不能为空");
// }
// return carConditionService.edit(request);
// } catch (Exception e) {
// log.error("编辑车况录入失败", e);
// return RopResponse.error(e.getMessage());
// }
// }
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.stoassistant.request.carcondition;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* PAD端车况新增请求
*/
@Data
public class CarConditionAddRequest extends AbstractRopRequest implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "车主姓名")
private String ownerName;
@ApiModelProperty(notes = "车牌号")
private String licensePlate;
@ApiModelProperty(notes = "车架号")
private String vin;
@ApiModelProperty(notes = "上牌时间(注册日期)")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date registrationDate;
@ApiModelProperty(notes = "销售用户id(4S店)")
private String sellerUserId;
@ApiModelProperty(notes = "销售姓名(4S店)")
private String sellerName;
@ApiModelProperty(notes = "销售商户号(4S店)")
private Integer sellerMerchantId;
@ApiModelProperty(notes = "销售(4S店)商户名称")
private String sellerMerchantName;
@ApiModelProperty(notes = "转化用户id(园区店)")
private String conversionUserId;
@ApiModelProperty(notes = "转化姓名(园区店)")
private String conversionName;
@ApiModelProperty(notes = "转化商户号(园区店)")
private Integer conversionMerchantId;
@ApiModelProperty(notes = "转化(园区店)商户名称")
private String conversionMerchantName;
@ApiModelProperty(notes = "行驶证图片URL")
private String drivingLicenseImgUrl;
@ApiModelProperty(notes = "铭牌图片URL")
private String nameplateImgUrl;
@ApiModelProperty(notes = "左前45度图片URL")
private String leftFrontImgUrl;
@ApiModelProperty(notes = "右前45度图片URL")
private String rightFrontImgUrl;
@ApiModelProperty(notes = "仪表公里数图片URL")
private String mileageImgUrl;
@ApiModelProperty(notes = "中控台全景图片URL")
private String centerConsoleImgUrl;
@ApiModelProperty(notes = "主驾全景图片URL")
private String driverSeatImgUrl;
@ApiModelProperty(notes = "后排全景图片URL")
private String rearSeatImgUrl;
@ApiModelProperty(notes = "其他细节图片URL")
private String otherDetailImgUrl;
@ApiModelProperty(notes = "车况描述")
private String conditionDescription;
@ApiModelProperty(notes = "录入状态:0-草稿(信息待补全),1-已提交(已录入)")
private Integer entryStatus;
@ApiModelProperty(notes = "车况单来源 1-展业助手app 2-生意助手员工版小程序 3-车生活助手小程序")
private Integer source;
@ApiModelProperty(notes = "小程序openId")
private String openId;
@ApiModelProperty(notes = "操作人手机号")
private String phone;
@ApiModelProperty(notes = "操作人姓名")
private String operator;
@ApiModelProperty(notes = "操作人id")
private String operatorId;
@ApiModelProperty(notes = "操作人所在门店id")
private Integer merchantId;
@ApiModelProperty(notes = "操作人所在门店名称")
private String merchantName;
}
package cn.com.glsx.stoassistant.request.carcondition;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@Data
@Schema(description = "车况详情查询请求")
public class CarConditionDetailRequest extends AbstractRopRequest implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(name = "id",notes = "主键id")
private Integer id;
}
package cn.com.glsx.stoassistant.request.carcondition;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* PAD端车况编辑请求
*/
@Data
public class CarConditionEditRequest extends AbstractRopRequest implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "主键id")
private Integer id;
@ApiModelProperty(notes = "车主姓名")
private String ownerName;
@ApiModelProperty(notes = "车牌号")
private String licensePlate;
@ApiModelProperty(notes = "车架号")
private String vin;
@ApiModelProperty(notes = "上牌时间(注册日期)")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date registrationDate;
@ApiModelProperty(notes = "销售用户id(4S店)")
private String sellerUserId;
@ApiModelProperty(notes = "销售姓名(4S店)")
private String sellerName;
@ApiModelProperty(notes = "销售商户号(4S店)")
private Integer sellerMerchantId;
@ApiModelProperty(notes = "销售(4S店)商户名称")
private String sellerMerchantName;
@ApiModelProperty(notes = "转化用户id(园区店)")
private String conversionUserId;
@ApiModelProperty(notes = "转化姓名(园区店)")
private String conversionName;
@ApiModelProperty(notes = "转化商户号(园区店)")
private Integer conversionMerchantId;
@ApiModelProperty(notes = "转化(园区店)商户名称")
private String conversionMerchantName;
@ApiModelProperty(notes = "行驶证图片URL")
private String drivingLicenseImgUrl;
@ApiModelProperty(notes = "铭牌图片URL")
private String nameplateImgUrl;
@ApiModelProperty(notes = "左前45度图片URL")
private String leftFrontImgUrl;
@ApiModelProperty(notes = "右前45度图片URL")
private String rightFrontImgUrl;
@ApiModelProperty(notes = "仪表公里数图片URL")
private String mileageImgUrl;
@ApiModelProperty(notes = "中控台全景图片URL")
private String centerConsoleImgUrl;
@ApiModelProperty(notes = "主驾全景图片URL")
private String driverSeatImgUrl;
@ApiModelProperty(notes = "后排全景图片URL")
private String rearSeatImgUrl;
@ApiModelProperty(notes = "其他细节图片URL")
private String otherDetailImgUrl;
@ApiModelProperty(notes = "车况描述")
private String conditionDescription;
@ApiModelProperty(notes = "录入状态:0-草稿(信息待补全),1-已提交(已录入)")
private Integer entryStatus;
@ApiModelProperty(notes = "操作人姓名")
private String operator;
@ApiModelProperty(notes = "操作人id")
private String operatorId;
@ApiModelProperty(notes = "操作人所在门店id")
private Integer merchantId;
@ApiModelProperty(notes = "操作人所在门店名称")
private String merchantName;
@ApiModelProperty(notes = "车况单来源 1-展业助手app 2-生意助手员工版小程序 3-车生活助手小程序")
private Integer source;
@ApiModelProperty(notes = "小程序openId")
private String openId;
}
package cn.com.glsx.stoassistant.request.carcondition;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* PAD端车况分页查询请求
*/
@Data
public class CarConditionPadPageRequest extends AbstractRopRequest implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "录入状态:0-草稿(信息待补全),1-已提交(已录入)")
private Integer entryStatus;
@Schema(description = "操作人id")
private String operatorId;
@ApiModelProperty(notes = "当前页")
private long currentPage = 1;
@ApiModelProperty(notes = "每页数量")
private long pageSize = 10;
}
package cn.com.glsx.stoassistant.response.carcondition;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* PAD端车况详情VO
*/
@Data
@Schema(description = "PAD端车况详情VO")
public class CarConditionPadDetailVO implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "主键id")
private Integer id;
@Schema(description = "车况编码")
private String carConditionCode;
@Schema(description = "车主姓名")
private String ownerName;
@Schema(description = "销售用户id(4S店)")
private String sellerUserId;
@Schema(description = "销售姓名(4S店)")
private String sellerName;
@Schema(description = "行驶证图片URL")
private String drivingLicenseImgUrl;
@Schema(description = "铭牌图片URL")
private String nameplateImgUrl;
@Schema(description = "左前45度图片URL")
private String leftFrontImgUrl;
@Schema(description = "右前45度图片URL")
private String rightFrontImgUrl;
@Schema(description = "仪表公里数图片URL")
private String mileageImgUrl;
@Schema(description = "中控台全景图片URL")
private String centerConsoleImgUrl;
@Schema(description = "主驾全景图片URL")
private String driverSeatImgUrl;
@Schema(description = "后排全景图片URL")
private String rearSeatImgUrl;
@Schema(description = "其他细节图片URL")
private String otherDetailImgUrl;
@Schema(description = "车况描述")
private String conditionDescription;
@Schema(description = "录入状态:0-草稿(信息待补全),1-已提交(已录入)")
private Integer entryStatus;
}
package cn.com.glsx.stoassistant.response.carcondition;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@Schema(description = "PAD端车况分页查询返回结果")
public class CarConditionPageVO implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "主键id")
private Integer id;
@Schema(description = "车主姓名")
private String ownerName;
@Schema(description = "车牌号")
private String licensePlate;
@Schema(description = "录入时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date entryTime;
@Schema(description = "录入状态:0-草稿(信息待补全),1-已提交(已录入)")
private Integer entryStatus;
@Schema(description = "左前45度图片URL")
private String leftFrontImgUrl;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!