Merge branch 'master' of gitee.com:super-shopkeeper/chaozhanggui
This commit is contained in:
@@ -404,13 +404,13 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
}
|
||||
//TODO
|
||||
// 如果不存在D1的结算信息,则直接将D0的结算信息带过来
|
||||
// LambdaQueryWrapper<Account> qWrapperAccountD0 = Wrappers.lambdaQuery();
|
||||
// qWrapperAccountD0.eq(Account::getUserId, accountDTO.getUserId()).eq(Account::getChannelType, Account.CHANNEL_TYPE_D1);
|
||||
// int countD0 = baseMapper.selectCount(qWrapperAccountD0);
|
||||
// if (countD0 == 0) {
|
||||
// account.setChannelType(Account.CHANNEL_TYPE_D1);
|
||||
// save(account);
|
||||
// }
|
||||
LambdaQueryWrapper<Account> qWrapperAccountD0 = Wrappers.lambdaQuery();
|
||||
qWrapperAccountD0.eq(Account::getUserId, accountDTO.getUserId()).eq(Account::getChannelType, Account.CHANNEL_TYPE_D1);
|
||||
int countD0 = baseMapper.selectCount(qWrapperAccountD0);
|
||||
if (countD0 == 0) {
|
||||
account.setChannelType(Account.CHANNEL_TYPE_D1);
|
||||
save(account);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package cn.pluss.platform.pay.impl;
|
||||
|
||||
|
||||
import cn.hutool.json.JSON;
|
||||
import cn.pluss.platform.api.Result;
|
||||
import cn.pluss.platform.api.ResultCode;
|
||||
import cn.pluss.platform.api.ResultGenerator;
|
||||
@@ -154,7 +155,7 @@ public class ApiPayServiceImpl implements ApiPayService {
|
||||
checSign(jsonObject,jsonObject.getString("merchantCode"));
|
||||
store = checkTransPayParams(jsonObject,jsonObject.getString("merchantCode"));
|
||||
}
|
||||
String payData = checkMercOrder(store,jsonObject);
|
||||
String payData = checkMercOrder(store, jsonObject);
|
||||
if(StringUtil.isNotEmpty(payData)){
|
||||
return payData;
|
||||
}
|
||||
@@ -233,13 +234,15 @@ public class ApiPayServiceImpl implements ApiPayService {
|
||||
}
|
||||
}
|
||||
|
||||
private String checkMercOrder(MerchantStore store,JSONObject jsonObject) {
|
||||
private String checkMercOrder(MerchantStore store, JSONObject jsonObject) {
|
||||
QueryWrapper<MerchantOrder> queryMercWrapper = new QueryWrapper<MerchantOrder>().eq("mercOrderNo", jsonObject.getString("mercOrderNo"));
|
||||
List<MerchantOrder> list = merchantOrderService.list(queryMercWrapper);
|
||||
if (!list.isEmpty()) {
|
||||
MerchantOrder order = list.get(0);
|
||||
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("订单号重复!");
|
||||
}
|
||||
@@ -443,6 +446,7 @@ public class ApiPayServiceImpl implements ApiPayService {
|
||||
order.setPayData(payData.toJSONString());
|
||||
merchantOrderService.save(order);
|
||||
payData.put("payAmt",order.getConsumeFee().toString());
|
||||
payData.put("orderNumber", order.getOrderNumber().toString());
|
||||
return ResultGenerator.genSuccessJsonResult("处理成功", payData);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user