提交 c5a6ada3 作者: 余乾开

Merge branch 'develop'

<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.mmc.csf.common</groupId> <groupId>com.mmc.csf.common</groupId>
<artifactId>csf-common</artifactId> <artifactId>csf-common</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<artifactId>csf-common-model</artifactId> <artifactId>csf-common-model</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<dependencies> <dependencies>
<!-- apache 提供的一些工具类 -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency> <!-- 微信支付相关 -->
<groupId>commons-lang</groupId> <dependency>
<artifactId>commons-lang</artifactId> <groupId>com.github.wechatpay-apiv3</groupId>
<version>2.6</version> <artifactId>wechatpay-apache-httpclient</artifactId>
</dependency> <version>0.4.9</version>
</dependency>
<dependency>
<groupId>com.github.wxpay</groupId>
<artifactId>wxpay-sdk</artifactId>
<version>0.0.3</version>
</dependency>
<dependency>
<groupId>com.github.wechatpay-apiv3</groupId>
<artifactId>wechatpay-java</artifactId>
<version>0.2.10</version>
</dependency>
<!-- apache 提供的一些工具类 -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.hibernate.validator</groupId> <groupId>commons-lang</groupId>
<artifactId>hibernate-validator</artifactId> <artifactId>commons-lang</artifactId>
<version>6.0.20.Final</version> <version>2.6</version>
</dependency> </dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.20.Final</version>
</dependency>
<dependency> <dependency>
<groupId>cn.afterturn</groupId> <groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId> <artifactId>easypoi-annotation</artifactId>
......
package com.mmc.csf.config;
import java.lang.annotation.*;
/**
* @Author small
* @Date 2023/8/23 14:16
* @Version 1.0
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface IsNullConvertZero {
}
package com.mmc.csf.config;
import lombok.extern.slf4j.Slf4j;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.Objects;
/**
* @Author small
* @Date 2023/8/23 14:16
* @Version 1.0
*/
@Slf4j
public class IsNullConvertZeroUtil {
public static Object checkIsNull(Object obj) {
try {
Class<?> clazz = obj.getClass();
//获得私有的成员属性
Field[] fields = clazz.getDeclaredFields();
if (Objects.nonNull(fields) && fields.length > 0) {
for (Field field : fields) {
field.setAccessible(true);
//判断IsNullConvertZero注解是否存在
if (field.isAnnotationPresent(IsNullConvertZero.class)) {
if (Objects.isNull(field.get(obj))) {
field.set(obj, BigDecimal.ZERO);
}
}
}
}
} catch (Exception e) {
log.error("IsNullConvertZeroUtil出现异常:{}", e);
}
return obj;
}
}
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.io.Serializable;
/**
* @Author small
* @Date 2023/8/25 18:45
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FlowDictionaryAndTimeDTO implements Serializable {
@ApiModelProperty(value = "发布成功", example = "发布成功")
private ReleaseSuccessDTO releaseSuccess;
//抢单
@ApiModelProperty(value = "抢单", example = "抢单")
private RequirementsServiceDTO requirementsServiceDTO;
//抵达现场地址
// service_arrive_scene
@ApiModelProperty(value = "抵达现场", example = "抵达现场")
private ServiceArriveSceneDTO serviceArriveSceneDTO;
//完成任务
// service_fulfil_a_task
@ApiModelProperty(value = "完成任务", example = "完成任务")
private ServiceFulfilATaskDTO serviceFulfilATaskDTO;
//结算
//service_settle_accounts
@ApiModelProperty(value = "结算", example = "结算")
private ServiceSettleAccountsDTO serviceSettleAccountsDTO;
//评价
// service_evaluate
@ApiModelProperty(value = "评价", example = "评价")
private ServiceEvaluateDTO serviceEvaluateDTO;
@ApiModelProperty(value = "修改任务佣金", example = "修改任务佣金")
private RequirementsAmountUpdateDTO amountUpdate;
}
package com.mmc.csf.infomation.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author small
* @Date 2023/8/22 13:26
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FlowDictionaryDTO {
private Integer id;
@ApiModelProperty(value = "等待状态", example = "等待状态")
private String waiting;
@ApiModelProperty(value = "状态码", example = "状态码")
private String orderStatus;
@ApiModelProperty(value = "用户当前流程状态", example = "用户当前流程状态")
private String userPort;
@ApiModelProperty(value = "当前状态", example = "当前状态")
private String doing;
@ApiModelProperty(value = "飞手当前状态", example = "飞手当前状态")
private String flyerPort;
}
package com.mmc.csf.infomation.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.mmc.csf.config.IsNullConvertZero;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/19 16:11
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GetOrderNumberDTO implements Serializable {
@ApiModelProperty(hidden = true)
@JsonIgnore
private Integer id;
private static final long serialVersionUID = 75097833899496576L;
@ApiModelProperty(value = "支付订单编号", example = "dadasdas")
private String paymentOrderNumber;
@ApiModelProperty(value = "微信需要支付金额", example = "100")
@IsNullConvertZero
private BigDecimal weChatPay;
@JsonIgnore
@ApiModelProperty(value = "用户id", example = "100", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "服务id")
private Integer requirementsInfoId;
}
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.io.Serializable;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/19 10:18
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PayWalletDTO implements Serializable {
private static final long serialVersionUID = 75097833899496576L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "用户ID")
private Integer userAccountId;
@ApiModelProperty(value = "用户姓名")
private String userName;
@ApiModelProperty(value = "云享金余额")
private BigDecimal cashAmt;
@ApiModelProperty(value = "已消耗云享金")
private BigDecimal cashPaid;
@ApiModelProperty(value = "云享金总金额")
private BigDecimal totalCash;
@ApiModelProperty(value = "已冻结云享金")
private BigDecimal cashFreeze;
@ApiModelProperty(value = "佣金余额")
private BigDecimal salaryAmt;
@ApiModelProperty(value = "已消耗佣金")
private BigDecimal salaryPaid;
@ApiModelProperty(value = "已冻结佣金")
private BigDecimal salaryFreeze;
@ApiModelProperty(value = "佣金总额度")
private BigDecimal totalSalary;
@ApiModelProperty(value = "已提现的金额")
private BigDecimal rebateWdl;
@ApiModelProperty(value = "冻结总额")
private BigDecimal totalFreeze;
@ApiModelProperty(value = "总金额")
private BigDecimal totalAmount;
public void mathTotal() {
// 总冻结余额
this.totalFreeze = BigDecimal.ZERO;
if (this.cashFreeze != null) {
this.totalFreeze = this.totalFreeze.add(this.cashFreeze);
}
if (this.salaryFreeze != null) {
this.totalFreeze = this.totalFreeze.add(this.salaryFreeze);
}
// 总云享金余额
this.totalCash = BigDecimal.ZERO;
if (this.cashAmt != null) {
this.totalCash = this.totalCash.add(this.cashAmt);
}
if (this.cashFreeze != null) {
this.totalCash = this.totalCash.add(this.cashFreeze);
}
// 总佣金余额
this.totalSalary = BigDecimal.ZERO;
if (this.salaryAmt != null) {
this.totalSalary = this.totalSalary.add(this.salaryAmt);
}
if (this.salaryFreeze != null) {
this.totalSalary = this.totalSalary.add(this.salaryFreeze);
}
// 总金额
this.totalAmount = BigDecimal.ZERO;
this.totalAmount = this.totalAmount.add(this.totalCash);
this.totalAmount = this.totalAmount.add(this.totalSalary);
}
}
package com.mmc.csf.infomation.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/8/18 14:29
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PilotCertificationInteriorDTO {
@ApiModelProperty(value = "飞手执照id", example = "1")
@NotNull(message = "飞手执照id不能为空")
private Integer id;
@ApiModelProperty(value = "申请飞手用户的id", example = "1")
private Integer userAccountId;
}
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 io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author small
* @Date 2023/8/30 15:12
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ReleaseSuccessDTO {
@ApiModelProperty(value = "服务id", example = "服务id")
private Integer requirementsInfoId;
/**
* 抢单时间
*/
@ApiModelProperty(value = "抢单时间", example = "抢单时间")
private String createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "更新时间", example = "更新时间")
private String updateTime;
@ApiModelProperty(value = "流程id", hidden = true)
private Integer serviceFlowId;
@ApiModelProperty(value = "流程字典", example = "流程字典")
private FlowDictionaryDTO flowDictionaryDTO;
}
package com.mmc.csf.infomation.dto;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/29 9:37
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RequirementsAmountUpdateDTO {
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private FlowDictionaryDTO flowDictionaryDTO;
@ApiModelProperty(value = "", hidden = true)
private Integer serviceFlowId;
@ApiModelProperty(value = "服务需求id", required = true)
private Integer requirementsInfoId;
}
package com.mmc.csf.infomation.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author small
* @Date 2023/8/25 19:40
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RequirementsServiceDTO {
/**
* 抢单时间
*/
@ApiModelProperty(value = "抢单时间", example = "抢单时间")
private String createTime;
/**
* 修改时间
*/
@ApiModelProperty(value = "抢单时间", example = "抢单时间")
private String updateTime;
@ApiModelProperty(value = "服务id", example = "服务id")
private Integer requirementsInfoId;
@ApiModelProperty(value = "流程id", hidden = true)
private Integer serviceFlowId;
@ApiModelProperty(value = "流程字典", example = "流程字典")
private FlowDictionaryDTO flowDictionaryDTO;
}
package com.mmc.csf.infomation.dto;
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.NotNull;
/**
* @Author small
* @Date 2023/8/18 19:56
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ServiceArriveSceneDTO {
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "id")
private Double longitude;
@ApiModelProperty(value = "id")
private Double latitude;
@ApiModelProperty(value = "现场地址")
private String sceneAddress;
@ApiModelProperty(value = "现场地址的url", required = true)
private String sceneUrl;
@ApiModelProperty(value = "现场用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "服务需求id", required = true)
private Integer requirementsInfoId;
@ApiModelProperty(value = "到达现场时间")
private String createTime;
private String updateTime;
@ApiModelProperty(value = "流程id", hidden = true)
private Integer serviceFlowId;
private FlowDictionaryDTO flowDictionaryDTO;
}
package com.mmc.csf.infomation.dto;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/18 22:06
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceEvaluateDTO {
@ApiModelProperty(value = "id", example = "1")
private Integer id;
@ApiModelProperty(value = "需求id", example = "83")
private Integer requirementsInfoId;
@ApiModelProperty(value = "完成任务的用户", example = "1", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "评价内容", example = "1")
private String evaluationContent;
@ApiModelProperty(value = "星级", example = "星")
private String starLevel;
@ApiModelProperty(value = "评价图片", example = "星")
private String evaluationUrl;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private FlowDictionaryDTO flowDictionaryDTO;
@ApiModelProperty(value = "", hidden = true)
private Integer serviceFlowId;
}
package com.mmc.csf.infomation.dto;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/18 20:46
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ServiceFulfilATaskDTO {
private Integer id;
@ApiModelProperty(value = "完成任务描述", example = "完成任务描述一下")
private String taskDescribe;
@ApiModelProperty(value = "完成任务图片", example = "http://")
private String taskUrl;
@ApiModelProperty(value = "需求id", example = "83")
private Integer requirementsInfoId;
@ApiModelProperty(value = "完成任务的用户", example = "1", hidden = true)
private Integer userAccountId;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@ApiModelProperty(value = "", hidden = true)
private Integer serviceFlowId;
private FlowDictionaryDTO flowDictionaryDTO;
}
package com.mmc.csf.infomation.dto;
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 10:31
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ServiceOrderFormDTO {
private static final long serialVersionUID = -447951390213113317L;
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "服务类型id", example = "1")
@NotBlank(message = "服务类型id不能为空", groups = {Insert.class, Update.class})
private Integer serviceId;
@ApiModelProperty(value = "服务类型名称", example = "航拍摄影")
private String serviceName;
@ApiModelProperty(value = "订单级别 REGULAR_ORDER,RUSH_ORDER,TOP_ORDER", example = "TOP_ORDER")
private String orderLevel;
@ApiModelProperty(value = "发布者订单编号", example = "R3123132132132131")
private String publisherNumber;
@ApiModelProperty(value = "发布者电话", example = "1892994543", required = false)
private String publishPhone;
@ApiModelProperty(value = "抢单者电话", example = "13134311231")
private String preemptPhone;
@ApiModelProperty(value = "订单当前状态", example = "进行中")
private String doing;
@ApiModelProperty(value = "1正常 2争议订单", example = "1")
private Integer orderAttribute;
@ApiModelProperty(value = "平台总收益", example = "100")
private BigDecimal orderEarnings;
@ApiModelProperty(value = "发单时间", example = "")
private String createTime;
@ApiModelProperty(value = "更新时间", example = "")
private String updateTime;
@ApiModelProperty(value = "状态", example = "100")
private String orderStatus;
@ApiModelProperty(value = "等待状态", example = "等待状态")
private String waiting;
}
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;
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 11:31
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ServiceOrderFormDetailsDTO {
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")
@IsNullConvertZero
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")
@IsNullConvertZero
private BigDecimal cashAmount;
@ApiModelProperty(value = "冻结佣金(相当是冻结余额)", example = "200")
@IsNullConvertZero
private BigDecimal salaryAmount;
@ApiModelProperty(value = "冻结微信", example = "200")
@IsNullConvertZero
private BigDecimal weChat;
@ApiModelProperty(value = "抢单冻结云享金", example = "200")
@IsNullConvertZero
private BigDecimal preemptCashAmount;
@ApiModelProperty(value = "抢单冻结余额", example = "200")
@IsNullConvertZero
private BigDecimal preemptSalaryAmount;
@ApiModelProperty(value = "抢单冻结微信", example = "10")
@IsNullConvertZero
private BigDecimal preemptWeChat;
@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;
@ApiModelProperty(value = "更新时间", example = "")
private String updateTime;
@ApiModelProperty(value = "状态", example = "100")
private String orderStatus;
}
package com.mmc.csf.infomation.dto;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/18 21:22
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ServiceSettleAccountsDTO {
private Integer id;
@ApiModelProperty(value = "订单金额", example = "100")
private BigDecimal orderAmount;
@ApiModelProperty(value = "备注", example = "项目延期")
private String remark;
@ApiModelProperty(value = "需求id", example = "83")
private Integer requirementsInfoId;
@ApiModelProperty(value = "结算的用户id", example = "1", hidden = true)
private Integer userAccountId;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private FlowDictionaryDTO flowDictionaryDTO;
@ApiModelProperty(value = "", hidden = true)
private Integer serviceFlowId;
}
package com.mmc.csf.infomation.qo;
import com.mmc.csf.release.model.group.Freeze;
import com.mmc.csf.release.model.group.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/8/21 16:02
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IndustryTypeQO implements Serializable {
private static final long serialVersionUID = 1983281419136483277L;
private Integer id;
@ApiModelProperty(value = "行业类型名称")
private String typeName;
@ApiModelProperty(value = "页码", required = true)
@NotNull(message = "页码不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "每页显示数", required = true)
@NotNull(message = "每页显示数不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageSize;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
}
package com.mmc.csf.infomation.qo;
import com.mmc.csf.release.model.group.Freeze;
import com.mmc.csf.release.model.group.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/8/23 17:31
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MyPreemptQO {
@ApiModelProperty(value = "需求id(不需要就不要传此字段)", required = true, example = "1")
private Integer requirementsInfoId;
@ApiModelProperty(value = "当前页", required = true, example = "1")
@NotNull(message = "当前页不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "页大小", required = true, example = "10")
@NotNull(message = "页大小不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageSize;
@ApiModelProperty(hidden = true)
private Integer userAccountId;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
}
package com.mmc.csf.infomation.qo;
import com.mmc.csf.release.model.group.Freeze;
import com.mmc.csf.release.model.group.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/8/23 17:32
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MyPublishQO {
@ApiModelProperty(value = "需求id不需要就不要传此字段 对应的是 ", required = true, example = "1")
private Integer requirementsInfoId;
@ApiModelProperty(value = "当前页", required = true, example = "1")
@NotNull(message = "当前页不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "页大小", required = true, example = "10")
@NotNull(message = "页大小不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageSize;
@ApiModelProperty(hidden = true)
private Integer userAccountId;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
}
package com.mmc.csf.infomation.qo;
import com.mmc.csf.release.model.group.Freeze;
import com.mmc.csf.release.model.group.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/8/29 10:25
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ServiceOrderQO {
@ApiModelProperty(value = "发单手机号", required = false, example = "189213123213")
private String publishPhone;
@ApiModelProperty(value = "抢单手机号", required = false, example = "18923131321")
private String preemptPhone;
@ApiModelProperty(value = "1:正常 2:争议订单", required = false, example = "1")
private Integer orderAttribute;
@ApiModelProperty(value = "页码", required = true, example = "1")
@NotNull(message = "页码不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "每页显示数", required = true, example = "10")
@NotNull(message = "每页显示数不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageSize;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
}
package com.mmc.csf.infomation.vo;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/8/24 10:49
* @Version 1.0
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AppletMsgVOS implements Serializable {
private static final long serialVersionUID = 2124104608303700492L;
@ApiModelProperty(value = "openid")
@NotBlank
private String touser;
@ApiModelProperty(value = "模板ID")
@NotBlank
private String template_id;
@ApiModelProperty(value = "点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转。")
private String page;
@ApiModelProperty(value = "模板内容")
private JSONObject data;
@ApiModelProperty(value = "跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版")
private String miniprogram_state;
@ApiModelProperty(value = "默认为zh_CN")
private String lang;
}
package com.mmc.csf.infomation.vo;
import com.wechat.pay.java.service.refund.model.GoodsDetail;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author small
* @Date 2023/8/24 14:09
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ApplyRefundVO {
@ApiModelProperty(value = "商户订单号", required = true)
private String outTradeNo;
@ApiModelProperty(value = "退款原因")
private String reason;
@ApiModelProperty(value = "退款金额", required = true)
private Long refund;
@ApiModelProperty(value = "商品信息(可填可不填)")
private List<GoodsDetail> goodsDetail;
}
package com.mmc.csf.infomation.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/8/28 14:47
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FlyHandAgreeVO {
@ApiModelProperty(value = "需求id", example = "1")
@NotNull(message = "需求id不能为空")
private Integer requirementsInfoId;
@ApiModelProperty(value = "用户ID", hidden = true)
private Integer userAccountId;
}
package com.mmc.csf.infomation.vo;
import com.mmc.csf.config.IsNullConvertZero;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/23 9:44
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FlyerWalletFlowVO {
@ApiModelProperty(value = "用户ID")
private Integer userAccountId;
@ApiModelProperty(value = "支付方式 100(订单发布) 200(无人接单取消订单)300(有人接单取消订单)400(飞手抢单)500(客服判定飞手无责取消订单)600(飞手有责取消订单)700(正常结算)800(修改订单金额状态)900(飞手未确认修改金额状态)1000(飞手确认修改金额状态)")
private Integer modeOfPayment;
@ApiModelProperty(value = "云享金(需要正负)")
@IsNullConvertZero
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金(需要正负)")
@IsNullConvertZero
private BigDecimal salaryAmount;
@ApiModelProperty(value = "支付时间")
private Date timeOfPayment;
@ApiModelProperty(value = "操作者用户id")
private Integer operateUserAccountId;
@ApiModelProperty(value = "云享金违约金(需要正负)")
@IsNullConvertZero
private BigDecimal yxjCashPledge;
@ApiModelProperty(value = "佣金违约金(需要正负)")
@IsNullConvertZero
private BigDecimal salaryCashPledge;
@ApiModelProperty(value = "订单的百分比违约金(这笔钱是给发布方的)")
@IsNullConvertZero
private BigDecimal percentagePenaltyOfOrder;
}
package com.mmc.csf.infomation.vo;
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/25 13:23
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class GetOrderNumberUpdateVO {
@ApiModelProperty(value = "订单金额", example = "100.00", required = true)
//@NotNull(message = "订单金额", groups = {Insert.class})
//@DecimalMin(value = "100.00", message = "amount格式不正确")
private BigDecimal orderAmount;
@ApiModelProperty(value = "云享金", example = "10", hidden = true)
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金", example = "10", hidden = true)
private BigDecimal salaryAmount;
@ApiModelProperty(value = "微信金额", example = "10", hidden = true)
private BigDecimal weChatPay;
@ApiModelProperty(value = "用户id", example = "10", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "支付方式,云享金:1,佣金:2,微信支付:3", example = "1,2,3", required = true)
private String paymentType;
@ApiModelProperty(value = "抢单时需要知道抢单的那个订单", example = "1", required = true)
private Integer requirementsInfoId;
}
package com.mmc.csf.infomation.vo;
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/19 15:57
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class GetOrderNumberVO {
@ApiModelProperty(value = "订单金额", example = "100.00", required = true)
//@NotNull(message = "订单金额", groups = {Insert.class})
//@DecimalMin(value = "100.00", message = "amount格式不正确")
private BigDecimal orderAmount;
@ApiModelProperty(value = "订单级别 todo:前端传英文,后台自己获取金额 订单级别(REGULAR_ORDER,RUSH_ORDER,TOP_ORDER) 注意抢单的时候传固定的普通支付 REGULAR_ORDER", example = "REGULAR_ORDER", required = true)
// @NotNull(message = "订单级别", groups = {Insert.class})
private OrderLevelEnum orderLevelEnum;
@ApiModelProperty(value = "云享金", example = "10", hidden = true)
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金", example = "10", hidden = true)
private BigDecimal salaryAmount;
@ApiModelProperty(value = "微信金额", example = "10", hidden = true)
private BigDecimal weChatPay;
@ApiModelProperty(value = "用户id", example = "10", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "支付方式,云享金:1,佣金:2,微信支付:3", example = "1,2,3", required = true)
private String paymentType;
@ApiModelProperty(value = "订单方式 发布订单:1 ,抢单:2", example = "1", required = true)
private Integer orderMode;
@ApiModelProperty(value = "抢单时需要知道抢单的那个订单", example = "1")
private Integer requirementsInfoId;
}
package com.mmc.csf.infomation.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
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.NotNull;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/19 22:26
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class GrabTheOrderVO {
private static final long serialVersionUID = -447951390213113317L;
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "云享金", example = "10", hidden = true)
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金", example = "10", hidden = true)
private BigDecimal salaryAmount;
@ApiModelProperty(value = "微信支付订单编号", example = "R202308191657303116170")
private String wechatPayOrderNumber;
@ApiModelProperty(value = "微信金额", example = "10", hidden = true)
private BigDecimal weChat;
@ApiModelProperty(value = "抢单id", example = "1")
private Integer requirementsInfoId;
@JsonIgnore
private Integer userAccountId;
@ApiModelProperty(value = "支付方式,云享金:1,佣金:2,微信支付:3", example = "1,2,3")
private String paymentType;
@ApiModelProperty(value = "手机号", hidden = true)
private String phoneNum;
}
package com.mmc.csf.infomation.vo;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/17 10:22
* @Version 1.0
*/
public enum OrderLevelEnum {
//普通订单
REGULAR_ORDER("REGULAR_ORDER", new BigDecimal(0)),
//紧急订单
RUSH_ORDER("RUSH_ORDER", new BigDecimal(100)),
//置顶订单
TOP_ORDER("TOP_ORDER", new BigDecimal(300));
private String key;
private BigDecimal value;
private OrderLevelEnum(String key, BigDecimal value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public BigDecimal getValue() {
return value;
}
public void setValue(BigDecimal value) {
this.value = value;
}
public static OrderLevelEnum match(String key) {
OrderLevelEnum result = null;
for (OrderLevelEnum s : values()) {
if (s.getKey() == key) {
result = s;
break;
}
}
return result;
}
public static OrderLevelEnum catchMessage(BigDecimal value) {
OrderLevelEnum result = null;
for (OrderLevelEnum s : values()) {
if (s.getValue().equals(value)) {
result = s;
break;
}
}
return result;
}
}
package com.mmc.csf.infomation.vo;
import com.mmc.csf.release.model.group.Create;
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;
/**
* @Author small
* @Date 2023/8/18 14:30
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PilotAbilityVO {
private Integer id;
@ApiModelProperty(value = "能力id不能为空", example = "5", required = true)
@NotBlank(message = "能力id不能为空", groups = {Create.class, Update.class})
private Integer abilityId;
@ApiModelProperty(value = "能力不能为空", example = "道路检测", required = true)
@NotBlank(message = "能力名称不能为空", groups = {Create.class, Update.class})
private String abilityName;
@ApiModelProperty(value = "飞手认证id", hidden = true)
private Integer pilotCertificationId;
}
package com.mmc.csf.infomation.vo;
import com.mmc.csf.config.IsNullConvertZero;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/23 9:43
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PublisherWalletFlowVO {
@ApiModelProperty(value = "用户ID")
@NotNull
private Integer userAccountId;
@ApiModelProperty(value = "支付方式 100(订单发布) 200(无人接单取消订单)300(有人接单取消订单)400(飞手抢单)500(客服判定飞手无责取消订单)" +
"600(飞手有责取消订单)700(正常结算)800(修改订单金额状态)900(飞手未确认修改金额状态)1000(飞手确认修改金额状态)")
private Integer modeOfPayment;
@ApiModelProperty(value = "云享金(需要正负)注:结算时修改金额如果大于原订单,需要支付的云享金,也传这个字段")
@IsNullConvertZero
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金(需要正负)注:结算时修改金额如果大于原订单,需要支付的佣金,也传这个字段")
@IsNullConvertZero
private BigDecimal salaryAmount;
@ApiModelProperty(value = "支付时间")
private Date timeOfPayment;
@ApiModelProperty(value = "操作者用户id")
@NotNull
private Integer operateUserAccountId;
@ApiModelProperty(value = "云享金违约金(需要正负)")
@IsNullConvertZero
private BigDecimal yxjCashPledge;
@ApiModelProperty(value = "佣金违约金(需要正负)")
@IsNullConvertZero
private BigDecimal salaryCashPledge;
@ApiModelProperty(value = "订单的百分比违约金(这笔钱是给飞手的) (需要正负)")
@IsNullConvertZero
private BigDecimal percentagePenaltyOfOrder;
@ApiModelProperty(value = "加急单云享金金额 (需要正负)")
@IsNullConvertZero
private BigDecimal urgentYxjAmount;
@ApiModelProperty(value = "加急单佣金金额 (需要正负)")
@IsNullConvertZero
private BigDecimal urgentSalaryAmount;
@ApiModelProperty(value = "置顶单云享金金额 (需要正负)")
@IsNullConvertZero
private BigDecimal topYxjAmount;
@ApiModelProperty(value = "置顶单佣金金额 (需要正负)")
@IsNullConvertZero
private BigDecimal topSalaryAmount;
@ApiModelProperty(value = "飞手应得订单金额 (正数)")
@IsNullConvertZero
private BigDecimal flyerSalaryAmount;
@ApiModelProperty(value = "修改后金额(注:①飞手未确认时,后面支付的需要退的佣金那部分钱 ②飞手确认时,修改后的金额小于原佣金,需要退多余的佣金那部分钱 ③如果全部是微信支付的则不用传值)")
@IsNullConvertZero
private BigDecimal refundSalaryAmount;
@ApiModelProperty(value = "修改后金额(注:①飞手未确认时,后面支付的需要退的云享金那部分钱 ②飞手确认时,修改后的金额小于原佣金,需要退多余的云享金那部分钱 ③如果全部是微信支付的则不用传值)")
@IsNullConvertZero
private BigDecimal refundCashAmount;
}
package com.mmc.csf.infomation.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/22 10:43
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RequirementsAmountVO {
private static final long serialVersionUID = -447951390213113317L;
@ApiModelProperty(value = "id", hidden = true)
private Integer id;
@ApiModelProperty(value = "修改任务佣金", example = "900")
private BigDecimal updateOrderAmount;
@ApiModelProperty(value = "需求id", example = "1")
@NotNull(message = "需求id不能为空")
private Integer requirementsInfoId;
@ApiModelProperty(value = "用户id", example = "用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "原因", example = "原因")
private String reason;
@ApiModelProperty(value = "图片地址", example = "http://")
private String url;
@ApiModelProperty(value = "支付方式,云享金:1,佣金:2,微信支付:3", example = "1,2,3", required = true)
private String paymentType;
@ApiModelProperty(value = "修改后微信支付订单编号")
private String wechatPayOrderNumber;
}
...@@ -15,7 +15,6 @@ import javax.validation.constraints.NotNull; ...@@ -15,7 +15,6 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
/** /**
* @author: zj * @author: zj
...@@ -27,7 +26,7 @@ import java.util.Date; ...@@ -27,7 +26,7 @@ import java.util.Date;
@Builder @Builder
public class RequirementsInfoVO implements Serializable { public class RequirementsInfoVO implements Serializable {
private static final long serialVersionUID = -447951390213113317L; private static final long serialVersionUID = -447951390213113317L;
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id", hidden = true)
@NotNull(message = "id不能为空", groups = {Update.class}) @NotNull(message = "id不能为空", groups = {Update.class})
private Integer id; private Integer id;
...@@ -46,12 +45,12 @@ public class RequirementsInfoVO implements Serializable { ...@@ -46,12 +45,12 @@ public class RequirementsInfoVO implements Serializable {
@ApiModelProperty(value = "任务开始时间", example = "2023-07-25", required = true) @ApiModelProperty(value = "任务开始时间", example = "2023-07-25", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class}) @NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date taskStartTime; private String taskStartTime;
@ApiModelProperty(value = "任务结束时间", example = "2023-07-26", required = true) @ApiModelProperty(value = "任务结束时间", example = "2023-07-26", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class}) @NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date taskEndTime; private String taskEndTime;
@ApiModelProperty(value = "任务地址", example = "广东省深圳市", required = true) @ApiModelProperty(value = "任务地址", example = "广东省深圳市", required = true)
@NotBlank(message = "任务地址不能为空", groups = {Insert.class, Update.class}) @NotBlank(message = "任务地址不能为空", groups = {Insert.class, Update.class})
...@@ -92,7 +91,8 @@ public class RequirementsInfoVO implements Serializable { ...@@ -92,7 +91,8 @@ public class RequirementsInfoVO implements Serializable {
//@NotNull(message = "用户id不能为空", groups = {Insert.class}) //@NotNull(message = "用户id不能为空", groups = {Insert.class})
private Integer userAccountId; private Integer userAccountId;
@ApiModelProperty(value = "发布者支付总金额", example = "发布者支付总金额")
private BigDecimal totalAmount;
@ApiModelProperty(value = "省份编码", required = false) @ApiModelProperty(value = "省份编码", required = false)
//@NotNull(message = "省份编码不能为空", groups = {Insert.class}) //@NotNull(message = "省份编码不能为空", groups = {Insert.class})
private Integer provinceCode; private Integer provinceCode;
...@@ -122,4 +122,63 @@ public class RequirementsInfoVO implements Serializable { ...@@ -122,4 +122,63 @@ public class RequirementsInfoVO implements Serializable {
@ApiModelProperty(value = "发布者订单编号") @ApiModelProperty(value = "发布者订单编号")
private String publisherNumber; private String publisherNumber;
@ApiModelProperty(value = "订单级别", example = "订单级别", required = true)
@NotNull(message = "订单级别", groups = {Insert.class})
private String orderLevelEnum;
@ApiModelProperty(value = "服务id", example = "服务id", required = true)
private Integer serviceId;
@ApiModelProperty(value = "服务名称", example = "服务名称")
private String serviceName;
@ApiModelProperty(value = "飞手保险 1飞手保险 2三者保险 3机身保险", example = "飞手保险 1飞手保险 2三者保险 3机身保险")
private String insurance;
@ApiModelProperty(value = "当前状态", example = "已发布")
private String doing;
@ApiModelProperty(value = "等待状态", example = "等待抢单")
private String waiting;
@ApiModelProperty(value = "发布者状态", example = "等待抢单")
private String userPort;
@ApiModelProperty(value = "飞手状态", example = "等待抵达现场")
private String flyerPort;
@ApiModelProperty(value = "状态编码", example = "状态编码")
private String orderStatus;
@ApiModelProperty(value = "0需求信息 1是服务需求", example = "0需求信息 1是服务需求")
private Integer publish;
@ApiModelProperty(value = "抢单者已支付的总金额", example = "抢单者已支付的总金额")
private BigDecimal preemptTotalAmount;
@ApiModelProperty(value = "任务佣金", example = "任务佣金")
private BigDecimal orderAmount;
@ApiModelProperty(value = "订单级别 REGULAR_ORDER,RUSH_ORDER,TOP_ORDER", example = "订单级别 REGULAR_ORDER,RUSH_ORDER,TOP_ORDER")
private BigDecimal orderLevel;
@ApiModelProperty(value = "修格后的任务佣金")
private BigDecimal updateOrderAmount;
@ApiModelProperty(value = "原因")
private String reason;
@ApiModelProperty(value = "原因url")
private String url;
@ApiModelProperty(value = "修改后原因")
private String afterModificationReason;
@ApiModelProperty(value = "修改后url")
private String afterModificationUrl;
@ApiModelProperty(value = "抢单者电话")
private String preemptPhone;
@ApiModelProperty(value = "抢单飞手用户id ")
private Integer pilotCertificationUserId;
@ApiModelProperty(value = "抢单飞手id")
private Integer pilotCertificationId;
} }
package com.mmc.csf.infomation.vo;
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.NotNull;
/**
* @Author small
* @Date 2023/8/18 18:28
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceArriveSceneVO {
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "id", example = "23.344324")
private Double longitude;
@ApiModelProperty(value = "id", example = "44.344324")
private Double latitude;
@ApiModelProperty(value = "现场地址", example = "广东省深圳市")
private String sceneAddress;
@ApiModelProperty(value = "现场地址的url", required = true, example = "http://")
private String sceneUrl;
@ApiModelProperty(value = "现场用户id", hidden = true, example = "173")
private Integer userAccountId;
@ApiModelProperty(value = "服务需求id", required = true, example = "83")
private Integer requirementsInfoId;
}
package com.mmc.csf.infomation.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
/**
* @Author small
* @Date 2023/8/18 21:58
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceEvaluateVO {
@ApiModelProperty(value = "需求id", example = "83")
private Integer requirementsInfoId;
@ApiModelProperty(value = "完成任务的用户", example = "1", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "评价内容", example = "1")
@Length(max = 300, message = "字符过长")
private String evaluationContent;
@ApiModelProperty(value = "星级", example = "星")
private String starLevel;
@ApiModelProperty(value = "评价图片", example = "星")
private String evaluationUrl;
}
package com.mmc.csf.infomation.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
/**
* @Author small
* @Date 2023/8/18 20:34
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceFulfilATaskVO {
private Integer id;
@ApiModelProperty(value = "完成任务描述", example = "完成任务描述一下")
@Length(max = 300, message = "字符过长")
private String taskDescribe;
@ApiModelProperty(value = "完成任务图片", example = "http://")
private String taskUrl;
@ApiModelProperty(value = "需求id", example = "83")
private Integer requirementsInfoId;
@ApiModelProperty(value = "完成任务的用户", example = "1", hidden = true)
private Integer userAccountId;
}
package com.mmc.csf.infomation.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
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 org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/25 10:53
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceRequirementsEditVO implements Serializable {
private static final long serialVersionUID = -447951390213113317L;
@ApiModelProperty(value = "id")
@NotNull(message = "requirementsInfoId不能为空", groups = {Update.class})
private Integer requirementsInfoId;
@ApiModelProperty(value = "id", example = "1")
private Integer serviceId;
@ApiModelProperty(value = "飞行日期——任务开始时间", example = "2023-07-25", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String taskStartTime;
@ApiModelProperty(value = "飞行日期——任务结束时间", example = "2023-07-26", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String taskEndTime;
@ApiModelProperty(value = "飞行位置——任务地址", example = "广东省深圳市", required = true)
@NotBlank(message = "任务地址不能为空", groups = {Insert.class, Update.class})
private String taskAddress;
@ApiModelProperty(value = "飞行位置——任务经度", example = "23.344324", required = true)
@NotNull(message = "任务经度不能为空", groups = {Insert.class, Update.class})
private Double longitude;
@ApiModelProperty(value = "飞行位置——任务纬度", example = "44.344324", required = true)
@NotNull(message = "任务纬度不能为空", groups = {Insert.class, Update.class})
private Double latitude;
@ApiModelProperty(value = "任务需求描述", example = "描述一下", required = true)
@NotNull(message = "任务需求描述不能为空", groups = {Insert.class})
@Length(max = 300, message = "字符过长")
private String requireDescription;
@ApiModelProperty(value = "订单金额", example = "100", required = true)
@NotNull(message = "订单金额", groups = {Insert.class})
private BigDecimal orderAmount;
@ApiModelProperty(value = "飞手保险1飞手保险 2三者保险 3机身保险", example = "1,2,3", required = true)
@NotNull(message = "飞手保险", groups = {Insert.class})
private String insurance;
/* @ApiModelProperty(value = "订单级别 todo:前端传英文,后台自己获取金额 订单级别(REGULAR_ORDER,RUSH_ORDER,TOP_ORDER)", example = "REGULAR_ORDER", required = true)
@NotNull(message = "订单级别", groups = {Insert.class})
private OrderLevelEnum orderLevelEnum;*/
@ApiModelProperty(value = "后台获取token里面的用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "发布者姓名", example = "张三")
private String publishName;
@ApiModelProperty(value = "发布者电话", example = "1892994543", required = true)
@NotNull(message = "发布者电话不能为空", groups = {Insert.class})
private String publishPhone;
@ApiModelProperty(value = "云享金", example = "10", hidden = true)
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金", example = "10", hidden = true)
private BigDecimal salaryAmount;
@ApiModelProperty(value = "微信支付订单编号", example = "R202308191657303116170")
private String wechatPayOrderNumber;
@ApiModelProperty(value = "支付方式,云享金:1,佣金:2,微信支付:3", example = "1,2,3")
private String paymentType;
@ApiModelProperty(value = "微信金额", example = "10", hidden = true)
private BigDecimal weChat;
@ApiModelProperty(value = "地区编码", example = "307013")
private String adcode;
}
package com.mmc.csf.infomation.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
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 org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/17 10:14
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceRequirementsVO implements Serializable {
private static final long serialVersionUID = -447951390213113317L;
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "id", example = "1")
@NotNull(message = "服务类型名称不能为空", groups = {Insert.class, Update.class})
private Integer serviceId;
@ApiModelProperty(value = "飞行日期——任务开始时间", example = "2023-07-25", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date taskStartTime;
@ApiModelProperty(value = "飞行日期——任务结束时间", example = "2023-07-26", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date taskEndTime;
@ApiModelProperty(value = "飞行位置——任务地址", example = "广东省深圳市", required = true)
@NotBlank(message = "任务地址不能为空", groups = {Insert.class, Update.class})
private String taskAddress;
@ApiModelProperty(value = "飞行位置——任务经度", example = "23.344324", required = true)
@NotNull(message = "任务经度不能为空", groups = {Insert.class, Update.class})
private Double longitude;
@ApiModelProperty(value = "飞行位置——任务纬度", example = "44.344324", required = true)
@NotNull(message = "任务纬度不能为空", groups = {Insert.class, Update.class})
private Double latitude;
@ApiModelProperty(value = "任务需求描述", example = "描述一下", required = true)
@NotNull(message = "任务需求描述不能为空", groups = {Insert.class})
@Length(max = 300, message = "字符过长")
private String requireDescription;
@ApiModelProperty(value = "订单金额", example = "100", required = true)
@NotNull(message = "订单金额", groups = {Insert.class})
// @DecimalMin(value = "100", message = "订单金额不小于100")
private BigDecimal orderAmount;
@ApiModelProperty(value = "飞手保险1飞手保险 2三者保险 3机身保险", example = "1,2,3", required = true)
@NotNull(message = "飞手保险", groups = {Insert.class})
private String insurance;
@ApiModelProperty(value = "订单级别 todo:前端传英文,后台自己获取金额 订单级别(REGULAR_ORDER,RUSH_ORDER,TOP_ORDER)", example = "REGULAR_ORDER", required = true)
@NotNull(message = "订单级别", groups = {Insert.class})
private OrderLevelEnum orderLevelEnum;
@ApiModelProperty(value = "后台获取token里面的用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "发布者姓名", example = "张三")
private String publishName;
@ApiModelProperty(value = "发布者电话", example = "1892994543", required = true)
@NotNull(message = "发布者电话不能为空", groups = {Insert.class})
private String publishPhone;
@ApiModelProperty(value = "云享金", example = "10", hidden = true)
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金", example = "10", hidden = true)
private BigDecimal salaryAmount;
@ApiModelProperty(value = "微信支付订单编号", example = "R202308191657303116170")
private String wechatPayOrderNumber;
@ApiModelProperty(value = "支付方式,云享金:1,佣金:2,微信支付:3", example = "1,2,3")
private String paymentType;
@ApiModelProperty(value = "微信金额", example = "10", hidden = true)
private BigDecimal weChat;
@ApiModelProperty(value = "地区编码", example = "307013")
private String adcode;
}
package com.mmc.csf.infomation.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/18 21:19
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceSettleAccountsVO implements Serializable {
private Integer id;
@ApiModelProperty(value = "订单金额", example = "100")
private BigDecimal orderAmount;
@ApiModelProperty(value = "备注", example = "项目延期")
@Length(max = 300, message = "字符过长")
private String remark;
@ApiModelProperty(value = "需求id", example = "83")
private Integer requirementsInfoId;
@ApiModelProperty(value = "结算的用户", example = "1", hidden = true)
private Integer userAccountId;
}
package com.mmc.csf.infomation.vo;
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/26 13:54
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UpdateAmountGetNumberVO {
@ApiModelProperty(value = "修改订单金额", example = "100.00", required = true)
//@NotNull(message = "订单金额", groups = {Insert.class})
//@DecimalMin(value = "100.00", message = "amount格式不正确")
private BigDecimal orderAmount;
@ApiModelProperty(value = "云享金", example = "10", hidden = true)
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金", example = "10", hidden = true)
private BigDecimal salaryAmount;
@ApiModelProperty(value = "微信金额", example = "10", hidden = true)
private BigDecimal weChatPay;
@ApiModelProperty(value = "用户id", example = "10", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "支付方式,云享金:1,佣金:2,微信支付:3", example = "1,2,3", required = true)
private String paymentType;
@ApiModelProperty(value = "抢单时需要知道抢单的那个订单", example = "1", required = true)
private Integer requirementsInfoId;
}
package com.mmc.csf.infomation.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/8/19 10:24
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WalletFlowVO implements Serializable {
private static final long serialVersionUID = -8848411142632397203L;
private PublisherWalletFlowVO publisherWalletFlowVO;
private FlyerWalletFlowVO flyerWalletFlowVO;
}
package com.mmc.csf.release.auth.dto; package com.mmc.csf.release.auth.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -7,23 +8,25 @@ import lombok.NoArgsConstructor; ...@@ -7,23 +8,25 @@ import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @author 作者 geDuo * @author 作者 geDuo
* @version 创建时间:2021年8月31日 下午8:06:14 * @version 创建时间:2021年8月31日 下午8:06:14
* @explain 类说明 * @explain 类说明
*/ */
@Builder @Builder
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class LoginSuccessDTO implements Serializable { public class LoginSuccessDTO implements Serializable {
private static final long serialVersionUID = -1200834589953161925L; private static final long serialVersionUID = -1200834589953161925L;
private String token; private String token;
private Integer userAccountId; private Integer userAccountId;
private String accountNo; private String accountNo;
private String uid; private String uid;
private String phoneNum; private String phoneNum;
private String userName; private String userName;
private String nickName; private String nickName;
@ApiModelProperty(value = "openid")
private String openid;
// private RoleInfoDTO roleInfo; // private RoleInfoDTO roleInfo;
} }
package com.mmc.csf.release.industry;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* @Author small
* @Date 2023/8/18 13:40
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CompanyInspectionDTO implements Serializable {
private static final long serialVersionUID = -7994243059824987869L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "单位id")
private Integer companyInfoId;
@ApiModelProperty(value = "服务范围")
private String serviceArea;
@ApiModelProperty(value = "服务id")
private Integer inspectionId;
@ApiModelProperty(value = "服务标签")
private Integer inspectionTagId;
@ApiModelProperty(value = "报价")
private BigDecimal price;
@ApiModelProperty(value = "报价说明")
private String priceRemark;
@ApiModelProperty(value = "价格单位")
private Integer inspectionPriceUnitId;
@ApiModelProperty(value = "详情页")
private String detailPage;
@ApiModelProperty(value = "销售状态,0停售,1在售")
private Integer saleState;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "服务主图")
private String inspectionFirstImg;
@ApiModelProperty(value = "作业团队")
private String CompanyName;
@ApiModelProperty(value = "行业")
private IndustryTypeDTO industryTypeDTO;
@ApiModelProperty(value = "服务")
private InspectionDTO inspectionDTO;
@ApiModelProperty(value = "团队服务标签")
private InspectionTagDTO inspectionTagDTO;
@ApiModelProperty(value = "团队服务图片/视频")
private List<CompanyInspectionFileDTO> inspectionFileDTOS;
}
package com.mmc.csf.release.industry;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/8/18 13:40
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CompanyInspectionFileDTO implements Serializable {
private static final long serialVersionUID = -542881175952018418L;
private Integer id;
private Integer fileType;
private Integer first;
private Integer companyInspectionId;
private String fileUrl;
}
package com.mmc.csf.release.industry;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Author small
* @Date 2023/8/18 13:39
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class IndustryTypeDTO implements Serializable {
private static final long serialVersionUID = -5832618357203415274L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "行业类型名称")
private String typeName;
@ApiModelProperty(value = "行业图标")
private String typeImg;
@ApiModelProperty(value = "行业描述")
private String description;
@ApiModelProperty(value = "售卖状态,0停售,1在售")
private Integer saleState;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "服务列表")
private List<InspectionDTO> inspectionDTOS;
}
package com.mmc.csf.release.industry;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Author small
* @Date 2023/8/18 13:39
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InspectionDTO implements Serializable {
private static final long serialVersionUID = 8316723266007785996L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "服务编号")
private String inspectionNo;
@ApiModelProperty(value = "服务名称")
private String inspectionName;
@ApiModelProperty(value = "行业类型id")
private Integer industryTypeId;
@ApiModelProperty(value = "服务图标")
private String inspectionImg;
@ApiModelProperty(value = "服务描述")
private String inspectionDescription;
@ApiModelProperty(value = "销售状态,0停售,1在售")
private Integer saleState;
@ApiModelProperty(value = "案例图")
private String caseImg;
@ApiModelProperty(value = "案例视频")
private String caseVideo;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "团队服务列表")
List<CompanyInspectionDTO> companyInspectionDTOS;
}
package com.mmc.csf.release.industry;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/8/18 13:40
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InspectionTagDTO implements Serializable {
private static final long serialVersionUID = -2590417413375903686L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "标签名称")
private String tagName;
@ApiModelProperty(value = "服务id")
private Integer inspectionId;
}
package com.mmc.csf.release.industry;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author small
* @Date 2023/8/31 14:18
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserPayInfoVO {
@ApiModelProperty("订单号")
private String outTradeNo;
@ApiModelProperty("支付成功时间")
private String successTime;
@ApiModelProperty("用户支付金额")
private Integer wxNotifyPayerTotal;
@ApiModelProperty("交易状态")
private String tradeState;
@ApiModelProperty("用户id")
private Integer userAccountId;
}
...@@ -407,7 +407,18 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -407,7 +407,18 @@ public enum ResultEnum implements BaseErrorInfoInterface {
YOU_CANNOT_MODIFY_REQUIREMENTS_PUBLISHED_BY_OTHERS("60003", "不能修改他(她)人发布的需求"), YOU_CANNOT_MODIFY_REQUIREMENTS_PUBLISHED_BY_OTHERS("60003", "不能修改他(她)人发布的需求"),
YOU_CANNOT_DELETE_REQUIREMENTS_POSTED_BY_OTHERS("60004", "不能删除他(她)人发布的需求"), YOU_CANNOT_DELETE_REQUIREMENTS_POSTED_BY_OTHERS("60004", "不能删除他(她)人发布的需求"),
THE_THIRD_PARTY_INTERFACE_IS_BEING_UPDATED("60005", "第三方接口在更新请联系开发人员"), THE_THIRD_PARTY_INTERFACE_IS_BEING_UPDATED("60005", "第三方接口在更新请联系开发人员"),
THREE_FIELDS_CAN_BE_REPEATED("60002", "机型、等级、类型存在重复"); THREE_FIELDS_CAN_BE_REPEATED("60002", "机型、等级、类型存在重复"),
FALL_OUTSIDE_OF("60003", "不在打卡范围之内"),
OVER_THE_TOTAL("60004", "总金额大于云享金剩余的金额,发布失败"),
SALARY_PAYMENT_FAILURE("60005", "总金额大于佣金剩余的金额,发布失败"),
CASH_SALARY_PAYMENT_FAILURE("60006", "总金额大于佣金剩余的金额加上云享金剩余的金额,发布失败"),
PLEASE_SELECT_PAYMENT("60007", "请选择支付方式,发布失败"),
CASH_IS_ENOUGH("60008", "云享金额已足够,无需微信支付"),
SALARY_IS_ENOUGH("60009", "佣金剩余金额已足够,无需微信支付"),
YOU_CANNOT_CANCEL_THE_ORDER_AT_THIS_TIME("70000", "当前不能取消订单流程"),
PAYMENT_SUCCESS("70001", "你支付的保证金全额扣除成功"),
THE_AMOUNT_OF_THE_MISSION_WILL_BE_RETURNED("70002", "任务佣金原路退回成功"),
REFUND_PERCENTAGE("7003", "任务佣金百分之七十原路退回成功");
/** /**
* 错误码 * 错误码
......
...@@ -18,4 +18,4 @@ patches: ...@@ -18,4 +18,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/ims newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/ims
newTag: e618f2b92a108492786a00ca07758f1c6a22bd4d newTag: 1d00ed9ee09a9eab2d4faf70f775dc6b67c4362a
...@@ -171,4 +171,4 @@ ...@@ -171,4 +171,4 @@
<module>release-service</module> <module>release-service</module>
<module>csf-common</module> <module>csf-common</module>
</modules> </modules>
</project> </project>
\ No newline at end of file
...@@ -69,6 +69,11 @@ ...@@ -69,6 +69,11 @@
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version>3.15.6</version>
</dependency>
<!-- mybatis驱动&Druid数据源-end --> <!-- mybatis驱动&Druid数据源-end -->
<dependency> <dependency>
...@@ -89,6 +94,15 @@ ...@@ -89,6 +94,15 @@
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
<!-- 定位打卡-->
<!--用于计算两点之间的距离-->
<dependency>
<groupId>org.gavaghan</groupId>
<artifactId>geodesy</artifactId>
<version>1.1.3</version>
</dependency>
<!-- &lt;!&ndash; RabbitMQ &ndash;&gt;--> <!-- &lt;!&ndash; RabbitMQ &ndash;&gt;-->
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>--> <!-- <groupId>org.springframework.boot</groupId>-->
......
...@@ -4,16 +4,19 @@ import org.springframework.boot.SpringApplication; ...@@ -4,16 +4,19 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
/** /**
* @Author LW * @Author LW
* @date 2023/5/13 10:39 * @date 2023/5/13 10:39
* 概要: * 概要:
// */ * //
*/
@EnableFeignClients(basePackages = "com.mmc.csf.release.feign") // 所有FeignClient放在client-feign-springboot-starter里面进行管理 @EnableFeignClients(basePackages = "com.mmc.csf.release.feign") // 所有FeignClient放在client-feign-springboot-starter里面进行管理
//@EnableCircuitBreaker //@EnableCircuitBreaker
//@EnableEurekaClient //@EnableEurekaClient
@EnableScheduling
@SpringBootApplication @SpringBootApplication
public class ReleaseApplication { public class ReleaseApplication {
public static void main(String[] args) { public static void main(String[] args) {
...@@ -21,7 +24,7 @@ public class ReleaseApplication { ...@@ -21,7 +24,7 @@ public class ReleaseApplication {
} }
@Bean @Bean
public RestTemplate restTemplate(){ public RestTemplate restTemplate() {
return new RestTemplate(); return new RestTemplate();
} }
} }
package com.mmc.csf.release.commit;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @Author small
* @Date 2023/8/18 11:04
* @Version 1.0
*/
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface NotRepeatSubmit {
long value();
}
package com.mmc.csf.release.commit;
import com.alibaba.fastjson.JSONObject;
import com.mmc.csf.common.util.web.ResultBody;
import com.mmc.csf.infomation.vo.GrabTheOrderVO;
import com.mmc.csf.release.controller.BaseController;
import com.mmc.csf.release.dao.RequirementsDao;
import com.mmc.csf.release.industry.UserPayInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.CodeSignature;
import org.aspectj.lang.reflect.MethodSignature;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @Author small
* @Date 2023/8/18 11:05
* @Version 1.0
*/
@Slf4j
@Component
@Aspect
public class NotRepeatSubmitConfig extends BaseController {
@Autowired
private RedissonClient redissonClient;
@Value("${iuav.omsapp.url}")
private String omsApp;
@Value("${iuav.payment.url}")
private String paymentApp;
@Autowired
private RestTemplate restTemplate;
@Autowired
private RequirementsDao requirementsDao;
@Pointcut("@within(notRepeatSubmit)||@annotation(notRepeatSubmit)")
public void pointcut(NotRepeatSubmit notRepeatSubmit) {
}
@Around(value = "pointcut(notRepeatSubmit)")
public Object around(ProceedingJoinPoint proceedingJoinPoint, NotRepeatSubmit notRepeatSubmit) throws Throwable {
log.info("提交之前---");
Object result = null;
long leaseTime = notRepeatSubmit.value();
log.info("leaseTime:" + leaseTime);
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
Integer userAccountId = this.getUserLoginInfoFromRedis(request).getUserAccountId();
String accountUriLockKey = userAccountId + "-" + request.getServletPath();
// 设置锁定资源名称,accountUriLock改为userid+uri作为标识,作为测试写死
// String accountUriLockKey = "accountUriLock";
RLock accountUriLock = redissonClient.getLock(accountUriLockKey);
boolean tryLock;
MethodSignature signature = (MethodSignature) proceedingJoinPoint.getSignature();
Method method = signature.getMethod();
String name = method.getDeclaringClass().getName();
String[] parameterNames = signature.getParameterNames();
Map<String, Object> map = new HashMap<String, Object>();
Object[] values = proceedingJoinPoint.getArgs();
String[] names = ((CodeSignature) proceedingJoinPoint.getSignature()).getParameterNames();
for (int i = 0; i < names.length; i++) {
map.put(names[i], values[i]);
}
log.info(map + "");
GrabTheOrderVO grabTheOrderVO = (GrabTheOrderVO) map.get("grabTheOrderVO");
//尝试获取分布式锁
//-1为永久 leaseTime 最多等待几秒 上锁以后leaseTime秒自动解锁
tryLock = accountUriLock.tryLock(-1, leaseTime, TimeUnit.MILLISECONDS);
log.info("tryLock:" + tryLock);
if (tryLock) {
try {
Integer requirementsInfoId = grabTheOrderVO.getRequirementsInfoId();
String paymentOrderNumber = getPaymentOrderNumber(requirementsInfoId, request);
//String wechatPayOrderNumber = grabTheOrderVO.getWechatPayOrderNumber();
String wechatPayOrderNumber = paymentOrderNumber;
if (wechatPayOrderNumber != null) {
UserPayInfoVO userPayInfoVO = queryUserPayInfo(wechatPayOrderNumber, request);
System.out.println(userPayInfoVO);
if (userPayInfoVO.getTradeState() != "SUCCESS") {
ResultBody delete = getDelete(requirementsInfoId, request);
requirementsDao.updateRepertory(requirementsInfoId);
}
}
// 查询订单库存判断是否大于0
// 大于0表示还有库存可以更新订单库存将库存数字减一更新到数据库中
// 不大于0表示没有库存了本次请求就终止
log.info("正常提交:");
result = proceedingJoinPoint.proceed();
} catch (Exception e) {
log.info("主程序异常:" + e);
throw new Exception(e);
}
} else {
log.info("重复提交:" + accountUriLockKey);
}
log.info("提交之后---");
return result;
}
/**
* 通过订单编号查看是否支付成功
*
* @param orderNo
* @return
*/
public UserPayInfoVO queryUserPayInfo(String orderNo, HttpServletRequest request) {
String token = request.getHeader("token");
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(orderNo), headers);
ResponseEntity<UserPayInfoVO> exchange = restTemplate.exchange(paymentApp + "/payment/wechat/queryUserPayInfo?orderNo=" + orderNo, HttpMethod.GET, entity, UserPayInfoVO.class);
UserPayInfoVO body = exchange.getBody();
return body;
}
/**
* 删除抢单未支付的金额
*
* @param requirementsInfoId
* @param request
* @return
*/
public ResultBody getDelete(Integer requirementsInfoId, HttpServletRequest request) {
String token = request.getHeader("token");
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(requirementsInfoId), headers);
ResponseEntity<ResultBody> exchange = restTemplate.exchange(omsApp + "releaseOrder/getDeleteOrder?requirementsInfoId=" + requirementsInfoId, HttpMethod.GET, entity, ResultBody.class);
//UserPayInfoVO body = exchange.getBody();
ResultBody body = exchange.getBody();
// ResultBody<Object> objectResultBody = new ResultBody<>();
return body;
}
public String getPaymentOrderNumber(Integer requirementsInfoId, HttpServletRequest request) {
String token = request.getHeader("token");
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(requirementsInfoId), headers);
ResponseEntity<String> exchange = restTemplate.exchange(omsApp + "releaseOrder/getPaymentOrderNumber?requirementsInfoId=" + requirementsInfoId, HttpMethod.GET, entity, String.class);
//UserPayInfoVO body = exchange.getBody();
String body = exchange.getBody();
// ResultBody<Object> objectResultBody = new ResultBody<>();
return body;
}
}
package com.mmc.csf.release.constant;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;
import java.util.Map;
/**
* @Author small
* @Date 2023/8/24 13:28
* @Version 1.0
*/
public class HttpsOpenUtil {
/**
* http请求
*
* @param url 发送请求的URL
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return URL 所代表远程资源的响应结果
* @category 向指定URL发送GET方法的请求
*/
public static String httpSendGet(String url, String param) {
String result = "";
BufferedReader in = null;
try {
String urlNameString = url + "?" + param;
URL realUrl = new URL(urlNameString);
// 打开和URL之间的连接
URLConnection connection = realUrl.openConnection();
// 设置通用的请求属性
connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
// 建立实际的连接
connection.connect();
// 获取所有响应头字段
Map<String, List<String>> map = connection.getHeaderFields();
// 遍历所有的响应头字段
// for (String key : map.keySet()) {
// System.out.println(key + "--->" + map.get(key));
// }
// 定义 BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result += line;
}
} catch (Exception e) {
System.out.println("发送GET请求出现异常!" + e);
e.printStackTrace();
}
// 使用finally块来关闭输入流
finally {
try {
if (in != null) {
in.close();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
return result;
}
/**
* http请求
*
* @param url 发送请求的 URL
* @return 所代表远程资源的响应结果
* @category 向指定URL 发送POST方法的请求
*/
public static String httpSendPost(String url, String param) {
PrintWriter out = null;
BufferedReader in = null;
String result = "";
try {
URL realUrl = new URL(url);
// 打开和URL之间的连接
URLConnection conn = realUrl.openConnection();
// 设置通用的请求属性
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
// 发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);
// 获取URLConnection对象对应的输出流
out = new PrintWriter(conn.getOutputStream());
// 发送请求参数
out.print(param);
// flush输出流的缓冲
out.flush();
// 定义BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result += line;
}
} catch (Exception e) {
System.out.println("发送 POST 请求出现异常!" + e);
e.printStackTrace();
}
// 使用finally块来关闭输出流、输入流
finally {
try {
if (out != null) {
out.close();
}
if (in != null) {
in.close();
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
return result;
}
}
package com.mmc.csf.release.constant;
import com.alibaba.fastjson.JSONObject;
import com.mmc.csf.common.util.json.JsonUtil;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.Map;
/**
* @Author small
* @Date 2023/8/24 13:27
* @Version 1.0
*/
public class WxApiUtilS {
// 与接口配置信息中的Token要一致
private static final String token = "MMCDingYueHaoToken2020";
public static boolean checkSignature(String signature, String timestrap, String nonce) {
String[] arr = new String[]{token, timestrap, nonce};
// 将token、timestamp、nonce三个参数进行字典序排序
Arrays.sort(arr);
StringBuffer buf = new StringBuffer();
for (int i = 0; i < arr.length; i++) {
buf.append(arr[i]);
}
String temp = getSha1(buf.toString());
return temp.equals(signature);
}
public static String getSha1(String str) {
if (null == str || str.length() == 0) {
return null;
}
char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
try {
MessageDigest mdTemp = MessageDigest.getInstance("SHA1");
mdTemp.update(str.getBytes("UTF-8"));
byte[] md = mdTemp.digest();
int j = md.length;
char[] buf = new char[j * 2];
int k = 0;
for (int i = 0; i < j; i++) {
byte byTemp = md[i];
buf[k++] = hexDigits[byTemp >>> 4 & 0xf];
buf[k++] = hexDigits[byTemp & 0xf];
}
return new String(buf);
} catch (Exception e) {
return null;
}
}
/**
* 截取模板长度
*/
public static JSONObject buildMsgJson(JSONObject jsonObject) {
for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
if (entry.getKey().startsWith("thing") && entry.getValue() != null) {
String json = JsonUtil.parseObjToJson(entry.getValue());
JSONObject obj = JSONObject.parseObject(json);
String str = obj.getString("value");
if (str.length() > 20) {
obj.put("value", str.substring(0, 17) + "...");
entry.setValue(obj);
}
}
if (entry.getKey().startsWith("phrase") && entry.getValue() != null) {
String json = JsonUtil.parseObjToJson(entry.getValue());
JSONObject obj = JSONObject.parseObject(json);
String str = obj.getString("value");
if (str.length() > 5) {
obj.put("value", str.substring(0, 5));
entry.setValue(obj);
}
}
if (entry.getKey().startsWith("character_string") && entry.getValue() != null) {
String json = JsonUtil.parseObjToJson(entry.getValue());
JSONObject obj = JSONObject.parseObject(json);
String str = obj.getString("value");
if (str.length() > 32) {
obj.put("value", str.substring(0, 29) + "...");
entry.setValue(obj);
}
}
}
return jsonObject;
}
}
package com.mmc.csf.release.constant;
/**
* @Author small
* @Date 2023/8/24 13:29
* @Version 1.0
*/
public class WxMsgTemplete {
public static final String INDEMNIFY_FOR_PUBLICATION = "0C9uqQymP4k4qiYRA4r-sEHXti_yd3PjHjGMezuGOtc";
}
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;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/**
* @Author small
* @Date 2023/8/29 10:18
* @Version 1.0
*/
@Api(tags = {"服务需求订单后台相关"})
@RestController
@RequestMapping("/backRequirements/")
public class BackRequirementsController extends BaseController {
@Autowired
private BackRequirementsService backRequirementsService;
@ApiOperation(value = "后台管理——服务订单分页")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceOrderFormDTO.class)})
@PostMapping("serviceOrderFormList")
public ResultBody<ServiceOrderFormDTO> serviceOrderFormList(HttpServletRequest request,
@Validated(value = {Page.class}) @ApiParam(value = "角色查询QO", required = true) @RequestBody ServiceOrderQO param) {
return ResultBody.success(backRequirementsService.serviceOrderFormList(param, this.getUserLoginInfoFromRedis(request)));
}
@ApiOperation(value = "后台管理——服务订单详情")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceOrderFormDTO.class)})
@GetMapping("serviceOrderFormDetails")
public ResultBody<ServiceOrderFormDetailsDTO> serviceOrderFormDetails(HttpServletRequest request, @ApiParam(value = "需求发布id", required = true) @RequestParam Integer requirementsInfoId) {
return backRequirementsService.serviceOrderFormDetails(requirementsInfoId, this.getUserLoginInfoFromRedis(request));
}
}
package com.mmc.csf.release.controller.countDown;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
* @Author small
* @Date 2023/8/28 16:32
* @Version 1.0
*/
@Slf4j
@Configuration
public class RedisConfig {
@Autowired
private RedisConnectionFactory factory;
@Bean
RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory) {
RedisMessageListenerContainer container = new RedisMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
return container;
}
@Bean
public RedisTemplate<String, Object> redisTemplate() {
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
redisTemplate.setKeySerializer(new StringRedisSerializer());
redisTemplate.setHashKeySerializer(new StringRedisSerializer());
redisTemplate.setHashValueSerializer(new StringRedisSerializer());
redisTemplate.setValueSerializer(new StringRedisSerializer());
redisTemplate.setConnectionFactory(factory);
return redisTemplate;
}
}
package com.mmc.csf.release.controller.countDown;
import com.alibaba.fastjson.JSONObject;
import com.mmc.csf.common.util.web.ResultBody;
import com.mmc.csf.common.util.web.ResultEnum;
import com.mmc.csf.config.IsNullConvertZeroUtil;
import com.mmc.csf.infomation.vo.*;
import com.mmc.csf.release.dao.RequirementsDao;
import com.mmc.csf.release.entity.requirements.RequirementsInfoDO;
import com.mmc.csf.release.entity.requirements.RequirementsServiceDO;
import com.mmc.csf.release.entity.requirements.ServiceSettleAccountsDO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.listener.KeyExpirationEventMessageListener;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
import org.springframework.http.*;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/28 16:31
* @Version 1.0
*/
@Transactional
@Component
@Slf4j
public class RedisKeyExpirationListener extends KeyExpirationEventMessageListener {
@Autowired
private RestTemplate restTemplate;
@Value("${iuav.payment.url}")
private String paymentApp;
@Value("${iuav.userapp.url}")
private String userApp;
@Autowired
private RequirementsDao requirementsDao;
@Autowired
private StringRedisTemplate stringRedisTemplate;
public RedisKeyExpirationListener(RedisMessageListenerContainer listenerContainer) {
super(listenerContainer);
}
@Override
public void onMessage(Message message, byte[] pattern) {
// 获取失效的key
String expiredKey = message.toString();
String prefix = "";
if (expiredKey.indexOf("_") != -1) {
prefix = expiredKey.substring(0, expiredKey.indexOf("_"));
}
//根据key的前缀判断是不是属于订单过期
if ("order".equals(prefix)) {
String orderId = expiredKey.substring(expiredKey.indexOf("_") + 1);
log.info("订单编号:{}已过期,开始处理==========", orderId);
RequirementsInfoDO requirementsInfoDO = requirementsDao.publisherOrderNumber(orderId);
System.out.println(requirementsInfoDO);
ResultBody resultBody = getResultBody(requirementsInfoDO);
}
}
private ResultBody getResultBody(RequirementsInfoDO infoDO) {
ServiceSettleAccountsVO settleAccountsVO = new ServiceSettleAccountsVO();
settleAccountsVO.setRequirementsInfoId(infoDO.getId());
// RequirementsInfoDO infoDO = requirementsDao.selectSettleAccounts(settleAccountsVO);
RequirementsServiceDO requirementsServiceDO = requirementsDao.serviceSettleAccounts(settleAccountsVO);
IsNullConvertZeroUtil.checkIsNull(infoDO);
IsNullConvertZeroUtil.checkIsNull(requirementsServiceDO);
ServiceSettleAccountsDO settleAccountsDO = new ServiceSettleAccountsDO(settleAccountsVO);
requirementsDao.settleAccounts(settleAccountsDO);
requirementsDao.updateScene(settleAccountsVO.getRequirementsInfoId(), 5);
requirementsDao.updateInfo(settleAccountsVO.getRequirementsInfoId(), 5);
//正常结算
WalletFlowVO walletFlowVO = new WalletFlowVO();
PublisherWalletFlowVO publisherWalletFlowVO = new PublisherWalletFlowVO();
FlyerWalletFlowVO flyerWalletFlowVO = new FlyerWalletFlowVO();
IsNullConvertZeroUtil.checkIsNull(publisherWalletFlowVO);
IsNullConvertZeroUtil.checkIsNull(flyerWalletFlowVO);
//给发布者发送
BigDecimal orderAmount = infoDO.getOrderAmount();
BigDecimal bigDecimal = new BigDecimal(0.9);
BigDecimal bigDecimal1 = orderAmount.multiply(bigDecimal).setScale(2, BigDecimal.ROUND_HALF_UP);
publisherWalletFlowVO.setModeOfPayment(700);
publisherWalletFlowVO.setFlyerSalaryAmount(bigDecimal1);
publisherWalletFlowVO.setCashAmount(infoDO.getCashAmount().negate());
publisherWalletFlowVO.setSalaryAmount(infoDO.getSalaryAmount().negate());
publisherWalletFlowVO.setUserAccountId(infoDO.getUserAccountId());
publisherWalletFlowVO.setOperateUserAccountId(0);
if ("TOP_ORDER".equals(infoDO.getOrderLevel())) {
publisherWalletFlowVO.setTopYxjAmount(infoDO.getLevelCashAmount().negate());
publisherWalletFlowVO.setTopSalaryAmount(infoDO.getLevelSalaryAmount().negate());
} else if ("RUSH_ORDER".equals(infoDO.getOrderLevel())) {
publisherWalletFlowVO.setUrgentYxjAmount(infoDO.getLevelCashAmount().negate());
publisherWalletFlowVO.setUrgentSalaryAmount(infoDO.getLevelSalaryAmount().negate());
}
//退飞手钱
flyerWalletFlowVO.setModeOfPayment(700);
flyerWalletFlowVO.setCashAmount(requirementsServiceDO.getCashAmount());
flyerWalletFlowVO.setSalaryAmount(requirementsServiceDO.getSalaryAmount());
flyerWalletFlowVO.setUserAccountId(requirementsServiceDO.getPilotCertificationUserId());
flyerWalletFlowVO.setOperateUserAccountId(0);
ApplyRefundVO applyRefundVO = new ApplyRefundVO();
if (requirementsServiceDO.getWeChat().compareTo(BigDecimal.ZERO) != 0) {
applyRefundVO.setReason("原路退回");
applyRefundVO.setOutTradeNo(requirementsServiceDO.getWechatPayOrderNumber());
BigDecimal weChat = requirementsServiceDO.getWeChat();
BigDecimal decimal = new BigDecimal(100);
long longValueWeChat = weChat.multiply(new BigDecimal(100)).longValue();
applyRefundVO.setRefund(longValueWeChat);
applyRefund(applyRefundVO, "");
}
walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO);
walletFlowVO.setFlyerWalletFlowVO(flyerWalletFlowVO);
flyerCancel(walletFlowVO, "");
return ResultBody.success();
}
/**
* 公共调用
*
* @param walletFlowVO
* @param token
* @return
*/
public ResultBody flyerCancel(WalletFlowVO walletFlowVO, String token) {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(walletFlowVO), headers);
ResponseEntity<Object> exchange = null;
try {
exchange = restTemplate.exchange(userApp + "/userapp/pay/feignWalletFlow", HttpMethod.POST, entity, Object.class);
} catch (RestClientException e) {
return ResultBody.error(ResultEnum.THE_THIRD_PARTY_INTERFACE_IS_BEING_UPDATED);
}
return ResultBody.success();
}
/**
* 退款
*/
public ResultBody applyRefund(ApplyRefundVO applyRefundVO, String token) {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(JSONObject.toJSONString(applyRefundVO), headers);
ResponseEntity<Object> exchange = null;
try {
exchange = restTemplate.exchange(paymentApp + "/payment/wechat/feignApplyRefund", HttpMethod.POST, entity, Object.class);
} catch (RestClientException e) {
return ResultBody.error(ResultEnum.THE_THIRD_PARTY_INTERFACE_IS_BEING_UPDATED);
}
return ResultBody.success();
}
}
package com.mmc.csf.release.controller.countDown;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import java.util.concurrent.TimeUnit;
/**
* @Author small
* @Date 2023/8/28 16:35
* @Version 1.0
*/
@Component
public class RedisUtil {
private RedisTemplate<String, String> redisTemplate;
@Autowired
public RedisUtil(RedisTemplate<String, String> redisTemplate) {
this.redisTemplate = redisTemplate;
}
/**
* 读取缓存
*
* @param key
* @return
*/
public String get(final String key) {
return redisTemplate.opsForValue().get(key);
}
/**
* 写入缓存
*/
public boolean ins(final String key, String value, int time, TimeUnit unit) {
boolean result = false;
try {
redisTemplate.opsForValue().set(key, value, time, unit);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
public boolean expire(String key, long time) {
try {
if (time > 0L) {
this.redisTemplate.expire(key, time, TimeUnit.SECONDS);
}
return true;
} catch (Exception var5) {
var5.printStackTrace();
return false;
}
}
/**
* 删除缓存
*/
public boolean delete(final String key) {
boolean result = false;
try {
redisTemplate.delete(key);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
}
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;
/**
* @Author small
* @Date 2023/8/29 10:21
* @Version 1.0
*/
@Mapper
public interface BackRequirementsDao {
List<ServiceOrderFormDO> serviceOrderFormList(ServiceOrderQO param);
int countService(ServiceOrderQO param);
ServiceOrderFormDetailsDO serviceOrderFormDetails(Integer requirementsInfoId);
}
package com.mmc.csf.release.dao; package com.mmc.csf.release.dao;
import com.mmc.csf.infomation.dto.*;
import com.mmc.csf.infomation.qo.IndustryCaseQO; import com.mmc.csf.infomation.qo.IndustryCaseQO;
import com.mmc.csf.release.entity.requirements.RequirementsInfoDO; import com.mmc.csf.infomation.qo.MyPreemptQO;
import com.mmc.csf.release.entity.requirements.RequirementsTypeDO; import com.mmc.csf.infomation.qo.MyPublishQO;
import com.mmc.csf.infomation.vo.ServiceSettleAccountsVO;
import com.mmc.csf.release.entity.requirements.*;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
...@@ -77,4 +81,114 @@ public interface RequirementsDao { ...@@ -77,4 +81,114 @@ public interface RequirementsDao {
List<RequirementsInfoDO> appPublishList(); List<RequirementsInfoDO> appPublishList();
RequirementsInfoDO detailPublish(Integer id); RequirementsInfoDO detailPublish(Integer id);
void addPublishService(ServiceRequirementsDO requirementsInfoDO);
ServiceRequirementsDO grabTheOrder(Integer requirementsInfoId);
void updateGrabTheOrder(Integer requirementsInfoId, Integer repertory);
void insertService(RequirementsServiceDO requirementsServiceDO);
void arriveAtTheScene(ServiceArriveSceneDO serviceArriveSceneDO);
void updateScene(Integer requirementsInfoId, Integer serviceFlowId);
ServiceArriveSceneDO arriveAtTheSceneDetails(Integer requirementsInfoId, Integer userAccountId);
void fulfilATask(ServiceFulfilATaskDO serviceFulfilATaskDO);
ServiceFulfilATaskDO fulfilATaskDetails(Integer requirementsInfoId, Integer userAccountId);
void settleAccounts(ServiceSettleAccountsDO settleAccountsDO);
ServiceSettleAccountsDO settleAccountsDetails(Integer requirementsInfoId, Integer userAccountId);
void evaluate(ServiceEvaluateDO serviceEvaluateDO);
ServiceEvaluateDO evaluateDetails(Integer requirementsInfoId, Integer userAccountId);
List<RequirementsInfoDO> myPublish(MyPublishQO param);
List<RequirementsInfoDO> myPreempt(MyPreemptQO param);
RequirementsServiceDO droneFlyerCancel(Integer requirementsInfoId, Integer userAccountId);
RequirementsInfoDO publisherCancel(Integer requirementsInfoId, Integer userAccountId);
RequirementsInfoDO publisherCancelFlyer(Integer requirementsInfoId);
RequirementsInfoDO publisherOrderNumber(String publisherNumber);
List<FlowDictionaryDO> flowDictionary();
void addAmount(RequirementsAmountDO requirementsAmountDO);
void updateInfo(Integer requirementsInfoId, Integer serviceFlowId);
void updateFlow(Integer requirementsInfoId, Integer serviceFlowId);
int myPublishcount(MyPublishQO param);
int myPreemptCount(MyPreemptQO param);
List<RequirementsInfoDO> orderRequirements(String format);
void updateServiceAmount(Integer id);
void InsertRequirementsAmountLog(RequirementsInfoDO requirementsInfoDO);
void updateAmount(RequirementsAmountDO amountDO);
void updateRequirementsInfo(RequirementsInfoDO infoDO);
RequirementsServiceDTO requirementsServiceDTO(Integer requirementsInfoId);
ServiceArriveSceneDTO serviceArriveSceneDTO(Integer requirementsInfoId);
ServiceFulfilATaskDTO serviceFulfilATaskDTO(Integer requirementsInfoId);
ServiceSettleAccountsDTO settleAccountsDTO(Integer requirementsInfoId);
ServiceEvaluateDTO serviceEvaluateDTO(Integer requirementsInfoId);
RequirementsInfoDO selectSettleAccounts(ServiceSettleAccountsVO settleAccountsVO);
RequirementsInfoDO flyHandAgree(Integer requirementsInfoId);
RequirementsServiceDO serviceSettleAccounts(ServiceSettleAccountsVO settleAccountsVO);
void deletePublishService(Integer requirementsInfoId);
Integer selectDeletePreempt(Integer requirementsInfoId, Integer userAccountId);
void deletePreempt(Integer requirementsInfoId);
void requirementsAmountUpdate(RequirementsAmountUpdateDO amountUpdateDO);
RequirementsAmountUpdateDO selectAmountUpdate(Integer requirementsInfoId);
RequirementsAmountUpdateDTO amountUpdateDTO(Integer requirementsInfoId);
void insertPlatformOrderEarnings(BigDecimal earnings, Integer requirementsInfoId, Integer userAccountId);
void updatePlatformOrderEarnings(BigDecimal earnings, Integer requirementsInfoId, Integer userAccountId);
void updateRequirementsAmount(RequirementsInfoDO requirementsInfoDO);
void updateAmounts(RequirementsServiceDO requirementsServiceDO);
ReleaseSuccessDTO releaseSuccessDTO(Integer requirementsInfoId);
void updateOrderEarnings(BigDecimal orderAmount, Integer id);
void updatePlatformorderAmount(BigDecimal bigDecimal2, Integer id);
RequirementsServiceDO serviceReq(Integer requirementsInfoId);
void updateRepertory(Integer requirementsInfoId);
} }
package com.mmc.csf.release.entity.requirements;
import com.mmc.csf.infomation.dto.FlowDictionaryDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author small
* @Date 2023/8/22 13:22
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class FlowDictionaryDO implements Serializable {
private static final long serialVersionUID = -1811974173256250060L;
private Integer id;
@ApiModelProperty(value = "等待状态", example = "等待状态")
private String waiting;
@ApiModelProperty(value = "状态码", example = "状态码")
private String orderStatus;
@ApiModelProperty(value = "用户当前流程状态", example = "用户当前流程状态")
private String userPort;
@ApiModelProperty(value = "当前状态", example = "当前状态")
private String doing;
@ApiModelProperty(value = "飞手当前状态", example = "飞手当前状态")
private String flyerPort;
public FlowDictionaryDTO buildFlowDictionaryDTO() {
return FlowDictionaryDTO.builder()
.waiting(this.waiting)
.orderStatus(this.orderStatus)
.userPort(this.userPort)
.doing(this.doing)
.flyerPort(this.flyerPort)
.build();
}
}
package com.mmc.csf.release.entity.requirements;
import com.mmc.csf.config.IsNullConvertZero;
import com.mmc.csf.infomation.vo.ServiceRequirementsEditVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/22 13:54
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RequirementsAmountDO implements Serializable {
private static final long serialVersionUID = -1811974173256250060L;
private Integer id;
@ApiModelProperty(value = "发布需求id", example = "1")
private Integer requirementsInfoId;
@ApiModelProperty(value = "发布者订单金额", example = "1")
@IsNullConvertZero
private BigDecimal orderAmount;
@ApiModelProperty(value = "发布者支付总金额", example = "1")
@IsNullConvertZero
private BigDecimal totalAmount;
@ApiModelProperty(value = "级别金额", example = "1")
@IsNullConvertZero
private BigDecimal orderLevelAmount;
@ApiModelProperty(value = "订单级别 REGULAR_ORDER,RUSH_ORDER,TOP_ORDER", example = "订单级别 REGULAR_ORDER,RUSH_ORDER,TOP_ORDER")
private String orderLevel;
@ApiModelProperty(value = "发布者支付微信金额", example = "1")
@IsNullConvertZero
private BigDecimal weChat;
@ApiModelProperty(value = "发布者支付佣金金额", example = "1")
@IsNullConvertZero
private BigDecimal salaryAmount;
@ApiModelProperty(value = "发布者微信支付订单", example = "1")
private String wechatPayOrderNumber;
@ApiModelProperty(value = "修改任务后的佣金", example = "1")
@IsNullConvertZero
private BigDecimal updateOrderAmount;
@ApiModelProperty(value = "原因", example = "原因")
private String reason;
@ApiModelProperty(value = "原因", example = "原因")
private String url;
@ApiModelProperty(value = "后台获取token里面的用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "云享金", example = "10")
@IsNullConvertZero
private BigDecimal cashAmount;
@ApiModelProperty(value = "置顶/加急 佣金支付多少", example = "100")
@IsNullConvertZero
private BigDecimal levelSalaryAmount;
@ApiModelProperty(value = "置顶/加急 微信支付多少", example = "100")
@IsNullConvertZero
private BigDecimal levelWeChatAmount;
@ApiModelProperty(value = "置顶/加急 云享金支付多少", example = "100")
@IsNullConvertZero
private BigDecimal levelCashAmount;
public RequirementsAmountDO(ServiceRequirementsDO requirementsInfoDO) {
this.requirementsInfoId = requirementsInfoDO.getId();
this.orderAmount = requirementsInfoDO.getOrderAmount();
this.totalAmount = requirementsInfoDO.getTotalAmount();
this.orderLevelAmount = requirementsInfoDO.getOrderLevelAmount();
this.orderLevel = requirementsInfoDO.getOrderLevel();
this.weChat = requirementsInfoDO.getWeChat();
this.salaryAmount = requirementsInfoDO.getSalaryAmount();
this.wechatPayOrderNumber = requirementsInfoDO.getWechatPayOrderNumber();
this.userAccountId = requirementsInfoDO.getUserAccountId();
this.cashAmount = requirementsInfoDO.getCashAmount();
this.levelSalaryAmount = requirementsInfoDO.getLevelSalaryAmount();
this.levelWeChatAmount = requirementsInfoDO.getLevelWeChatAmount();
this.levelCashAmount = requirementsInfoDO.getLevelCashAmount();
}
public RequirementsAmountDO(ServiceRequirementsEditVO requirementsEditVO) {
this.orderAmount = requirementsEditVO.getOrderAmount();
this.wechatPayOrderNumber = requirementsEditVO.getWechatPayOrderNumber();
this.requirementsInfoId = requirementsEditVO.getRequirementsInfoId();
}
}
package com.mmc.csf.release.entity.requirements;
import com.mmc.csf.config.IsNullConvertZero;
import com.mmc.csf.infomation.vo.RequirementsAmountVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* @Author small
* @Date 2023/8/26 14:18
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RequirementsAmountUpdateDO {
private Integer id;
@ApiModelProperty(value = "服务需求id", example = "1")
private Integer requirementsInfoId;
@ApiModelProperty(value = "发布者订单金额", example = "100")
@IsNullConvertZero
private BigDecimal orderAmount;
@ApiModelProperty(value = "发布者修改订单金额", example = "100")
@IsNullConvertZero
private BigDecimal updateOrderAmount;
@ApiModelProperty(value = "需要支付的云享金", example = "100")
@IsNullConvertZero
private BigDecimal cashAmount;
@ApiModelProperty(value = "微信支付金额", example = "100")
@IsNullConvertZero
private BigDecimal weChat;
@ApiModelProperty(value = "佣金", example = "100")
@IsNullConvertZero
private BigDecimal salaryAmount;
@ApiModelProperty(value = "微信支付的订单编号", example = "100")
private String wechatPayOrderNumber;
@ApiModelProperty(value = "修改原因", example = "未按时完成任务")
private String reason;
@ApiModelProperty(value = "图片地址", example = "http://")
private String url;
@ApiModelProperty(value = "用户id", example = "1")
private Integer userAccountId;
@ApiModelProperty(value = "需要退回金额", example = "100")
@IsNullConvertZero
private BigDecimal returnCashAmount;
@ApiModelProperty(value = "需要退回微信金额")
@IsNullConvertZero
private BigDecimal returnWeChat;
@ApiModelProperty(value = "需要退回佣金")
@IsNullConvertZero
private BigDecimal returnSalaryAmount;
public RequirementsAmountUpdateDO(RequirementsAmountVO amountVO, RequirementsInfoDO requirementsInfoDO) {
this.updateOrderAmount = amountVO.getUpdateOrderAmount();
this.reason = amountVO.getReason();
this.url = amountVO.getUrl();
this.userAccountId = amountVO.getUserAccountId();
this.orderAmount = requirementsInfoDO.getOrderAmount();
this.requirementsInfoId = requirementsInfoDO.getId();
}
}
package com.mmc.csf.release.entity.requirements; package com.mmc.csf.release.entity.requirements;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mmc.csf.config.IsNullConvertZero;
import com.mmc.csf.infomation.vo.RequirementsInfoVO; import com.mmc.csf.infomation.vo.RequirementsInfoVO;
import com.mmc.csf.infomation.vo.ServiceRequirementsEditVO;
import com.mmc.csf.release.model.group.Insert; import com.mmc.csf.release.model.group.Insert;
import com.mmc.csf.release.model.group.Update; import com.mmc.csf.release.model.group.Update;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -13,6 +15,7 @@ import javax.validation.constraints.NotBlank; ...@@ -13,6 +15,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
...@@ -46,12 +49,12 @@ public class RequirementsInfoDO implements Serializable { ...@@ -46,12 +49,12 @@ public class RequirementsInfoDO implements Serializable {
@ApiModelProperty(value = "任务开始时间", example = "2023-07-25", required = true) @ApiModelProperty(value = "任务开始时间", example = "2023-07-25", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class}) @NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date taskStartTime; private String taskStartTime;
@ApiModelProperty(value = "任务结束时间", example = "2023-07-26", required = true) @ApiModelProperty(value = "任务结束时间", example = "2023-07-26", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class}) @NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date taskEndTime; private String taskEndTime;
@ApiModelProperty(value = "任务地址", example = "广东省深圳市", required = true) @ApiModelProperty(value = "任务地址", example = "广东省深圳市", required = true)
@NotBlank(message = "任务地址不能为空", groups = {Insert.class, Update.class}) @NotBlank(message = "任务地址不能为空", groups = {Insert.class, Update.class})
...@@ -77,6 +80,99 @@ public class RequirementsInfoDO implements Serializable { ...@@ -77,6 +80,99 @@ public class RequirementsInfoDO implements Serializable {
@ApiModelProperty(value = "发布者订单编号") @ApiModelProperty(value = "发布者订单编号")
private String publisherNumber; private String publisherNumber;
@ApiModelProperty(value = "订单级别", example = "订单级别", required = true)
@NotNull(message = "订单级别", groups = {Insert.class})
private String orderLevel;
@ApiModelProperty(value = "服务id", example = "服务id", required = true)
private Integer serviceId;
@ApiModelProperty(value = "服务名称", example = "服务名称")
private String serviceName;
@ApiModelProperty(value = "发布者支付总金额", example = "发布者支付总金额")
@IsNullConvertZero
private BigDecimal totalAmount;
@ApiModelProperty(value = "允许几人抢单", example = "允许几人抢单")
private Integer repertory;
private String insurance;
private String doing;
private String waiting;
private String userPort;
private String flyerPort;
private String orderStatus;
private Integer publish;
@IsNullConvertZero
private BigDecimal preemptTotalAmount;
@IsNullConvertZero
private BigDecimal orderAmount;
private Integer serviceFlowId;
@ApiModelProperty(value = "修格后的任务佣金")
@IsNullConvertZero
private BigDecimal updateOrderAmount;
@ApiModelProperty(value = "原因")
private String reason;
@ApiModelProperty(value = "原因url")
private String url;
@ApiModelProperty(value = "微信支付订单编号")
private String wechatPayOrderNumber;
@ApiModelProperty(value = "发布者支付任务佣金 佣金金额")
@IsNullConvertZero
private BigDecimal cashAmount;
@IsNullConvertZero
private BigDecimal weChat;
@IsNullConvertZero
private BigDecimal salaryAmount;
@ApiModelProperty(value = "抢单飞手用户id ")
private Integer pilotCertificationUserId;
@ApiModelProperty(value = "抢单飞手用户openid ")
private String flyerOpenid;
@ApiModelProperty(value = "飞手获得任务佣金")
@IsNullConvertZero
private BigDecimal receiveSalaryAmount;
@ApiModelProperty(value = "地区编码", example = "307013")
private String adcode;
@ApiModelProperty(value = "抢单级别金额")
@IsNullConvertZero
private BigDecimal orderLevelAmount;
@IsNullConvertZero
private BigDecimal levelCashAmount;
@IsNullConvertZero
private BigDecimal levelWeChatAmount;
@IsNullConvertZero
private BigDecimal levelSalaryAmount;
@ApiModelProperty(value = "修改后原因")
private String afterModificationReason;
@ApiModelProperty(value = "修改后url")
private String afterModificationUrl;
@ApiModelProperty(value = "抢单者电话")
private String preemptPhone;
@ApiModelProperty(value = "平台总收益")
@IsNullConvertZero
private BigDecimal orderEarnings;
@ApiModelProperty(value = "抢单飞手id")
private Integer pilotCertificationId;
public RequirementsInfoVO buildRequirementsInfoVO() { public RequirementsInfoVO buildRequirementsInfoVO() {
return RequirementsInfoVO.builder().id(this.id).requirementTypeId(this.requirementTypeId).userAccountId(this.userAccountId).publishName(this.publishName) return RequirementsInfoVO.builder().id(this.id).requirementTypeId(this.requirementTypeId).userAccountId(this.userAccountId).publishName(this.publishName)
...@@ -87,7 +183,30 @@ public class RequirementsInfoDO implements Serializable { ...@@ -87,7 +183,30 @@ public class RequirementsInfoDO implements Serializable {
.latitude(this.latitude) .latitude(this.latitude)
.requirementTypeName(this.requirementTypeName) .requirementTypeName(this.requirementTypeName)
.publisherNumber(this.publisherNumber) .publisherNumber(this.publisherNumber)
.requireUrl(this.requireUrl).build(); .requireUrl(this.requireUrl)
.orderLevelEnum(this.orderLevel)
.serviceId(this.serviceId)
.serviceName(this.serviceName)
.totalAmount(this.totalAmount)
.insurance(this.insurance)
.doing(this.doing)
.waiting(this.waiting)
.userPort(this.userPort)
.flyerPort(this.flyerPort)
.orderStatus(this.orderStatus)
.publish(this.publish)
.preemptTotalAmount(this.preemptTotalAmount)
.orderAmount(this.orderAmount)
.updateOrderAmount(this.updateOrderAmount)
.reason(this.reason)
.url(this.url)
.afterModificationReason(this.afterModificationReason)
.afterModificationUrl(this.afterModificationUrl)
.pilotCertificationUserId(this.pilotCertificationUserId)
.preemptPhone(this.preemptPhone)
.pilotCertificationId(this.pilotCertificationId)
.build();
} }
public RequirementsInfoDO(RequirementsInfoVO requirementsInfoVO) { public RequirementsInfoDO(RequirementsInfoVO requirementsInfoVO) {
...@@ -109,4 +228,18 @@ public class RequirementsInfoDO implements Serializable { ...@@ -109,4 +228,18 @@ public class RequirementsInfoDO implements Serializable {
this.requireUrl = requirementsInfoVO.getRequireUrl(); this.requireUrl = requirementsInfoVO.getRequireUrl();
} }
public RequirementsInfoDO(ServiceRequirementsEditVO requirementsEditVO) {
this.id = requirementsEditVO.getRequirementsInfoId();
this.taskEndTime = requirementsEditVO.getTaskEndTime();
this.taskStartTime = requirementsEditVO.getTaskStartTime();
this.serviceId = requirementsEditVO.getServiceId();
this.requireDescription = requirementsEditVO.getRequireDescription();
this.taskAddress = requirementsEditVO.getTaskAddress();
this.longitude = requirementsEditVO.getLongitude();
this.latitude = requirementsEditVO.getLatitude();
this.adcode = requirementsEditVO.getAdcode();
this.orderAmount = requirementsEditVO.getOrderAmount();
}
} }
package com.mmc.csf.release.entity.requirements;
import com.alibaba.fastjson.annotation.JSONField;
import com.mmc.csf.config.IsNullConvertZero;
import com.mmc.csf.infomation.dto.PilotCertificationInteriorDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/18 17:23
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RequirementsServiceDO implements Serializable {
private static final long serialVersionUID = -1811974173256250060L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "服务需求id")
private Integer requirementsInfoId;
@ApiModelProperty(value = "字典id暂时无用")
private Integer serviceDictionaryId;
@ApiModelProperty(value = "抢单飞手id")
private Integer pilotCertificationId;
@ApiModelProperty(value = "抢单飞手用户id")
private Integer pilotCertificationUserId;
@ApiModelProperty(value = "抢单飞手团队id")
private Integer teamId;
@ApiModelProperty(value = "抢单飞手团队用户id")
private Integer teamUserId;
@ApiModelProperty(value = "云享金", example = "10")
@IsNullConvertZero
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金", example = "10")
@IsNullConvertZero
private BigDecimal salaryAmount;
@ApiModelProperty(value = "微信金额", example = "10")
@IsNullConvertZero
private BigDecimal weChat;
@ApiModelProperty(value = "微信支付订单编号", example = "R202308191657303116170")
private String wechatPayOrderNumber;
@ApiModelProperty(value = "抢单支付的总金额", example = "抢单支付的总金额")
@IsNullConvertZero
private BigDecimal preemptTotalAmount;
@ApiModelProperty(value = "任务流程id", example = "任务流程id")
private Integer serviceFlowId;
@ApiModelProperty(value = "发布者用户id")
private Integer userAccountId;
@ApiModelProperty(value = "订单编号")
private String publisherNumber;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty(value = "任务佣金")
@IsNullConvertZero
private BigDecimal percentagePenaltyOfOrder;
@ApiModelProperty(value = "发布者订单的任务佣金")
@IsNullConvertZero
private BigDecimal orderAmount;
@ApiModelProperty(value = "抢单者openid")
private String openid;
@ApiModelProperty(value = "手机号", hidden = true)
private String phoneNum;
@ApiModelProperty(value = "平台总收益")
@IsNullConvertZero
private BigDecimal orderEarnings;
public RequirementsServiceDO(PilotCertificationInteriorDTO pilot, ServiceRequirementsDO requirementsInfoDO) {
this.pilotCertificationId = pilot.getId();
this.pilotCertificationUserId = pilot.getUserAccountId();
this.requirementsInfoId = requirementsInfoDO.getId();
}
}
package com.mmc.csf.release.entity.requirements;
import com.mmc.csf.infomation.dto.ServiceArriveSceneDTO;
import com.mmc.csf.infomation.vo.ServiceArriveSceneVO;
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.NotNull;
/**
* @Author small
* @Date 2023/8/18 19:29
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceArriveSceneDO {
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "id")
private Double longitude;
@ApiModelProperty(value = "id")
private Double latitude;
@ApiModelProperty(value = "现场地址")
private String sceneAddress;
@ApiModelProperty(value = "现场地址的url", required = true)
private String sceneUrl;
@ApiModelProperty(value = "现场用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "服务需求id", required = true)
private Integer requirementsInfoId;
public ServiceArriveSceneDO(ServiceArriveSceneVO serviceArriveSceneVO) {
this.longitude = serviceArriveSceneVO.getLongitude();
this.latitude = serviceArriveSceneVO.getLatitude();
this.sceneAddress = serviceArriveSceneVO.getSceneAddress();
this.sceneUrl = serviceArriveSceneVO.getSceneUrl();
this.userAccountId = serviceArriveSceneVO.getUserAccountId();
this.requirementsInfoId = serviceArriveSceneVO.getRequirementsInfoId();
}
public ServiceArriveSceneDTO buildServiceArriveSceneDTO() {
return ServiceArriveSceneDTO
.builder()
.longitude(this.longitude)
.latitude(this.latitude)
.sceneAddress(this.sceneAddress)
.sceneUrl(this.sceneUrl)
.userAccountId(this.userAccountId)
.requirementsInfoId(this.requirementsInfoId)
.build();
}
}
package com.mmc.csf.release.entity.requirements;
import com.alibaba.fastjson.annotation.JSONField;
import com.mmc.csf.infomation.dto.ServiceEvaluateDTO;
import com.mmc.csf.infomation.vo.ServiceEvaluateVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/18 22:08
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceEvaluateDO {
@ApiModelProperty(value = "id", example = "1")
private Integer id;
@ApiModelProperty(value = "需求id", example = "83")
private Integer requirementsInfoId;
@ApiModelProperty(value = "完成任务的用户", example = "1", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "评价内容", example = "1")
private String evaluationContent;
@ApiModelProperty(value = "星级", example = "星")
private String starLevel;
@ApiModelProperty(value = "评价图片", example = "星")
private String evaluationUrl;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
public ServiceEvaluateDO(ServiceEvaluateVO evaluateVO) {
this.requirementsInfoId = evaluateVO.getRequirementsInfoId();
this.userAccountId = evaluateVO.getUserAccountId();
this.evaluationContent = evaluateVO.getEvaluationContent();
this.starLevel = evaluateVO.getStarLevel();
this.evaluationUrl = evaluateVO.getEvaluationUrl();
}
public ServiceEvaluateDTO buildServiceEvaluateDTO() {
return ServiceEvaluateDTO.builder()
.id(this.id)
.requirementsInfoId(this.requirementsInfoId)
.userAccountId(this.userAccountId)
.starLevel(this.starLevel)
.evaluationContent(this.evaluationContent)
.evaluationUrl(this.evaluationUrl)
.createTime(this.createTime)
.updateTime(this.updateTime)
.build();
}
}
package com.mmc.csf.release.entity.requirements;
import com.alibaba.fastjson.annotation.JSONField;
import com.mmc.csf.infomation.dto.ServiceFulfilATaskDTO;
import com.mmc.csf.infomation.vo.ServiceFulfilATaskVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/18 20:40
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceFulfilATaskDO {
private Integer id;
@ApiModelProperty(value = "完成任务描述", example = "完成任务描述一下")
private String taskDescribe;
@ApiModelProperty(value = "完成任务图片", example = "http://")
private String taskUrl;
@ApiModelProperty(value = "需求id", example = "83")
private Integer requirementsInfoId;
@ApiModelProperty(value = "完成任务的用户", example = "1", hidden = true)
private Integer userAccountId;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
public ServiceFulfilATaskDO(ServiceFulfilATaskVO serviceFulfilATaskVO) {
this.taskDescribe = serviceFulfilATaskVO.getTaskDescribe();
this.taskUrl = serviceFulfilATaskVO.getTaskUrl();
this.requirementsInfoId = serviceFulfilATaskVO.getRequirementsInfoId();
this.userAccountId = serviceFulfilATaskVO.getUserAccountId();
}
public ServiceFulfilATaskDTO buildServiceFulfilATaskDTO() {
return ServiceFulfilATaskDTO.builder()
.id(this.id)
.taskDescribe(this.taskDescribe)
.taskUrl(this.taskUrl)
.requirementsInfoId(this.requirementsInfoId)
.userAccountId(this.userAccountId)
.createTime(this.createTime)
.updateTime(this.updateTime)
.build();
}
}
package com.mmc.csf.release.entity.requirements;
import com.mmc.csf.infomation.dto.ServiceOrderFormDTO;
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 10:59
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceOrderFormDO {
private static final long serialVersionUID = -447951390213113317L;
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "服务类型id", example = "1")
@NotBlank(message = "服务类型id不能为空", groups = {Insert.class, Update.class})
private Integer serviceId;
@ApiModelProperty(value = "服务类型名称", example = "航拍摄影")
private String serviceName;
@ApiModelProperty(value = "订单级别 REGULAR_ORDER,RUSH_ORDER,TOP_ORDER", example = "TOP_ORDER")
private String orderLevel;
@ApiModelProperty(value = "发布者订单编号", example = "R3123132132132131")
private String publisherNumber;
@ApiModelProperty(value = "发布者电话", example = "1892994543", required = false)
private String publishPhone;
@ApiModelProperty(value = "抢单者电话", example = "13134311231")
private String preemptPhone;
@ApiModelProperty(value = "订单当前状态", example = "进行中")
private String doing;
@ApiModelProperty(value = "1正常 2争议订单", example = "1")
private Integer orderAttribute;
@ApiModelProperty(value = "平台总收益", example = "100")
private BigDecimal orderEarnings;
@ApiModelProperty(value = "发单时间", example = "")
private String createTime;
@ApiModelProperty(value = "更新时间", example = "")
private String updateTime;
@ApiModelProperty(value = "状态", example = "100")
private String orderStatus;
@ApiModelProperty(value = "等待状态", example = "100")
private String waiting;
public ServiceOrderFormDTO buildServiceOrderForm() {
return ServiceOrderFormDTO.builder()
.id(this.id)
.serviceName(this.serviceName)
.serviceId(this.serviceId)
.orderLevel(this.orderLevel)
.publisherNumber(this.publisherNumber)
.publishPhone(this.publishPhone)
.preemptPhone(this.preemptPhone)
.doing(this.doing)
.orderEarnings(this.orderEarnings)
.orderAttribute(this.orderAttribute)
.createTime(this.createTime)
.updateTime(this.updateTime)
.orderStatus(this.orderStatus)
.waiting(this.waiting)
.build();
}
}
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;
@ApiModelProperty(value = "更新时间", example = "")
private String updateTime;
@ApiModelProperty(value = "状态", example = "100")
private String orderStatus;
@ApiModelProperty(value = "当前状态")
private String doing;
@ApiModelProperty(value = "平台总收益")
private BigDecimal orderEarnings;
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)
.createTime(this.createTime)
.updateTime(this.updateTime)
.orderStatus(this.orderStatus)
.orderEarnings(this.orderEarnings)
.build();
}
}
package com.mmc.csf.release.entity.requirements;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mmc.csf.config.IsNullConvertZero;
import com.mmc.csf.infomation.vo.OrderLevelEnum;
import com.mmc.csf.infomation.vo.ServiceRequirementsVO;
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.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/17 10:54
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ServiceRequirementsDO {
private static final long serialVersionUID = -447951390213113317L;
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "id")
@NotBlank(message = "服务类型id不能为空", groups = {Insert.class, Update.class})
private Integer serviceId;
@ApiModelProperty(value = "飞行日期——任务开始时间", example = "2023-07-25", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date taskStartTime;
@ApiModelProperty(value = "飞行日期——任务结束时间", example = "2023-07-26", required = true)
@NotNull(message = "任务开始时间不能为空", groups = {Insert.class, Update.class})
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date taskEndTime;
@ApiModelProperty(value = "飞行位置——任务地址", example = "广东省深圳市", required = true)
@NotBlank(message = "任务地址不能为空", groups = {Insert.class, Update.class})
private String taskAddress;
@ApiModelProperty(value = "飞行位置——任务经度", example = "23.344324", required = true)
@NotNull(message = "任务经度不能为空", groups = {Insert.class, Update.class})
private Double longitude;
@ApiModelProperty(value = "飞行位置——任务纬度", example = "44.344324", required = true)
@NotNull(message = "任务纬度不能为空", groups = {Insert.class, Update.class})
private Double latitude;
@ApiModelProperty(value = "需求描述", example = "描述一下", required = true)
@NotNull(message = "需求描述不能为空", groups = {Insert.class})
@Length(max = 300, message = "字符过长")
private String requireDescription;
@ApiModelProperty(value = "订单金额", example = "订单金额", required = true)
@NotNull(message = "订单金额", groups = {Insert.class})
@IsNullConvertZero
private BigDecimal orderAmount;
@ApiModelProperty(value = "飞手保险", example = "飞手保险", required = true)
@NotNull(message = "飞手保险", groups = {Insert.class})
private String insurance;
@ApiModelProperty(value = "订单级别", example = "订单级别", required = true)
@NotNull(message = "订单级别", groups = {Insert.class})
private OrderLevelEnum orderLevelEnum;
@ApiModelProperty(value = "后台获取token里面的用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "发布者姓名", example = "张三")
private String publishName;
@ApiModelProperty(value = "发布者电话", example = "1892994543", required = true)
@NotNull(message = "发布者电话不能为空", groups = {Insert.class})
private String publishPhone;
@ApiModelProperty(value = "发布者订单编号")
private String publisherNumber;
@ApiModelProperty(value = "0普通 100急单 300置顶")
@IsNullConvertZero
private BigDecimal orderLevelAmount;
@ApiModelProperty(value = "订单级别 REGULAR_ORDER,RUSH_ORDER,TOP_ORDER")
private String orderLevel;
@ApiModelProperty(value = "总金额", example = "100", required = true)
@NotNull(message = "总金额", groups = {Insert.class})
@IsNullConvertZero
private BigDecimal totalAmount;
@ApiModelProperty(value = "云享金", example = "10")
@IsNullConvertZero
private BigDecimal cashAmount;
@ApiModelProperty(value = "佣金", example = "10")
@IsNullConvertZero
private BigDecimal salaryAmount;
@ApiModelProperty(value = "微信金额", example = "10")
@IsNullConvertZero
private BigDecimal weChat;
@ApiModelProperty(value = "微信支付订单编号", example = "R202308191657303116170")
private String wechatPayOrderNumber;
private Integer repertory;
@ApiModelProperty(value = "支付方式,云享金:1,佣金:2,微信支付:3", example = "1,2,3")
private String paymentType;
@ApiModelProperty(value = "地区编码")
private String adcode;
@IsNullConvertZero
@ApiModelProperty(value = "置顶/加急 佣金支付多少", example = "100")
private BigDecimal levelSalaryAmount;
@ApiModelProperty(value = "置顶/加急 微信支付多少", example = "100")
@IsNullConvertZero
private BigDecimal levelWeChatAmount;
@ApiModelProperty(value = "置顶/加急 云享金支付多少", example = "100")
@IsNullConvertZero
private BigDecimal levelCashAmount;
@ApiModelProperty(value = "openid")
private String openid;
@ApiModelProperty(value = "服务名称")
private String serviceName;
public ServiceRequirementsDO(ServiceRequirementsVO serviceRequirementsVO) {
this.id = serviceRequirementsVO.getId();
this.userAccountId = serviceRequirementsVO.getUserAccountId();
this.publishName = serviceRequirementsVO.getPublishName();
this.publishPhone = serviceRequirementsVO.getPublishPhone();
this.requireDescription = serviceRequirementsVO.getRequireDescription();
this.taskStartTime = serviceRequirementsVO.getTaskStartTime();
this.taskEndTime = serviceRequirementsVO.getTaskEndTime();
this.taskAddress = serviceRequirementsVO.getTaskAddress();
this.longitude = serviceRequirementsVO.getLongitude();
this.latitude = serviceRequirementsVO.getLatitude();
this.orderLevelAmount = OrderLevelEnum.match(serviceRequirementsVO.getOrderLevelEnum().getKey()).getValue();
this.orderLevel = serviceRequirementsVO.getOrderLevelEnum().getKey();
this.totalAmount = serviceRequirementsVO.getOrderAmount().add(OrderLevelEnum.match(serviceRequirementsVO.getOrderLevelEnum().getKey()).getValue());
this.serviceId = serviceRequirementsVO.getServiceId();
this.orderAmount = serviceRequirementsVO.getOrderAmount();
this.insurance = serviceRequirementsVO.getInsurance();
this.cashAmount = serviceRequirementsVO.getCashAmount();
this.salaryAmount = serviceRequirementsVO.getSalaryAmount();
this.wechatPayOrderNumber = serviceRequirementsVO.getWechatPayOrderNumber();
this.weChat = serviceRequirementsVO.getWeChat();
this.paymentType = serviceRequirementsVO.getPaymentType();
this.adcode = serviceRequirementsVO.getAdcode();
}
}
package com.mmc.csf.release.entity.requirements;
import com.alibaba.fastjson.annotation.JSONField;
import com.mmc.csf.infomation.dto.ServiceSettleAccountsDTO;
import com.mmc.csf.infomation.vo.ServiceSettleAccountsVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author small
* @Date 2023/8/18 21:24
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ServiceSettleAccountsDO implements Serializable {
private static final long serialVersionUID = -447951390213113317L;
private Integer id;
@ApiModelProperty(value = "订单金额", example = "100")
private BigDecimal orderAmount;
@ApiModelProperty(value = "备注", example = "项目延期")
private String remark;
@ApiModelProperty(value = "需求id", example = "83")
private Integer requirementsInfoId;
@ApiModelProperty(value = "结算的用户id", example = "1", hidden = true)
private Integer userAccountId;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
public ServiceSettleAccountsDO(ServiceSettleAccountsVO accountsVO) {
this.id = accountsVO.getId();
this.orderAmount = accountsVO.getOrderAmount();
this.remark = accountsVO.getRemark();
this.requirementsInfoId = accountsVO.getRequirementsInfoId();
this.userAccountId = accountsVO.getUserAccountId();
}
public ServiceSettleAccountsDTO buildServiceSettleAccountsDTO() {
return ServiceSettleAccountsDTO.builder()
.id(this.id)
.orderAmount(this.orderAmount)
.remark(this.remark)
.requirementsInfoId(this.requirementsInfoId)
.userAccountId(this.userAccountId)
.createTime(this.createTime)
.updateTime(this.updateTime)
.build();
}
}
...@@ -2,6 +2,7 @@ package com.mmc.csf.release.feign; ...@@ -2,6 +2,7 @@ package com.mmc.csf.release.feign;
import com.mmc.csf.release.feign.hystrix.PmsAppApHystrix; import com.mmc.csf.release.feign.hystrix.PmsAppApHystrix;
import com.mmc.csf.release.flyer.dto.AllCategoryDTO; import com.mmc.csf.release.flyer.dto.AllCategoryDTO;
import com.mmc.csf.release.industry.IndustryTypeDTO;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
...@@ -17,4 +18,9 @@ import java.util.List; ...@@ -17,4 +18,9 @@ import java.util.List;
public interface PmsAppApi { public interface PmsAppApi {
@RequestMapping(value = "/pms/classify/feignQqueryCategoryInfoByType", method = RequestMethod.GET) @RequestMapping(value = "/pms/classify/feignQqueryCategoryInfoByType", method = RequestMethod.GET)
public List<AllCategoryDTO> feignQqueryCategoryInfoByType(@RequestParam Integer type); public List<AllCategoryDTO> feignQqueryCategoryInfoByType(@RequestParam Integer type);
@RequestMapping(value = "/pms/industry/getIndustryTypeById", method = RequestMethod.GET)
public IndustryTypeDTO feignQquerygetIndustryTypeById(@RequestParam Integer id);
} }
package com.mmc.csf.release.feign; package com.mmc.csf.release.feign;
import com.mmc.csf.infomation.dto.PilotCertificationInteriorDTO;
import com.mmc.csf.infomation.dto.UserAccountSimpleDTO; import com.mmc.csf.infomation.dto.UserAccountSimpleDTO;
import com.mmc.csf.release.auth.qo.BUserAccountQO; import com.mmc.csf.release.auth.qo.BUserAccountQO;
import com.mmc.csf.release.auth.qo.UserAccountQO; import com.mmc.csf.release.auth.qo.UserAccountQO;
...@@ -19,6 +21,7 @@ import java.util.List; ...@@ -19,6 +21,7 @@ import java.util.List;
public interface UserAppApi { public interface UserAppApi {
/** /**
* 根据用户id获取基本信息 * 根据用户id获取基本信息
*
* @param userAccountId * @param userAccountId
* @return * @return
*/ */
...@@ -27,6 +30,7 @@ public interface UserAppApi { ...@@ -27,6 +30,7 @@ public interface UserAppApi {
/** /**
* 根据地区信息查询用户id * 根据地区信息查询用户id
*
* @param provinceCode * @param provinceCode
* @param cityCode * @param cityCode
* @param districtCode * @param districtCode
...@@ -44,14 +48,26 @@ public interface UserAppApi { ...@@ -44,14 +48,26 @@ public interface UserAppApi {
* @return {@link List}<{@link UserAccountSimpleDTO}> * @return {@link List}<{@link UserAccountSimpleDTO}>
*/ */
@PostMapping("/userapp/back-user/feignListBAccountPage") @PostMapping("/userapp/back-user/feignListBAccountPage")
List<UserAccountSimpleDTO> feignListBAccountPage(@ApiParam(value = "账号查询QO", required = true) @RequestBody BUserAccountQO bUserAccountQO, @RequestHeader("token") String token); List<UserAccountSimpleDTO> feignListBAccountPage(@ApiParam(value = "账号查询QO", required = true) @RequestBody BUserAccountQO bUserAccountQO, @RequestHeader("token") String token);
/** /**
* 获取小程序用户集合列表页面 * 获取小程序用户集合列表页面
*
* @param userAccountQO * @param userAccountQO
* @param token * @param token
* @return * @return
*/ */
@PostMapping("/userapp/user-account/feignListAppUserAccount") @PostMapping("/userapp/user-account/feignListAppUserAccount")
List<UserAccountSimpleDTO> feignListAppUserAccount(@ApiParam(value = "账号查询QO", required = true) @RequestBody UserAccountQO userAccountQO, @RequestHeader("token") String token); List<UserAccountSimpleDTO> feignListAppUserAccount(@ApiParam(value = "账号查询QO", required = true) @RequestBody UserAccountQO userAccountQO, @RequestHeader("token") String token);
/**
* 根据用户id获取基本信息
*
* @param userAccountId
* @return
*/
@GetMapping(value = "/userapp/pilot/interiorDetailPilot")
public PilotCertificationInteriorDTO feignInteriorDetailPilot(@RequestParam(required = true) Integer userAccountId);
} }
...@@ -2,6 +2,7 @@ package com.mmc.csf.release.feign.hystrix; ...@@ -2,6 +2,7 @@ package com.mmc.csf.release.feign.hystrix;
import com.mmc.csf.release.feign.PmsAppApi; import com.mmc.csf.release.feign.PmsAppApi;
import com.mmc.csf.release.flyer.dto.AllCategoryDTO; import com.mmc.csf.release.flyer.dto.AllCategoryDTO;
import com.mmc.csf.release.industry.IndustryTypeDTO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.List; import java.util.List;
...@@ -17,4 +18,10 @@ public class PmsAppApHystrix implements PmsAppApi { ...@@ -17,4 +18,10 @@ public class PmsAppApHystrix implements PmsAppApi {
log.info("熔断--feignQqueryCategoryInfoByType:" + type); log.info("熔断--feignQqueryCategoryInfoByType:" + type);
return null; return null;
} }
@Override
public IndustryTypeDTO feignQquerygetIndustryTypeById(Integer id) {
log.info("熔断--feignQquerygetIndustryTypeById:" + id);
return null;
}
} }
package com.mmc.csf.release.feign.hystrix; package com.mmc.csf.release.feign.hystrix;
import com.mmc.csf.infomation.dto.PilotCertificationInteriorDTO;
import com.mmc.csf.infomation.dto.UserAccountSimpleDTO; import com.mmc.csf.infomation.dto.UserAccountSimpleDTO;
import com.mmc.csf.release.auth.qo.BUserAccountQO; import com.mmc.csf.release.auth.qo.BUserAccountQO;
import com.mmc.csf.release.auth.qo.UserAccountQO; import com.mmc.csf.release.auth.qo.UserAccountQO;
...@@ -37,4 +38,10 @@ public class UserAppApiHystrix implements UserAppApi { ...@@ -37,4 +38,10 @@ public class UserAppApiHystrix implements UserAppApi {
log.error("熔断:feignListAppUserAccount:{}", userAccountQO); log.error("熔断:feignListAppUserAccount:{}", userAccountQO);
return null; return null;
} }
@Override
public PilotCertificationInteriorDTO feignInteriorDetailPilot(Integer userAccountId) {
log.error("熔断:feignInteriorDetailPilot:{}", userAccountId);
return null;
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论