chenchaod пре 1 месец
родитељ
комит
e4e5b1e8f7

+ 6
- 1
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/api/issue/OrderController.java Прегледај датотеку

@@ -102,7 +102,12 @@ public class OrderController extends MyValidController {
SignQueryResponseDTO res = issueOrderManage.signQuery(reqDto);
return ApiResponse.of(res);
}

@ApiOperation(value = "11.订单取消")
@PostMapping(value = "/orderCancel")
public ApiResponse<?> processOrderCancel(@Valid @RequestBody OrderCancelRequestDTO reqDto) throws ManagerException {
issueOrderManage.orderCancel(reqDto);
return ApiResponse.success().setMessage("取消成功");
}
@ApiOperation(value = "12.发行指令申请")
@PostMapping(value = "/issueApply")
public ApiResponse<InstApplyResponse> processIssueApply(@Valid @RequestBody InstApplyRequest reqDto) throws ManagerException {

+ 40
- 0
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/dto/issue/order/OrderCancelRequestDTO.java Прегледај датотеку

@@ -0,0 +1,40 @@
package cn.com.taiji.iaw.dto.issue.order;

import cn.com.taiji.common.valid.ViolationValidator;
import cn.com.taiji.core.dto.AbstractBizRequestDTO;
import cn.com.taiji.core.dto.AbstractStaffBizRequestDTO;
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 javax.validation.constraints.NotBlank;

/**
* @Author:ChenChao
* @Date:2025/6/12 9:25
* @Filename:OrderCancelRequestDTO
* @description: 订单取消
*/
@ApiModel(description = "订单取消")
@Getter
@Setter
public class OrderCancelRequestDTO extends AbstractBizRequestDTO {

private String staffId;

@NotBlank
@ApiModelProperty("订单编号")
private String orderNo;// 订单号
@NotBlank
@ApiModelProperty(value = "取消原因")
private String reason;// 取消原因

@Override
protected void validate(ViolationValidator validator) {
if (SourceType.SERVICE_HALL.equals(getOrderSource())){
validator.validFieldNotBlank("staffId",staffId);
}
}
}

+ 2
- 0
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/issue/IssueOrderManage.java Прегледај датотеку

@@ -52,4 +52,6 @@ public interface IssueOrderManage {
OrderDetailResDto orderDetailQuery(OrderDetailReqDto reqDto) throws ManagerException;

void orderReceiveGoods(OrderDetailReqDto reqDto) throws ManagerException;

void orderCancel(OrderCancelRequestDTO reqDto) throws ManagerException;
}

+ 19
- 1
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/issue/IssueOrderManageImpl.java Прегледај датотеку

@@ -311,13 +311,31 @@ public class IssueOrderManageImpl extends AbstractIawManager implements IssueOrd
}
LocalDateTime now = LocalDateTime.now();
orderinfo.setOrderStep(IssueOrderStep.WAITING_ACTIVE);
orderinfo.setShippingStatus(ShippingStatus.RECEIVED);
orderinfo.setUpdateTime(now);
issueOrderinfoRepo.merge(orderinfo);

String openId = findOpenIdByToken(reqDto.getAccessToken());
IssueOrderPost issueOrderPost = postList.get(0);
issueOrderPost.setReceivingTime(now);
issueOrderPost.setReceiveOpId(findOpenIdByToken(reqDto.getAccessToken()));
issueOrderPost.setReceiveOpId(openId);
issueOrderinfoPostRepo.merge(issueOrderPost);
sysPersistOperateLog(OperateType.ORDER_RECEIVEGOODS,orderinfo.getId(),reqDto.getOrderSource(), openId,"订单确认收货");
}

@Override
public void orderCancel(OrderCancelRequestDTO reqDto) throws ManagerException {
IssueOrderinfo order = checkOrder(reqDto.getOrderNo());
if (SourceType.CHANNEL.equals(order.getOrderSource())) {//因为涉及到退费,退费由渠道自己处理
throw new ManagerException("渠道订单不支持在综合业务平台取消");
}
String openId = findOpenIdByToken(reqDto.getAccessToken());
OrderCancelRequest request = copyProperties(reqDto, new OrderCancelRequest());
request.setOpenId(openId);
request.setStaffNum(reqDto.getStaffId());
request.setRefundStatus(0);
jsonPostRepeat(request);
sysPersistOperateLog(OperateType.ORDER_CANCEL,order.getId(),reqDto.getOrderSource(), openId,"订单取消");
}

//校验发行订单是否存在

Loading…
Откажи
Сачувај