提交 39e62018 作者: 张小凤

PlatformOrderEarningsDTO(update)

上级 fccf461b
package com.mmc.csf.infomation.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/29 13:45
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PlatformOrderEarningsDTO {
@ApiModelProperty(value = "普通置顶或者加急的金额", example = "300")
private BigDecimal orderLevelAmount;
@ApiModelProperty(value = "订单级别 REGULAR_ORDER,RUSH_ORDER,TOP_ORDER", example = "TOP_ORDER")
private String orderLevel;
@ApiModelProperty(value = "订单佣金收益", example = "100")
private BigDecimal orderAmount;
@ApiModelProperty(value = "违约金收益", example = "10")
private BigDecimal liquidatedDamages;
@ApiModelProperty(value = "需求id")
private Integer requirementsInfoId;
@ApiModelProperty(value = "创建时间")
private String createTime;
@ApiModelProperty(value = "修改时间")
private String updateTime;
}
package com.mmc.csf.infomation.dto;
import com.mmc.csf.config.IsNullConvertZero;
import com.mmc.csf.release.model.group.Insert;
import com.mmc.csf.release.model.group.Update;
import io.swagger.annotations.ApiModelProperty;
......@@ -44,6 +45,7 @@ public class ServiceOrderFormDetailsDTO {
@ApiModelProperty(value = "订单金额", example = "100")
@IsNullConvertZero
private BigDecimal orderAmount;
......@@ -63,29 +65,41 @@ public class ServiceOrderFormDetailsDTO {
private String taskAddress;
@ApiModelProperty(value = "冻结云享金", example = "100")
@IsNullConvertZero
private BigDecimal cashAmount;
// @ApiModelProperty(value = "", example = "200")
@ApiModelProperty(value = "冻结佣金(相当是冻结余额)", example = "200")
@IsNullConvertZero
private BigDecimal salaryAmount;
@ApiModelProperty(value = "冻结微信", example = "200")
@IsNullConvertZero
private BigDecimal weChat;
@ApiModelProperty(value = "订单调整后金额", example = "100")
private BigDecimal updateOrderAmount;
@ApiModelProperty(value = "抢单冻结云享金", example = "200")
@IsNullConvertZero
private BigDecimal preemptCashAmount;
@ApiModelProperty(value = "发布者电话", example = "1892994543", required = false)
private String publishPhone;
@ApiModelProperty(value = "抢单冻结余额", example = "200")
@IsNullConvertZero
private BigDecimal preemptSalaryAmount;
@ApiModelProperty(value = "抢单者电话", example = "13134311231")
private String preemptPhone;
@ApiModelProperty(value = "抢单冻结微信", example = "10")
@IsNullConvertZero
private BigDecimal preemptWeChat;
@ApiModelProperty(value = "订单当前状态", example = "进行中")
private String doing;
@ApiModelProperty(value = "1正常 2争议订单", example = "1")
private Integer orderAttribute;
@ApiModelProperty(value = "订单调整后金额", example = "100")
@IsNullConvertZero
private BigDecimal updateOrderAmount;
@ApiModelProperty(value = "平台总收益", example = "100")
@IsNullConvertZero
private BigDecimal orderEarnings;
@ApiModelProperty(value = "平台收益流水", example = "流水")
private PlatformOrderEarningsDTO orderEarningsDTO;
@ApiModelProperty(value = "需求描述")
private String requireDescription;
}
......@@ -2,6 +2,7 @@ package com.mmc.csf.release.controller;
import com.mmc.csf.common.util.web.ResultBody;
import com.mmc.csf.infomation.dto.ServiceOrderFormDTO;
import com.mmc.csf.infomation.dto.ServiceOrderFormDetailsDTO;
import com.mmc.csf.infomation.qo.ServiceOrderQO;
import com.mmc.csf.release.model.group.Page;
import com.mmc.csf.release.service.BackRequirementsService;
......@@ -37,8 +38,8 @@ public class BackRequirementsController extends BaseController {
@ApiOperation(value = "后台管理——服务订单详情")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceOrderFormDTO.class)})
@GetMapping("serviceOrderFormDetails")
public ResultBody<ServiceOrderFormDTO> serviceOrderFormDetails(HttpServletRequest request, @ApiParam(value = "需求发布id", required = true) @RequestParam Integer requirementsInfoId) {
return ResultBody.success(backRequirementsService.serviceOrderFormDetails(requirementsInfoId, this.getUserLoginInfoFromRedis(request)));
public ResultBody<ServiceOrderFormDetailsDTO> serviceOrderFormDetails(HttpServletRequest request, @ApiParam(value = "需求发布id", required = true) @RequestParam Integer requirementsInfoId) {
return backRequirementsService.serviceOrderFormDetails(requirementsInfoId, this.getUserLoginInfoFromRedis(request));
}
......
......@@ -2,6 +2,7 @@ package com.mmc.csf.release.dao;
import com.mmc.csf.infomation.qo.ServiceOrderQO;
import com.mmc.csf.release.entity.requirements.ServiceOrderFormDO;
import com.mmc.csf.release.entity.requirements.ServiceOrderFormDetailsDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
......@@ -16,4 +17,6 @@ public interface BackRequirementsDao {
List<ServiceOrderFormDO> serviceOrderFormList(ServiceOrderQO param);
int countService(ServiceOrderQO param);
ServiceOrderFormDetailsDO serviceOrderFormDetails(Integer requirementsInfoId);
}
package com.mmc.csf.release.entity.requirements;
import com.mmc.csf.infomation.dto.PlatformOrderEarningsDTO;
import com.mmc.csf.infomation.dto.ServiceOrderFormDetailsDTO;
import com.mmc.csf.release.model.group.Insert;
import com.mmc.csf.release.model.group.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/29 13:52
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceOrderFormDetailsDO {
private static final long serialVersionUID = -447951390213113317L;
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "发单时间", example = "2023-07-26 16:50:12")
private String createTime;
@ApiModelProperty(value = "服务类型id", example = "1")
@NotBlank(message = "服务类型id不能为空", groups = {Insert.class, Update.class})
private Integer serviceId;
@ApiModelProperty(value = "服务类型名称", example = "航拍摄影")
private String serviceName;
@ApiModelProperty(value = "发布者订单编号", example = "R3123132132132131")
private String publisherNumber;
@ApiModelProperty(value = "订单金额", example = "100")
private BigDecimal orderAmount;
@ApiModelProperty(value = "任务开始时间", example = "2023-07-26")
private String taskStartTime;
@ApiModelProperty(value = "任务结束时间", example = "2023-07-27")
private String taskEndTime;
@ApiModelProperty(value = "任务经度", example = "113.934559")
private Double longitude;
@ApiModelProperty(value = "任务纬度", example = "22.540366")
private Double latitude;
@ApiModelProperty(value = "任务详细地址", example = "任务详细地址")
private String taskAddress;
@ApiModelProperty(value = "冻结云享金", example = "100")
private BigDecimal cashAmount;
@ApiModelProperty(value = "冻结佣金(相当是冻结余额)", example = "200")
private BigDecimal salaryAmount;
@ApiModelProperty(value = "冻结微信", example = "200")
private BigDecimal weChat;
@ApiModelProperty(value = "抢单冻结云享金", example = "200")
private BigDecimal preemptCashAmount;
@ApiModelProperty(value = "抢单冻结余额", example = "200")
private BigDecimal preemptSalaryAmount;
@ApiModelProperty(value = "抢单冻结微信", example = "10")
private BigDecimal preemptWeChat;
@ApiModelProperty(value = "订单调整后金额", example = "100")
private BigDecimal updateOrderAmount;
@ApiModelProperty(value = "平台收益流水", example = "流水")
private PlatformOrderEarningsDTO orderEarningsDTO;
@ApiModelProperty(value = "需求描述")
private String requireDescription;
public ServiceOrderFormDetailsDTO buildOrderFormDetails() {
return ServiceOrderFormDetailsDTO.builder()
.id(this.id)
.createTime(this.createTime)
.serviceId(this.serviceId)
.serviceName(this.serviceName)
.publisherNumber(this.publisherNumber)
.orderAmount(this.orderAmount)
.taskStartTime(this.taskStartTime)
.taskEndTime(this.taskEndTime)
.taskAddress(this.taskAddress)
.latitude(this.latitude)
.longitude(this.longitude)
.cashAmount(this.cashAmount)
.salaryAmount(this.salaryAmount)
.weChat(this.weChat)
.preemptCashAmount(this.preemptCashAmount)
.preemptWeChat(this.preemptWeChat)
.preemptSalaryAmount(this.preemptSalaryAmount)
.updateOrderAmount(this.updateOrderAmount)
.requireDescription(this.requireDescription)
.orderEarningsDTO(this.orderEarningsDTO)
.build();
}
}
......@@ -2,11 +2,14 @@ package com.mmc.csf.release.service.impl;
import com.mmc.csf.common.util.page.PageResult;
import com.mmc.csf.common.util.web.ResultBody;
import com.mmc.csf.config.IsNullConvertZeroUtil;
import com.mmc.csf.infomation.dto.ServiceOrderFormDTO;
import com.mmc.csf.infomation.dto.ServiceOrderFormDetailsDTO;
import com.mmc.csf.infomation.qo.ServiceOrderQO;
import com.mmc.csf.release.auth.dto.LoginSuccessDTO;
import com.mmc.csf.release.dao.BackRequirementsDao;
import com.mmc.csf.release.entity.requirements.ServiceOrderFormDO;
import com.mmc.csf.release.entity.requirements.ServiceOrderFormDetailsDO;
import com.mmc.csf.release.service.BackRequirementsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -41,6 +44,9 @@ public class BackRequirementsServiceImpl implements BackRequirementsService {
@Override
public ResultBody serviceOrderFormDetails(Integer requirementsInfoId, LoginSuccessDTO userLoginInfoFromRedis) {
return null;
ServiceOrderFormDetailsDO orderFormDetailsDO = backRequirementsDao.serviceOrderFormDetails(requirementsInfoId);
ServiceOrderFormDetailsDTO serviceOrderFormDetailsDTO = orderFormDetailsDO.buildOrderFormDetails();
IsNullConvertZeroUtil.checkIsNull(serviceOrderFormDetailsDTO);
return ResultBody.success(serviceOrderFormDetailsDTO);
}
}
......@@ -60,4 +60,30 @@
</if>
</select>
<select id="serviceOrderFormDetails" resultType="com.mmc.csf.release.entity.requirements.ServiceOrderFormDetailsDO">
SELECT ri.id,
ri.create_time,
ri.service_id,
ri.service_name,
ri.publisher_number,
ra.order_amount,
ri.task_start_time,
ri.task_end_time,
ri.task_address,
ri.latitude,
ri.longitude,
ra.cash_amount,
ra.salary_amount,
ra.we_chat,
rs.cash_amount AS preemptCashAmount,
rs.salary_amount AS preemptSalaryAmount,
rs.we_chat AS preemptWeChat,
ra.update_order_amount AS updateOrderAmount,
ri.require_description
FROM requirements_info ri
LEFT JOIN requirements_amount ra ON ri.id = ra.requirements_info_id
LEFT JOIN requirements_service rs ON rs.requirements_info_id = ri.id
WHERE ri.id = #{requirementsInfoId}
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论