提交 465ed44f authored 作者: 马路路's avatar 马路路

配置中心—配置管理—问卷配置App端接口

上级 a4c1e1d4
...@@ -2,9 +2,18 @@ package com.clx.performance.vo.pc.collect; ...@@ -2,9 +2,18 @@ package com.clx.performance.vo.pc.collect;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@Schema(description = "收集司机拉运意向选项")
@Getter
@Setter
@ToString
@NoArgsConstructor
public class CarrierDriverCollectTransportIntentionRecordVO { public class CarrierDriverCollectTransportIntentionRecordVO {
private Integer id; private Integer id;
......
package com.clx.performance.vo.pc.collect; package com.clx.performance.vo.pc.collect;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import java.time.LocalDateTime;
import java.util.List;
@Schema(description = "收集司机拉运意向问题")
@Getter
@Setter
@ToString
@NoArgsConstructor
public class CarrierDriverCollectTransportIntentionVO { public class CarrierDriverCollectTransportIntentionVO {
private Integer id;
@Schema(description="排序编号")
private Integer sortNo;
@Schema(description="问题名称")
private String collectName;
@Schema(description="问题描述")
private String collectDescribe;
@Schema(description="状态:1单选 2多选")
private Integer collectCheckType;
@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<CarrierDriverCollectTransportIntentionRecordVO> collectIntentionRecordList;
} }
package com.clx.performance.controller.app.collect;
import com.clx.performance.param.app.collect.CarrierDriverCollectTransportIntentionParam;
import com.clx.performance.service.collect.CollectDriverTransportIntentionService;
import com.clx.performance.service.collect.DriverTransportIntentionInfoService;
import com.clx.performance.vo.pc.collect.CarrierDriverCollectTransportIntentionVO;
import com.msl.common.base.PageData;
import com.msl.common.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@Slf4j
@RestController
@RequestMapping(value="/app/collect/intention")
@Validated
@Tag(name = "承运司机端-拉运意愿")
@AllArgsConstructor
public class AppCarrierDriverCollectTransportIntentionController {
private final DriverTransportIntentionInfoService driverTransportIntentionInfoService;
private final CollectDriverTransportIntentionService collectDriverTransportIntentionService;
@Operation(summary = "获取已配置的拉运意愿列表",description = "<br>By:马路路")
@PostMapping("/getList")
Result<PageData<CarrierDriverCollectTransportIntentionVO>> getList(@RequestBody CarrierDriverCollectTransportIntentionParam param) {
return Result.ok();
}
@Operation(summary = "保存已勾选拉运意愿",description = "<br>By:马路路")
@PostMapping("/getList")
Result<PageData<CarrierDriverCollectTransportIntentionVO>> saveCheckedList(@RequestBody CarrierDriverCollectTransportIntentionParam param) {
return Result.ok();
}
}
...@@ -18,4 +18,6 @@ public interface CollectDriverTransportIntentionDao extends BaseDao<CollectDrive ...@@ -18,4 +18,6 @@ public interface CollectDriverTransportIntentionDao extends BaseDao<CollectDrive
IPage<CollectDriverTransportIntention> listByCondition(CarrierDriverCollectTransportIntentionParam param); IPage<CollectDriverTransportIntention> listByCondition(CarrierDriverCollectTransportIntentionParam param);
List<CollectDriverTransportIntention> listEnableInfo();
} }
package com.clx.performance.dao.collect;
import com.clx.performance.mapper.collect.DriverTransportIntentionInfoMapper;
import com.clx.performance.model.collect.DriverTransportIntentionInfo;
import com.msl.common.dao.BaseDao;
/**
* @author kavin
* Date 2024-10-18
* Time 18:03
*/
public interface DriverTransportIntentionInfoDao extends BaseDao<DriverTransportIntentionInfoMapper, DriverTransportIntentionInfo, Integer> {
}
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.performance.dao.collect.CollectDriverTransportIntentionDao; import com.clx.performance.dao.collect.CollectDriverTransportIntentionDao;
import com.clx.performance.enums.collect.CollectDriverTransportIntentionEnum;
import com.clx.performance.mapper.collect.CollectDriverTransportIntentionMapper; import com.clx.performance.mapper.collect.CollectDriverTransportIntentionMapper;
import com.clx.performance.model.collect.CollectDriverTransportIntention; import com.clx.performance.model.collect.CollectDriverTransportIntention;
import com.clx.performance.model.collect.CollectDriverTransportIntentionRecord; import com.clx.performance.model.collect.CollectDriverTransportIntentionRecord;
...@@ -33,4 +34,15 @@ public class CollectDriverTransportIntentionDaoImpl extends BaseDaoImpl<CollectD ...@@ -33,4 +34,15 @@ public class CollectDriverTransportIntentionDaoImpl extends BaseDaoImpl<CollectD
query.orderByDesc(CollectDriverTransportIntention::getId); query.orderByDesc(CollectDriverTransportIntention::getId);
return baseMapper.selectPage(Page.of(param.getPage(), param.getPageSize()), query); return baseMapper.selectPage(Page.of(param.getPage(), param.getPageSize()), query);
} }
@Override
public List<CollectDriverTransportIntention> listEnableInfo() {
LambdaQueryWrapper<CollectDriverTransportIntention> query = new LambdaQueryWrapper<>();
// 启用状态
query.eq(CollectDriverTransportIntention::getStatus,
CollectDriverTransportIntentionEnum.StatusType.STATUS_ENABLE.getCode());
// 按照排序编号降序
query.orderByDesc(CollectDriverTransportIntention::getSortNo);
return baseMapper.selectList(query);
}
} }
package com.clx.performance.dao.impl.collect;
import com.msl.common.dao.impl.BaseDaoImpl;
import com.clx.performance.dao.DriverTransportIntentionInfoDao;
import com.clx.performance.mapper.DriverTransportIntentionInfoMapper;
import com.clx.performance.model.DriverTransportIntentionInfo;
import org.springframework.stereotype.Repository;
/**
* @author kavin
* Date 2024-10-18
* Time 18:03
*/
@Repository
public class DriverTransportIntentionInfoDaoImpl extends BaseDaoImpl<DriverTransportIntentionInfoMapper, DriverTransportIntentionInfo, Integer> implements DriverTransportIntentionInfoDao {
}
package com.clx.performance.mapper.collect;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.clx.performance.model.collect.DriverTransportIntentionInfo;
/**
* @author kavin
* Date 2024-10-18
* Time 18:03
*/
public interface DriverTransportIntentionInfoMapper extends BaseMapper<DriverTransportIntentionInfo> {
}
package com.clx.performance.model.collect;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.msl.common.config.KeyColumn;
import com.msl.common.model.HasKey;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @author kavin
* Date 2024-10-18
* Time 18:03
*/
@Getter
@Setter
@Accessors(chain = true)
@TableName("driver_transport_intention_info")
public class DriverTransportIntentionInfo implements HasKey<Integer> {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@TableField("create_user_no")
@Schema(description="操作人编码")
private Long createUserNo;
@TableField("create_user_name")
@Schema(description="操作人")
private String createUserName;
@TableField("collect_transport_intention_id")
@Schema(description="选项排序编号")
private Integer collectTransportIntentionId;
@TableField("collect_transport_intention_record_id")
@Schema(description="选项名称")
private Integer collectTransportIntentionRecordId;
@TableField("create_time")
@Schema(description="创建时间")
private LocalDateTime createTime;
@TableField("modified_time")
@Schema(description="修改时间")
private LocalDateTime modifiedTime;
@Override
@KeyColumn("id")
public Integer gainKey() {
return this.id;
}
}
...@@ -24,4 +24,6 @@ public interface CollectDriverTransportIntentionService { ...@@ -24,4 +24,6 @@ public interface CollectDriverTransportIntentionService {
IPage<CarrierDriverCollectTransportIntentionVO> listCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionParam param); IPage<CarrierDriverCollectTransportIntentionVO> listCarrierDriverCollectTransportIntention(CarrierDriverCollectTransportIntentionParam param);
List<CarrierDriverCollectTransportIntentionRecordVO> detailCarrierDriverCollectTransportIntention(Integer param); List<CarrierDriverCollectTransportIntentionRecordVO> detailCarrierDriverCollectTransportIntention(Integer param);
IPage<CarrierDriverCollectTransportIntentionVO> listCarrierDriverCollectTransportIntentionAll();
} }
package com.clx.performance.service.collect;
/**
* @author kavin
* Date 2024-10-18
* Time 18:03
*/
public interface DriverTransportIntentionInfoService {
}
...@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author kavin * @author kavin
...@@ -166,4 +167,18 @@ public class CollectDriverTransportIntentionServiceImpl implements CollectDriver ...@@ -166,4 +167,18 @@ public class CollectDriverTransportIntentionServiceImpl implements CollectDriver
List<CarrierDriverCollectTransportIntentionRecordVO> listVO = collectDriverTransportIntentionRecordDaoStruct.covertList(list); List<CarrierDriverCollectTransportIntentionRecordVO> listVO = collectDriverTransportIntentionRecordDaoStruct.covertList(list);
return listVO; return listVO;
} }
@Override
public IPage<CarrierDriverCollectTransportIntentionVO> listCarrierDriverCollectTransportIntentionAll() {
// 1.查询所有
List<CollectDriverTransportIntention> list = collectDriverTransportIntentionDao.listEnableInfo();
List<CarrierDriverCollectTransportIntentionVO> listVO = collectDriverTransportIntentionDaoStruct.covertList(list);
// 筛选主键id
List<Integer> ids = listVO.stream().map(CarrierDriverCollectTransportIntentionVO::getId).toList();
// 2.关联子表
List<CollectDriverTransportIntentionRecord> recordList = collectDriverTransportIntentionRecordDao
.listInField(CollectDriverTransportIntentionRecord::getCollectDriverTransportIntentionId, ids);
// Todo 遍历主表关联子表
return null;
}
} }
package com.clx.performance.service.impl.collect;
import com.clx.performance.service.collect.DriverTransportIntentionInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @author kavin
* Date 2024-10-18
* Time 18:03
*/
@Service
@Slf4j
public class DriverTransportIntentionInfoServiceImpl implements DriverTransportIntentionInfoService {
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论