修改微信退款逻辑
This commit is contained in:
parent
1e8a803dba
commit
83c205402d
@ -263,7 +263,7 @@ public class XhpcRefundAuditController extends BaseController {
|
||||
Double amount = Double.parseDouble(StringUtils.valueOf(xhpcRefundOrder.get("amount")));
|
||||
String amountRefundOrder = "-" + amount.toString();
|
||||
String tenantId = StringUtils.valueOf(xhpcRefundOrder.get("tenantId"));
|
||||
XhpcSettingConfig xhpcSettingConfig = xhpcCommonPayment.getXhpcSettingConfigTenantId(UserTypeUtil.OPERATION_WX_TYPE, refundOrder.getTenantId());
|
||||
XhpcSettingConfig xhpcSettingConfig = xhpcCommonPayment.getXhpcSettingConfigTenantId(UserTypeUtil.OPERATION_WX_TYPE, xhpcRefundOrder.get("tenantId").toString());
|
||||
if(xhpcSettingConfig ==null){
|
||||
refundOrder.setStatus(2);
|
||||
refundOrder.setRemark("订单状态不能退款");
|
||||
@ -532,7 +532,7 @@ public class XhpcRefundAuditController extends BaseController {
|
||||
String amountRefundOrder = "-" + money;
|
||||
String examineStatus = StringUtils.valueOf(xhpcRefundOrder.get("examineStatus"));
|
||||
String tenantId = StringUtils.valueOf(xhpcRefundOrder.get("tenantId"));
|
||||
XhpcSettingConfig xhpcSettingConfig = xhpcCommonPayment.getXhpcSettingConfigTenantId(UserTypeUtil.OPERATION_ALI_PAY_TYPE, refundOrder.getTenantId());
|
||||
XhpcSettingConfig xhpcSettingConfig = xhpcCommonPayment.getXhpcSettingConfigTenantId(UserTypeUtil.OPERATION_ALI_PAY_TYPE,xhpcRefundOrder.get("tenantId").toString());
|
||||
if(xhpcSettingConfig ==null){
|
||||
refundOrder.setStatus(2);
|
||||
refundOrder.setRemark("订单状态不能退款");
|
||||
|
||||
@ -142,6 +142,15 @@ public class XhpcRefundOrderServiceImpl implements IXhpcRefundOrderService {
|
||||
if (null != list && list.size() > 0) {
|
||||
return AjaxResult.error(HttpStatus.ERROR_STATUS, "还有未完成的订单");
|
||||
}
|
||||
Map<String, Object> objectMap = xhpcUserAccountStatementMapper.appUserInfo(Long.parseLong(appUserId));
|
||||
if (StringUtils.isNull(objectMap)) {
|
||||
return AjaxResult.error(HttpStatus.DATA_ERROR, "用户不存在");
|
||||
}
|
||||
String isRefundApplication = StringUtils.valueOf(objectMap.get("isRefundApplication"));
|
||||
if ("1".equals(isRefundApplication)) {
|
||||
return AjaxResult.error(HttpStatus.DATA_ERROR, "用户已存在退款订单");
|
||||
}
|
||||
|
||||
R user = userTypeService.getUser(null,userId , userType, null, tenantId);
|
||||
if(user !=null && user.getData() !=null){
|
||||
if(!UserTypeUtil.USER_TYPE.equals(userType) && !UserTypeUtil.COMMUNIT_TYPE.equals(userType)){
|
||||
@ -156,14 +165,6 @@ public class XhpcRefundOrderServiceImpl implements IXhpcRefundOrderService {
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Object> objectMap = xhpcUserAccountStatementMapper.appUserInfo(Long.parseLong(appUserId));
|
||||
if (StringUtils.isNull(objectMap)) {
|
||||
return AjaxResult.error(HttpStatus.DATA_ERROR, "用户不存在");
|
||||
}
|
||||
String isRefundApplication = StringUtils.valueOf(objectMap.get("isRefundApplication"));
|
||||
if ("1".equals(isRefundApplication)) {
|
||||
return AjaxResult.error(HttpStatus.DATA_ERROR, "用户已存在退款订单");
|
||||
}
|
||||
XhpcRefundOrder xhpcRefundOrder = new XhpcRefundOrder();
|
||||
xhpcRefundOrder.setUserId(userId);
|
||||
xhpcRefundOrder.setAmount(amount);
|
||||
|
||||
@ -278,8 +278,8 @@
|
||||
<if test="tenantId !=null and tenantId !=''">
|
||||
and xco.tenant_id = #{tenantId}
|
||||
</if>
|
||||
<if test="source !=null">
|
||||
and xco.source = #{source}
|
||||
<if test="userType !=null">
|
||||
and xco.source = #{userType}
|
||||
</if>
|
||||
ORDER BY xco.create_time DESC
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user