提交 3fcac4c3 作者: panda

服务订单接口-状态字典表开发

上级 d1768d83
......@@ -5,9 +5,11 @@ import com.mmc.oms.common.publicinterface.Create;
import com.mmc.oms.common.publicinterface.Page;
import com.mmc.oms.common.result.ResultBody;
import com.mmc.oms.controller.BaseController;
import com.mmc.oms.model.dto.mall.ServiceOrderStatusInfoDTO;
import com.mmc.oms.model.dto.mall.ServiceOrderTaskDTO;
import com.mmc.oms.model.qo.mall.ServiceOrderTaskQO;
import com.mmc.oms.model.vo.mall.ServiceOrderTaskVO;
import com.mmc.oms.service.mall.ServiceOrderStatusInfoService;
import com.mmc.oms.service.mall.ServiceOrderTaskService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -31,6 +33,8 @@ public class ServiceOrderTaskController extends BaseController {
@Autowired
private ServiceOrderTaskService serviceOrderTaskService;
@Autowired
private ServiceOrderStatusInfoService serviceOrderStatusInfoService;
@ApiOperation(value = "服务订单任务-新增")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
......@@ -54,5 +58,12 @@ public class ServiceOrderTaskController extends BaseController {
public ResultBody<ServiceOrderTaskDTO> queryOrderTask(@ApiParam("订单服务id") @RequestParam(value = "id") Integer id, HttpServletRequest request) {
return serviceOrderTaskService.queryById(id,request);
}
@ApiOperation(value = "获取服务订单状态字典表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceOrderStatusInfoDTO.class)})
@PostMapping("getServiceOrderStatus")
public ResultBody<ServiceOrderStatusInfoDTO> getServiceOrderStatus() {
return ResultBody.success(serviceOrderStatusInfoService.getServiceOrderStatus());
}
}
......@@ -3,6 +3,7 @@ package com.mmc.oms.entity.mall;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......@@ -27,18 +28,17 @@ public class ServiceOrderStatusInfoDO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer orderStatus;
private String doing;
private String waiting;
@ApiModelProperty(value = "用户端状态描述")
private String userPort;
@ApiModelProperty(value = "飞手端状态描述")
private String flyerPort;
@ApiModelProperty(value = "后台端状态描述")
private String managePort;
}
......@@ -43,7 +43,7 @@ public class ServiceOrderTaskDO implements Serializable {
@ApiModelProperty(value = "订单总金额")
private BigDecimal orderAmt;
@ApiModelProperty(value = "订单状态:0 待分配运营")
@ApiModelProperty(value = "订单状态,目前有用户端,飞手端,平台端")
private Integer orderStatus;
@ApiModelProperty(value = "客户ID")
......
package com.mmc.oms.model.dto.mall;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* <p>
* 服务订单状态
* </p>
*
* @author Pika
* @since 2023-06-10
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ServiceOrderStatusInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer orderStatus;
@ApiModelProperty(value = "用户端状态描述")
private String userPort;
@ApiModelProperty(value = "飞手端状态描述")
private String flyerPort;
@ApiModelProperty(value = "后台端状态描述")
private String managePort;
}
......@@ -40,6 +40,9 @@ public class ServiceOrderTaskDTO implements Serializable {
@ApiModelProperty(value = "订单总金额")
private BigDecimal orderAmt;
@ApiModelProperty(value = "订单状态,目前有用户端,飞手端,平台端")
private Integer orderStatus;
@ApiModelProperty(value = "手机号")
private String phoneNum;
......
package com.mmc.oms.service.mall;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mmc.oms.entity.mall.ServiceOrderStatusInfoDO;
import com.mmc.oms.model.dto.mall.ServiceOrderStatusInfoDTO;
import java.util.List;
/**
* <p>
* 服务订单状态 服务类
* </p>
*
* @author Pika
* @since 2023-06-11
*/
public interface ServiceOrderStatusInfoService extends IService<ServiceOrderStatusInfoDO> {
List<ServiceOrderStatusInfoDTO> getServiceOrderStatus();
}
package com.mmc.oms.service.mall.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.mmc.oms.dao.mall.ServiceOrderStatusInfoDao;
import com.mmc.oms.entity.mall.ServiceOrderStatusInfoDO;
import com.mmc.oms.model.dto.mall.ServiceOrderStatusInfoDTO;
import com.mmc.oms.service.mall.ServiceOrderStatusInfoService;
import com.mmc.oms.util.BeanCopyUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
* 服务订单状态 服务实现类
* </p>
*
* @author Pika
* @since 2023-06-11
*/
@Service
public class ServiceOrderStatusInfoServiceImpl extends ServiceImpl<ServiceOrderStatusInfoDao, ServiceOrderStatusInfoDO> implements ServiceOrderStatusInfoService {
@Override
public List<ServiceOrderStatusInfoDTO> getServiceOrderStatus() {
List<ServiceOrderStatusInfoDO> statusInfoDOS = this.list();
if (CollectionUtils.isEmpty(statusInfoDOS)){
return Lists.newArrayList();
}
return statusInfoDOS.stream().map(d->BeanCopyUtils.properties(d,new ServiceOrderStatusInfoDTO())).collect(Collectors.toList());
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论