与小程序联调

This commit is contained in:
liuyingfang
2023-04-14 13:56:28 +08:00
parent 6491ed9c7f
commit c9df5137cb
4 changed files with 17 additions and 10 deletions

View File

@@ -57,6 +57,7 @@ public class TokenRegistryInterceptor extends HandlerInterceptorAdapter {
limitUri.add("/api/index.html"); limitUri.add("/api/index.html");
limitUri.add("/api/merchantOrder/posScanPay"); limitUri.add("/api/merchantOrder/posScanPay");
limitUri.add("/api/merchantOrder/pos/tradeQuery"); limitUri.add("/api/merchantOrder/pos/tradeQuery");
limitUri.add("/api/merchantOrder/returnOrder");
boolean passFlag = limitUri.stream().anyMatch(s -> s.equals(requestUri) || requestUri.startsWith(s)); boolean passFlag = limitUri.stream().anyMatch(s -> s.equals(requestUri) || requestUri.startsWith(s));
if (passFlag) { if (passFlag) {
return true; return true;

View File

@@ -73,6 +73,7 @@ public class IdCard implements Serializable {
*/ */
@NotEmpty(message = "请输入证件号", groups = {IdCard.Common.class}) @NotEmpty(message = "请输入证件号", groups = {IdCard.Common.class})
@TableField("certNo") @TableField("certNo")
@NotEmpty(message = "证件号未填写")
private String certNo; private String certNo;
@@ -81,6 +82,7 @@ public class IdCard implements Serializable {
*/ */
@NotEmpty(message = "请输入证件人名称", groups = {IdCard.Common.class}) @NotEmpty(message = "请输入证件人名称", groups = {IdCard.Common.class})
@TableField("certName") @TableField("certName")
@NotEmpty(message = "证件姓名未填写")
private String certName; private String certName;

View File

@@ -404,13 +404,13 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
} }
//TODO //TODO
// 如果不存在D1的结算信息则直接将D0的结算信息带过来 // 如果不存在D1的结算信息则直接将D0的结算信息带过来
// LambdaQueryWrapper<Account> qWrapperAccountD0 = Wrappers.lambdaQuery(); LambdaQueryWrapper<Account> qWrapperAccountD0 = Wrappers.lambdaQuery();
// qWrapperAccountD0.eq(Account::getUserId, accountDTO.getUserId()).eq(Account::getChannelType, Account.CHANNEL_TYPE_D1); qWrapperAccountD0.eq(Account::getUserId, accountDTO.getUserId()).eq(Account::getChannelType, Account.CHANNEL_TYPE_D1);
// int countD0 = baseMapper.selectCount(qWrapperAccountD0); int countD0 = baseMapper.selectCount(qWrapperAccountD0);
// if (countD0 == 0) { if (countD0 == 0) {
// account.setChannelType(Account.CHANNEL_TYPE_D1); account.setChannelType(Account.CHANNEL_TYPE_D1);
// save(account); save(account);
// } }
} }
@Override @Override

View File

@@ -1,6 +1,7 @@
package cn.pluss.platform.pay.impl; package cn.pluss.platform.pay.impl;
import cn.hutool.json.JSON;
import cn.pluss.platform.api.Result; import cn.pluss.platform.api.Result;
import cn.pluss.platform.api.ResultCode; import cn.pluss.platform.api.ResultCode;
import cn.pluss.platform.api.ResultGenerator; import cn.pluss.platform.api.ResultGenerator;
@@ -239,7 +240,9 @@ public class ApiPayServiceImpl implements ApiPayService {
if (!list.isEmpty()) { if (!list.isEmpty()) {
MerchantOrder order = list.get(0); MerchantOrder order = list.get(0);
if(StringUtil.isNotEmpty(order.getPayData())){ if(StringUtil.isNotEmpty(order.getPayData())){
return order.getPayData(); StringBuilder payData = new StringBuilder(order.getPayData());
payData.insert(payData.length()-1,",\"orderNumber\":"+"\""+order.getOrderNumber()+"\"");
return payData.toString();
} }
throw new MsgException("订单号重复!"); throw new MsgException("订单号重复!");
} }
@@ -443,6 +446,7 @@ public class ApiPayServiceImpl implements ApiPayService {
order.setPayData(payData.toJSONString()); order.setPayData(payData.toJSONString());
merchantOrderService.save(order); merchantOrderService.save(order);
payData.put("payAmt",order.getConsumeFee().toString()); payData.put("payAmt",order.getConsumeFee().toString());
payData.put("orderNumber", order.getOrderNumber().toString());
return ResultGenerator.genSuccessJsonResult("处理成功", payData); return ResultGenerator.genSuccessJsonResult("处理成功", payData);
} }