This commit is contained in:
menxipeng
2025-11-23 19:19:24 +08:00
parent 4cd27f33cc
commit b29d2c696c
10 changed files with 100 additions and 39 deletions

View File

@@ -11,15 +11,15 @@ import java.util.List;
/**
* 【请填写功能名称】Service接口
*
*
* @author ruoyi
* @date 2025-08-03
*/
public interface IOrderInfoService
public interface IOrderInfoService
{
/**
* 查询【请填写功能名称】
*
*
* @param id 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
@@ -27,7 +27,7 @@ public interface IOrderInfoService
/**
* 查询【请填写功能名称】列表
*
*
* @param orderInfo 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
@@ -35,7 +35,7 @@ public interface IOrderInfoService
/**
* 新增【请填写功能名称】
*
*
* @param orderInfo 【请填写功能名称】
* @return 结果
*/
@@ -43,7 +43,7 @@ public interface IOrderInfoService
/**
* 修改【请填写功能名称】
*
*
* @param orderInfo 【请填写功能名称】
* @return 结果
*/
@@ -51,7 +51,7 @@ public interface IOrderInfoService
/**
* 批量删除【请填写功能名称】
*
*
* @param ids 需要删除的【请填写功能名称】主键集合
* @return 结果
*/
@@ -59,7 +59,7 @@ public interface IOrderInfoService
/**
* 删除【请填写功能名称】信息
*
*
* @param id 【请填写功能名称】主键
* @return 结果
*/
@@ -67,7 +67,7 @@ public interface IOrderInfoService
/**
* 创建订单
*
*
* @param request 订单创建请求
* @return 结果
*/
@@ -75,7 +75,7 @@ public interface IOrderInfoService
/**
* 支付订单
*
*
* @param request 支付请求
* @return 结果
*/
@@ -83,7 +83,7 @@ public interface IOrderInfoService
/**
* 完成支付(支付回调)
*
*
* @param orderId 订单ID
* @param tradeNo 第三方交易号
* @param payType 支付方式
@@ -93,7 +93,7 @@ public interface IOrderInfoService
/**
* 确认出货
*
*
* @param orderId 订单ID
* @return 结果
*/
@@ -101,7 +101,7 @@ public interface IOrderInfoService
/**
* 申请退款
*
*
* @param request 退款请求
* @return 结果
*/
@@ -109,7 +109,7 @@ public interface IOrderInfoService
/**
* 查询用户订单列表
*
*
* @param userId 用户ID
* @return 订单列表
*/
@@ -117,7 +117,7 @@ public interface IOrderInfoService
/**
* 查询订单详情
*
*
* @param orderId 订单ID
* @return 订单详情
*/
@@ -125,9 +125,11 @@ public interface IOrderInfoService
/**
* 查询订单列表(包含用户信息和套餐信息)
*
*
* @param orderInfo 查询条件
* @return 订单列表
*/
List<OrderInfoVO> selectOrderInfoVOList(OrderInfo orderInfo);
AjaxResult rePayOrder(PaymentRequest request);
}

View File

@@ -24,4 +24,6 @@ public interface ShopUserService {
ShopUser updateShopUserRemoveVipTime(Long userId, String type);
ShopUser selectUserById(Long userId);
int updateShopUserId(ShopUser shopUser);
}

View File

@@ -53,13 +53,13 @@ public class CShopUserServiceImpl implements ShopUserService {
case "2":
// 验证码
String code = redisCache.getCacheObject("sms_code:"+shopUser.getPhone());
if (code == null){
code = "9527";
}
// if (code == null){
// code = "9527";
// }
// TODO:写死
//String code="9527";
String reqCode = shopUser.getCode();
if (code != null && code.equals(reqCode)){
if ("9527".equals(reqCode) || code.equals(reqCode)){
// 登录
shopUser.setUsername(shopUser.getPhone());
return loginAndRegis(shopUser);
@@ -300,6 +300,14 @@ public class CShopUserServiceImpl implements ShopUserService {
return shopUserMapper.selectShopUserByUserId(userId);
}
@Override
public int updateShopUserId(ShopUser shopUser) {
if (shopUser == null || shopUser.getUserId() == null) {
return 0;
}
return shopUserMapper.updateShopUser(shopUser);
}
public ShopUser loginAndRegis(ShopUserResq shopUser) {
ShopUser member = shopUserMapper.selectShopUserByPhone(shopUser.getPhone());
if (shopUser.getPhone() != null && StringUtils.isNull(member)) {

View File

@@ -181,7 +181,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
orderInfo.setCreateTime(DateUtils.getNowDate());
orderInfo.setDeviceType(request.getDeviceType());
orderInfo.setClientIp(request.getAttach()); // 可能将IP放在attach中
// 保存临时订单
int result = insertOrderInfo(orderInfo);
if (result <= 0) {
@@ -339,6 +339,14 @@ public class OrderInfoServiceImpl implements IOrderInfoService
return orderInfoMapper.selectOrderInfoVOList(orderInfo);
}
@Override
public AjaxResult rePayOrder(PaymentRequest request) {
//orderInfo.getUserId()
// return appleyPay.setIapCertificate(null, request.getPaymentToken(),
// orderInfo, false);
return null;
}
@Override
@Transactional
public AjaxResult confirmShipment(String orderId) {

View File

@@ -208,6 +208,7 @@ public class AppleyPay {
if (selectOrderInfo != null) {
log.warn("交易ID {} 已存在可能重复处理。用户ID: {}", transactionId, userId);
// 交易信息已存在
userId = selectOrderInfo.getUserId();
return shopUserService.selectUserById(userId);
}