@@ -105,6 +105,8 @@ public enum OperateType { | |||
ORDER_RETURNAPPLY("发行订单退货申请"), | |||
ORDER_RETURNEXAM("发行订单退货审核"), | |||
ORDER_AGREEPROTOCOL("签署协议"), | |||
ORDER_CANCEL("订单取消"), | |||
ORDER_RECEIVEGOODS("订单确认收货"), | |||
; | |||
private final String value; |
@@ -22,8 +22,7 @@ import java.time.LocalDateTime; | |||
@Table(name = "ISSUE_ORDER_POST") | |||
public class IssueOrderPost extends StringPropertyUUIDEntity { | |||
@NotBlank | |||
@Size(max = 20) | |||
@NotNull | |||
@Column(name = "ORDER_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private OrderType orderType;//订单类型 |
@@ -17,6 +17,11 @@ public class InstApplyResponse extends AbstractSignTypeResponse { | |||
// private String orderNo;//发行订单号 | |||
// private Integer isOnline;//线上标识 1:线上;2:线下 | |||
public InstApplyResponse() { | |||
} | |||
public InstApplyResponse(Integer stepNo, String cmd, String cmdType, String transOrderId) { | |||
this.stepNo = stepNo; | |||
this.cmd = cmd; |
@@ -22,14 +22,10 @@ public class InstCallBackRequest extends AbstractSignTypeRequest<InstCallBackRes | |||
@NotBlank | |||
private String transOrderId;//交易编号 | |||
@NotBlank | |||
private String orderNo;// 发行订单号 | |||
@NotBlank | |||
private String cmd;//指令 | |||
@NotBlank | |||
private String cmdResult;//指令结果 | |||
@NotNull | |||
private ExcuteByVfjStep step;//步骤 | |||
@NotNull | |||
private Integer stepNo; | |||
public void relatedValid(ErrorMsgBuilder builder) { |
@@ -33,8 +33,8 @@ public enum InstServiceCmd implements SignServiceCommand { | |||
} | |||
@Override | |||
public boolean isMyCommand(String fileName) { | |||
return false; | |||
public boolean isMyCommand(String ifCode) { | |||
return this == fromIfCode(ifCode); | |||
} | |||
@Override |
@@ -12,6 +12,7 @@ dependencies { | |||
implementation "${groupname}:ias-protocol:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:ats-protocol:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:bls-protocol:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:ods-protocol:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:inss-protocol:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:smp-protocol:1.0.0-SNAPSHOT" | |||
implementation('cn.com.taiji.common:sso-client:2.3.10.7') |
@@ -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 { |
@@ -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); | |||
} | |||
} | |||
} |
@@ -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; | |||
} |
@@ -14,7 +14,6 @@ import cn.com.taiji.core.entity.dict.issue.OrderType; | |||
import cn.com.taiji.core.entity.dict.issue.ShippingStatus; | |||
import cn.com.taiji.core.entity.dict.log.OperateType; | |||
import cn.com.taiji.core.entity.issue.*; | |||
import cn.com.taiji.core.entity.user.AccountInfo; | |||
import cn.com.taiji.core.entity.user.Staff; | |||
import cn.com.taiji.core.manager.tools.minio.MinioUtil; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.*; | |||
@@ -202,8 +201,6 @@ public class IssueOrderManageImpl extends AbstractIawManager implements IssueOrd | |||
sysPersistOperateLog(OperateType.ORDER_AGREEPROTOCOL, order.getId(), reqDto.getOrderSource(), findOpenIdByToken(reqDto.getAccessToken()), "同意协议"); | |||
} | |||
@Override | |||
public PayQueryResponseDTO payQuery(PayQueryRequestDTO reqDto) throws ManagerException { | |||
reqDto.validate(); | |||
@@ -305,8 +302,8 @@ public class IssueOrderManageImpl extends AbstractIawManager implements IssueOrd | |||
public void orderReceiveGoods(OrderDetailReqDto reqDto) throws ManagerException { | |||
IssueOrderinfo orderinfo = checkOrder(reqDto.getOrderNo()); | |||
if (!IssueOrderStep.WAITING_RECEIVE.equals(orderinfo.getOrderStep()) || | |||
!ShippingStatus.WAIT_RECEIVING.equals(orderinfo.getShippingStatus())){ | |||
throw new ManagerException("当前订单阶段{"+orderinfo.getOrderStep().getStep()+"}不可收货"); | |||
!ShippingStatus.WAIT_RECEIVING.equals(orderinfo.getShippingStatus())) { | |||
throw new ManagerException("当前订单阶段{" + orderinfo.getOrderStep().getStep() + "}不可收货"); | |||
} | |||
List<IssueOrderPost> postList = issueOrderinfoPostRepo.findByOrderNoList(reqDto.getOrderNo(), OrderType.ISSUE); | |||
if (isEmpty(postList)) { | |||
@@ -314,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,"订单取消"); | |||
} | |||
//校验发行订单是否存在 |
@@ -119,7 +119,7 @@ public class IssueOrderExamineManageImpl extends AbstractManagewManager implemen | |||
} | |||
} else { | |||
if (!ShippingStatus.NONE.equals(order.getShippingStatus())) {//需要邮寄 | |||
order.setOrderStep(IssueOrderStep.WAITING_RECEIVE); | |||
order.setOrderStep(IssueOrderStep.WAITING_SEND); | |||
order.setShippingStatus(ShippingStatus.WAIT_SHIPPING); | |||
} else { | |||
order.setOrderStep(IssueOrderStep.WAITING_ACTIVE); |
@@ -199,7 +199,7 @@ public class VerificationRuleManager extends AbstractCommManager { | |||
* @param msg 错误信息个性化前缀 | |||
*/ | |||
public void ocrVarifyBusinessLicense(String name,String busNum, String imagUrl,StringBuilder builder, String msg) { | |||
ocrVarifyBusinessLicense(name, busNum, imagUrl,null, builder, msg); | |||
ocrVarifyBusinessLicense(name, busNum, imagUrl,"", builder, msg); | |||
} | |||
/** |
@@ -141,8 +141,9 @@ public class UserUploadManager extends AbstractOrderManager<UserUploadRequest> { | |||
userNegImgUrl = request.getAgentNegImgUrl(); | |||
userAddress = request.getAgentAddress(); | |||
} | |||
//有账户没有实名认证过的 | |||
if (accountInfo != null && !hasText(accountInfo.getIdNum())){ | |||
//有账户单但(没有证件号或证件地址) | |||
if (accountInfo != null && (!hasText(accountInfo.getIdNum()) || hasText(accountInfo.getUserIdImgUrl()) | |||
|| hasText(accountInfo.getUserIdBackImgUrl()))){ | |||
// throw newBusinessException("此手机号(账号)需要实名认证,登录小程序进行实名认证"); | |||
AuthRequest authRequest = new AuthRequest(); | |||
authRequest.setLoginSource(SourceType.SERVICE_HALL);//为了调接口通过,这里写死 |
@@ -31,11 +31,18 @@ public class AuthManager extends AbstractLoginManager implements LogManager<Auth | |||
long begin = System.currentTimeMillis(); | |||
findAndValidStaff(findOpenIdByToken(request.getAccessToken()), request.getLoginSource()); | |||
String openId = request.getLoginSource() == SourceType.WEB || request.getLoginSource() == SourceType.SERVICE_HALL ? request.getOpenId() : findOpenIdByToken(request.getAccessToken()); | |||
AccountInfo accountInfo = accountInfoRepo.findByIdNumAndIdType(request.getIdNum(), request.getIdType()); | |||
if (accountInfo != null) | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("该用户已存在实名账号"); | |||
AccountInfo byOpenId = accountInfoRepo.findByOpenId(openId); | |||
if (byOpenId == null) throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("该用户不存在"); | |||
//实名认证。但没有证件图片地址时,可以通过并认证 | |||
AccountInfo accountInfo = accountInfoRepo.findByIdNumAndIdType(request.getIdNum(), request.getIdType()); | |||
if (accountInfo != null) { | |||
if (hasText(accountInfo.getUserIdImgUrl()) && hasText(accountInfo.getUserIdBackImgUrl())) { | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("该用户已存在实名账号"); | |||
} | |||
if (!accountInfo.getIdNum().equals(request.getIdNum())){ | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("已存在绑定证件号与本次证件信息不一致"); | |||
} | |||
} | |||
byOpenId.setIdType(request.getIdType()); | |||
byOpenId.setIdNum(request.getIdNum()); | |||
byOpenId.setUserName(request.getUserName()); |
@@ -14,6 +14,7 @@ dependencies { | |||
implementation "${groupname}:entity-core:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:comm-core:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:inss-protocol:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:ifmw-protocol:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:ods-protocol:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:ats-protocol:1.0.0-SNAPSHOT" | |||
implementation "${groupname}:smp-protocol:1.0.0-SNAPSHOT" |