提交 23ebe719 authored 作者: 马路路's avatar 马路路

配置中心—配置管理—问卷配置WEB端接口--启用/禁用接口更新

上级 7d324914
package com.clx.performance.controller.pc.collect;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.param.app.collect.CarrierDriverCollectTransportIntentionDetailParam;
import com.clx.performance.param.app.collect.CarrierDriverCollectTransportIntentionEnableParam;
import com.clx.performance.param.app.collect.CarrierDriverCollectTransportIntentionListParam;
import com.clx.performance.param.app.collect.CarrierDriverCollectTransportIntentionParam;
import com.clx.performance.param.app.collect.*;
import com.clx.performance.service.collect.CollectDriverTransportIntentionService;
import com.clx.performance.vo.pc.collect.CarrierDriverCollectTransportIntentionRecordVO;
import com.clx.performance.vo.pc.collect.CarrierDriverCollectTransportIntentionVO;
......@@ -31,14 +28,14 @@ public class CarrierDriverCollectTransportIntentionController {
@Operation(summary = "新增", description = "<br>By:马路路")
@PostMapping("/add")
public Result<Object> saveCarrierDriverCollectTransportIntention(@RequestBody @Validated CarrierDriverCollectTransportIntentionParam param) {
public Result<Object> saveCarrierDriverCollectTransportIntention(@RequestBody @Validated CarrierDriverCollectTransportIntentionAddParam param) {
collectDriverTransportIntentionService.saveCarrierDriverCollectTransportIntention(param);
return Result.ok();
}
@Operation(summary = "编辑更新", description = "<br>By:马路路")
@PostMapping("/update")
public Result<Object> updateCarrierDriverCollectTransportIntention(@RequestBody @Validated CarrierDriverCollectTransportIntentionParam param) {
public Result<Object> updateCarrierDriverCollectTransportIntention(@RequestBody @Validated CarrierDriverCollectTransportIntentionEditParam param) {
collectDriverTransportIntentionService.updateCarrierDriverCollectTransportIntention(param);
return Result.ok();
}
......
......@@ -13,9 +13,9 @@ import java.util.List;
* Time 16:26
*/
public interface CollectDriverTransportIntentionService {
Integer saveCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionParam param);
Integer saveCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionAddParam param);
Integer updateCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionParam param);
Integer updateCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionEditParam param);
Integer enableCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionEnableParam param);
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.performance.dao.collect.CollectDriverTransportIntentionDao;
import com.clx.performance.dao.collect.CollectDriverTransportIntentionRecordDao;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.ResultEnum;
import com.clx.performance.enums.collect.CollectDriverTransportIntentionEnum;
import com.clx.performance.model.collect.CollectDriverTransportIntention;
......@@ -44,11 +45,10 @@ public class CollectDriverTransportIntentionServiceImpl implements CollectDriver
@Override
@Transactional(rollbackFor = Exception.class)
public Integer saveCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionParam param) {
public Integer saveCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionAddParam param) {
if (Objects.isNull(param) || param.getCollectIntentionRecordList().isEmpty()) {
// Todo 提示信息
return 0;
throw new ServiceSystemException(PerformanceResultEnum.DATA_NOT_FIND);
}
CollectDriverTransportIntention collectDriverTransportIntention = new CollectDriverTransportIntention();
......@@ -97,10 +97,9 @@ public class CollectDriverTransportIntentionServiceImpl implements CollectDriver
@Override
@Transactional(rollbackFor = Exception.class)
public Integer updateCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionParam param) {
public Integer updateCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionEditParam param) {
if (Objects.isNull(param) || param.getCollectIntentionRecordList().isEmpty()) {
// Todo 提示信息
return 0;
throw new ServiceSystemException(PerformanceResultEnum.DATA_NOT_FIND);
}
// 1.修改主表信息
CollectDriverTransportIntention updateCollectDriverTransportIntention = new CollectDriverTransportIntention();
......@@ -150,7 +149,7 @@ public class CollectDriverTransportIntentionServiceImpl implements CollectDriver
// todo
}
Set<Integer> paramsIds = param.stream()
.map(CarrierDriverCollectTransportIntentionDetailParam::getCollectDriverTransportIntentionId)
.map(CarrierDriverCollectTransportIntentionDetailParam::getId)
.collect(Collectors.toSet());
// 1.删除主表信息
......
package com.clx.performance.param.app.collect;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.List;
@Getter
@Setter
@NoArgsConstructor
public class CarrierDriverCollectTransportIntentionAddParam {
@Schema(description = "id", example = "123")
private Integer id;
@Schema(description="排序编号")
private Integer sortNo;
@Schema(description="问题名称")
@Size(max = 10, message = "问题名称长度不能超过10")
private String collectName;
@Size(max = 20, message = "问题描述长度不能超过20")
@Schema(description="问题描述")
private String collectDescribe;
@NotBlank(message = "选择设置不能为空")
@Schema(description="状态:1单选 2多选")
private Integer collectCheckType;
@NotBlank(message = "类型:1拉运意向 2拒绝拉运原因,类型不能为空")
@Schema(description="状态:1拉运意向 2拒绝拉运")
private Integer collectType;
@Schema(description="操作人编码")
private Long createUserNo;
@Schema(description="操作人")
private String createUserName;
@Schema(description="删除状态: 0-否;1-是")
private Integer deleteStatus;
@Schema(description="状态:1启用 2禁用")
private Integer status;
@Schema(description="创建时间")
private LocalDateTime createTime;
@Schema(description="修改时间")
private LocalDateTime modifiedTime;
@Schema(description = "选项列表")
private List<CarrierDriverCollectTransportIntentionRecordParam> collectIntentionRecordList;
}
......@@ -11,5 +11,5 @@ import lombok.Setter;
public class CarrierDriverCollectTransportIntentionDetailParam {
@Schema(description="收集司机拉运意向id")
private Integer collectDriverTransportIntentionId;
private Integer id;
}
package com.clx.performance.param.app.collect;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.List;
@Getter
@Setter
@NoArgsConstructor
public class CarrierDriverCollectTransportIntentionEditParam {
@Schema(description = "id", example = "123")
private Integer id;
@Schema(description="排序编号")
private Integer sortNo;
@Schema(description="问题名称")
@Size(max = 10, message = "问题名称长度不能超过10")
private String collectName;
@Size(max = 20, message = "问题描述长度不能超过20")
@Schema(description="问题描述")
private String collectDescribe;
@NotBlank(message = "选择设置不能为空")
@Schema(description="状态:1单选 2多选")
private Integer collectCheckType;
@NotBlank(message = "类型:1拉运意向 2拒绝拉运原因,类型不能为空")
@Schema(description="状态:1拉运意向 2拒绝拉运")
private Integer collectType;
@Schema(description="操作人编码")
private Long createUserNo;
@Schema(description="操作人")
private String createUserName;
@Schema(description="删除状态: 0-否;1-是")
private Integer deleteStatus;
@Schema(description="状态:1启用 2禁用")
private Integer status;
@Schema(description="创建时间")
private LocalDateTime createTime;
@Schema(description="修改时间")
private LocalDateTime modifiedTime;
@Schema(description = "选项列表")
private List<CarrierDriverCollectTransportIntentionRecordParam> collectIntentionRecordList;
}
......@@ -9,7 +9,7 @@ import lombok.Setter;
@Setter
@NoArgsConstructor
public class CarrierDriverCollectTransportIntentionEnableParam {
@Schema(description = "id", example = "123")
@Schema(description = "收集司机拉运意向id", example = "123")
private Integer id;
@Schema(description="状态:1启用 2禁用")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论