This commit is contained in:
Lemon
2023-08-22 11:12:38 +08:00
4 changed files with 30 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ import com.jsowell.common.constant.HttpStatus;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.core.domain.model.LoginUser;
import com.jsowell.common.core.page.PageDomain;
import com.jsowell.common.core.page.PageResponse;
import com.jsowell.common.core.page.TableDataInfo;
import com.jsowell.common.core.page.TableSupport;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
@@ -86,6 +87,15 @@ public class BaseController {
return rspData;
}
protected TableDataInfo getDataTable(PageResponse pageResponse) {
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setMsg("查询成功");
rspData.setRows(pageResponse.getList());
rspData.setTotal(pageResponse.getTotal());
return rspData;
}
/**
* 返回成功
*/

View File

@@ -694,6 +694,7 @@ public class AdapayService {
settleCountParams.put("member_id", adapayAccountBalanceVO.getAdapayMemberId());
settleCountParams.put("app_id", config.getAdapayAppId());
settleCountParams.put("settle_account_id", adapayAccountBalanceVO.getSettleAccountId());
settleCountParams.put("cash_type", "T1");
settleCountParams.put("notify_url", ADAPAY_CALLBACK_URL);
Map<String, Object> settleCount = Drawcash.create(settleCountParams, config.getWechatAppId());
log.info("申请取现接口,请求参数:{}, 返回参数:{}", JSON.toJSONString(settleCountParams), JSON.toJSONString(settleCount));
@@ -701,6 +702,9 @@ public class AdapayService {
if (settleCount == null) {
throw new BusinessException("", "申请取现接口发生异常");
}
if (AdapayStatusEnum.FAILED.getValue().equals(settleCount.get("status"))) {
throw new BusinessException((String) settleCount.get("error_code"), (String) settleCount.get("error_msg"));
}
String id = (String) settleCount.get("id");

View File

@@ -6,7 +6,6 @@ import com.google.common.collect.Lists;
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
import com.jsowell.adapay.service.AdapayService;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.page.PageResponse;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.PageUtils;
@@ -113,12 +112,24 @@ public class SettleOrderReportServiceImpl implements ISettleOrderReportService {
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(build);
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> paymentConfirms = response.getPaymentConfirms();
// 如果没有分账信息,说明没有清分
vo.setClearingStatus(CollectionUtils.isEmpty(paymentConfirms) ? Constants.ZERO : Constants.ONE);
if (Constants.ONE.equals(vo.getClearingStatus())) {
String clearingStatus = null;
if (CollectionUtils.isEmpty(paymentConfirms)) {
clearingStatus = "未清分";
} else {
clearingStatus = "已清分";
}
vo.setClearingStatus(clearingStatus);
if ("已清分".equals(vo.getClearingStatus())) {
ClearingBillVO clearingBillVO = clearingWithdrawInfoService.selectWithdrawInfoByOrderCode(orderCode);
vo.setClearingBillCode(clearingBillVO.getClearingBillCode());
vo.setWithdrawCode(clearingBillVO.getWithdrawCode());
vo.setWithdrawStatus(clearingBillVO.getWithdrawStatus());
String withdrawStatus = null;
if (StringUtils.equals(clearingBillVO.getWithdrawStatus(), "0")) {
withdrawStatus = "处理中";
} else {
withdrawStatus = "已提现";
}
vo.setWithdrawStatus(withdrawStatus);
}
resultList.add(vo);
}

View File

@@ -97,7 +97,6 @@
<el-table-column label="交易金额" align="center" prop="tradeAmount" />
<el-table-column label="交易手续费" align="center" prop="tradeFee" />
</el-table>
<el-dialog title="订单流水" :visible.sync="dialogTableVisible">
<el-table :data="orderList">
<el-table-column property="orderCode" label="订单编号" />
@@ -139,7 +138,7 @@ export default {
props: ["merchantId"],
data() {
return {
orderTotal: 1,
orderTotal: 0,
getOrderParams: {
pageNum: 1,
pageSize: 10,