@@ -11,10 +11,10 @@ import java.time.LocalDateTime; | |||
public class OrderPayQueryModel extends BaseModel { | |||
/** 订单编号 */ | |||
private String orderId; | |||
private String orderNo; | |||
/** 支付订单编号 */ | |||
private String payOrderNo; | |||
/** 订单编号 */ | |||
/** 支付状态 */ | |||
private OrderPayStatus payStatus; | |||
/** 支付时间 */ | |||
private LocalDateTime payTime; |
@@ -14,7 +14,7 @@ public class OrderPayQueryResponse extends AbstractSignTypeResponse { | |||
private String receiveTime; | |||
private String orderNo; | |||
private Integer paymentStatus; | |||
private Integer paymentStatus;//1:全部支付完成,0:有待支付单 | |||
private Long sumFee; | |||
private List<OrderPayQueryModel> datas; | |||
} |
@@ -37,7 +37,7 @@ public class OrderController extends MyValidController { | |||
@ApiOperation(value = "2.app分页查询") | |||
@PostMapping(value = "/aOrderPage") | |||
public ApiResponse<Pagination> aOrderPage(@Valid @RequestBody OrderAppPageReqDTO reqDto) throws ManagerException { | |||
public ApiResponse<Pagination> aOrderPage(@Valid @RequestBody OrderAppPageReqDTO reqDto) { | |||
return ApiResponse.of(issueOrderManage.aOrderPage(reqDto)); | |||
} | |||
@@ -61,4 +61,31 @@ public class OrderController extends MyValidController { | |||
UploadVehicleResDTO res = issueOrderManage.upVehicle(reqDto); | |||
return ApiResponse.of(res); | |||
} | |||
@ApiOperation(value = "6.签署协议检测,true需要签署协议") | |||
@PostMapping(value = "/checkProtocol") | |||
public ApiResponse<Boolean> checkProtocol(@Valid @RequestBody CheckProtocolReqDTO reqDto) throws ManagerException { | |||
Boolean flag = issueOrderManage.checkProtocol(reqDto); | |||
return ApiResponse.of(flag); | |||
} | |||
// @ApiOperation(value = "7.支付申请") | |||
// @PostMapping(value = "/payApply") | |||
// public ApiResponse<UploadVehicleResDTO> payApply(@Valid @RequestBody UploadVehicleReqDTO reqDto) throws ManagerException { | |||
// issueOrderManage.payApply(reqDto); | |||
// return ApiResponse.of(res); | |||
// } | |||
@ApiOperation(value = "8.支付查询") | |||
@PostMapping(value = "/payQuery") | |||
public ApiResponse<PayQueryResponseDTO> payQuery(@Valid @RequestBody PayQueryRequestDTO reqDto) throws ManagerException { | |||
PayQueryResponseDTO res = issueOrderManage.payQuery(reqDto); | |||
return ApiResponse.of(res); | |||
} | |||
// | |||
// @ApiOperation(value = "8.签约及签约检测") | |||
// @PostMapping(value = "/upVehicle") | |||
// public ApiResponse<UploadVehicleResDTO> upVehicle(@Valid @RequestBody UploadVehicleReqDTO reqDto) throws ManagerException { | |||
// UploadVehicleResDTO res = issueOrderManage.upVehicle(reqDto); | |||
// return ApiResponse.of(res); | |||
// } | |||
} |
@@ -0,0 +1,19 @@ | |||
package cn.com.taiji.iaw.dto.issue; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
/** | |||
* @Author:ChenChao | |||
* @Date:2025/6/23 22:03 | |||
* @Filename:CheckProtocolReqDTO | |||
* @description: | |||
*/ | |||
@Data | |||
@ApiModel(description = "签署协议检测请求") | |||
public class CheckProtocolReqDTO { | |||
@ApiModelProperty(value = "订单编号") | |||
private String orderNo; | |||
} |
@@ -0,0 +1,37 @@ | |||
package cn.com.taiji.iaw.dto.issue; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import cn.com.taiji.core.dto.AbstractBizRequestDTO; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
import javax.validation.constraints.NotNull; | |||
/** | |||
* FIXME 待加注解 | |||
*/ | |||
@ApiModel(description = "发行支付查询请求") | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class PayQueryRequestDTO extends AbstractBizRequestDTO { | |||
@ApiModelProperty(value = "订单编号") | |||
@NotNull | |||
private String orderNo; | |||
@ApiModelProperty(value = "微信用户标识") | |||
private String wxOpenId; | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
if (SourceType.WECHAT.equals(getOrderSource())){ | |||
validator.validFieldNotBlank("wxOpenId", wxOpenId); | |||
} | |||
} | |||
} |
@@ -0,0 +1,24 @@ | |||
package cn.com.taiji.iaw.dto.issue; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.OrderPayQueryModel; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import java.util.List; | |||
@ApiModel(description = "发行支付查询响应") | |||
@Getter | |||
@Setter | |||
public class PayQueryResponseDTO { | |||
@ApiModelProperty(value = "订单编号") | |||
private String orderNo; | |||
@ApiModelProperty(value = "支付状态 1:全部支付完成,0:有待支付单") | |||
private Integer paymentStatus;//1:全部支付完成,0:有待支付单 | |||
@ApiModelProperty(value = "总金额") | |||
private Long sumFee; | |||
@ApiModelProperty(value = "支付单列表") | |||
private List<OrderPayQueryModel> datas; | |||
} |
@@ -21,4 +21,8 @@ public interface IssueOrderManage { | |||
String upUser(UploadUserReqDTO reqDto) throws ManagerException; | |||
UploadVehicleResDTO upVehicle(UploadVehicleReqDTO reqDto) throws ManagerException; | |||
PayQueryResponseDTO payQuery(PayQueryRequestDTO reqDto) throws ManagerException; | |||
Boolean checkProtocol(CheckProtocolReqDTO reqDto); | |||
} |
@@ -105,4 +105,27 @@ public class IssueOrderManageImpl extends AbstractCommManager implements IssueOr | |||
res.setFlag(2); | |||
return res; | |||
} | |||
@Override | |||
public Boolean checkProtocol(CheckProtocolReqDTO reqDto) { | |||
IssueOrderinfo orderNo = issueOrderinfoRepo.findByOrderNo(reqDto.getOrderNo()); | |||
IssueProduct product = issueProductRepo.findByReleaseId(orderNo.getProtocol()); | |||
//黔通签署协议 | |||
if (product.getSigningParty() == 0 && !"1".equals(orderNo.getProtocol())) { | |||
return true; | |||
} | |||
return false; | |||
} | |||
@Override | |||
public PayQueryResponseDTO payQuery(PayQueryRequestDTO reqDto) throws ManagerException { | |||
reqDto.validate(); | |||
OrderPayQueryRequest request = new OrderPayQueryRequest(); | |||
request.setOrderNo(reqDto.getOrderNo()); | |||
request.setSubOpenId(reqDto.getWxOpenId()); | |||
OrderPayQueryResponse response = jsonPostRepeat(request); | |||
return copyProperties(response, new PayQueryResponseDTO()); | |||
} | |||
} |