From 3043cc2ec1b83044a7ea6633d4f7e06c29c8a8bb Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Fri, 12 Jul 2024 11:40:10 +0800 Subject: [PATCH] 1 --- .../java/com/order/controller/OrderRefundController.java | 1 + .../main/java/com/hfkj/qianzhu/channel/CinemaService.java | 4 ++-- .../com/hfkj/service/order/OrderRefundSuccessService.java | 8 ++++++-- .../hfkj/service/order/impl/BsOrderRefundServiceImpl.java | 1 + .../main/java/com/hfkj/service/user/BsUserService.java | 2 +- .../com/hfkj/service/user/impl/BsUserServiceImpl.java | 8 ++++---- .../main/java/com/user/controller/BsUserController.java | 4 ++-- 7 files changed, 17 insertions(+), 11 deletions(-) diff --git a/order/src/main/java/com/order/controller/OrderRefundController.java b/order/src/main/java/com/order/controller/OrderRefundController.java index 33490ac..86e0509 100644 --- a/order/src/main/java/com/order/controller/OrderRefundController.java +++ b/order/src/main/java/com/order/controller/OrderRefundController.java @@ -50,6 +50,7 @@ public class OrderRefundController { private BsOrderRefundService orderRefundService; @Resource private BsOrderChildService orderChildService; + @RequestMapping(value="/tradeOrder",method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "退款交易订单") diff --git a/service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java b/service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java index fbbdcd4..3c2f557 100644 --- a/service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java +++ b/service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java @@ -238,7 +238,7 @@ public class CinemaService { if (object.getBoolean("success") && object.getInteger("code") == 10000) { return object; } else { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object.getInteger("code")); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object); } } @@ -282,7 +282,7 @@ public class CinemaService { if (object.getBoolean("success") && object.getInteger("code") == 10000) { return object; } else { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object); } } diff --git a/service/src/main/java/com/hfkj/service/order/OrderRefundSuccessService.java b/service/src/main/java/com/hfkj/service/order/OrderRefundSuccessService.java index 1f8993e..d482024 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderRefundSuccessService.java +++ b/service/src/main/java/com/hfkj/service/order/OrderRefundSuccessService.java @@ -47,7 +47,7 @@ public class OrderRefundSuccessService { cinema(orderChild); } } catch (Exception e) { - + throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , e.getMessage()); } } @@ -60,14 +60,18 @@ public class OrderRefundSuccessService { if (orderCinema != null) { Map map = new HashMap<>(); map.put("orderNo", childOrder.getOrderNo()); - CinemaService.refundMovieOrder(map); + JSONObject object = CinemaService.refundMovieOrder(map); + System.out.println("========================================="); + System.out.println(object); orderCinema.setStatus(-5); + orderCinema.setExceptionStatus(false); bsOrderCinemaService.update(orderCinema); } } catch (Exception e) { orderCinema.setExceptionStatus(true); orderCinema.setExceptionMsg(e.getMessage()); bsOrderCinemaService.update(orderCinema); + throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , e.getMessage()); } } diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java index 6b8317b..20e5bc7 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java @@ -157,6 +157,7 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService { if (order == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的交易订单"); } + // 创建退款订单 BsOrderRefund orderRefund = new BsOrderRefund(); orderRefund.setMerId(orderChild.getMerId()); diff --git a/service/src/main/java/com/hfkj/service/user/BsUserService.java b/service/src/main/java/com/hfkj/service/user/BsUserService.java index 1aad5f5..cb4c156 100644 --- a/service/src/main/java/com/hfkj/service/user/BsUserService.java +++ b/service/src/main/java/com/hfkj/service/user/BsUserService.java @@ -40,7 +40,7 @@ public interface BsUserService { * @param vFamilyOpenid 手机号 * @return */ - BsUser getUserByVFamilyOpenid(String vFamilyOpenid); + BsUser getUserByOutsideOpenid(String vFamilyOpenid); /** diff --git a/service/src/main/java/com/hfkj/service/user/impl/BsUserServiceImpl.java b/service/src/main/java/com/hfkj/service/user/impl/BsUserServiceImpl.java index 56100dd..6e32669 100644 --- a/service/src/main/java/com/hfkj/service/user/impl/BsUserServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/user/impl/BsUserServiceImpl.java @@ -79,10 +79,10 @@ public class BsUserServiceImpl implements BsUserService { } @Override - public BsUser getUserByVFamilyOpenid(String vFamilyOpenid) { + public BsUser getUserByOutsideOpenid(String outsideOpenid) { BsUserExample example = new BsUserExample(); example.createCriteria() - .andVFamilyOpenidEqualTo(vFamilyOpenid) + .andOutsideOpenidEqualTo(outsideOpenid) .andStatusNotEqualTo(UserStatusEnum.status0.getCode()); List list = userMapper.selectByExample(example); if (!list.isEmpty()) { @@ -145,7 +145,7 @@ public class BsUserServiceImpl implements BsUserService { public BsUser register(String outsideOpenid, Map other) { // 查询手机号 BsUser user = new BsUser(); - user.setvFamilyOpenid(outsideOpenid); + user.setOutsideOpenid(outsideOpenid); user.setIntegral(0L); user.setWxMaOpenid(MapUtils.getString(other, "maOpenId")); user.setWxMpOpenid(MapUtils.getString(other, "mpOpenId")); @@ -186,7 +186,7 @@ public class BsUserServiceImpl implements BsUserService { @Override public SessionObject login(UserLoginPlatform platform, UserLoginType loginType, String outsideOpenid, Map other) throws Exception { - BsUser user = getUserByVFamilyOpenid(outsideOpenid); + BsUser user = getUserByOutsideOpenid(outsideOpenid); if (user == null ) { user = register(outsideOpenid, other); } diff --git a/user/src/main/java/com/user/controller/BsUserController.java b/user/src/main/java/com/user/controller/BsUserController.java index 68ea932..b5fe69e 100644 --- a/user/src/main/java/com/user/controller/BsUserController.java +++ b/user/src/main/java/com/user/controller/BsUserController.java @@ -130,7 +130,7 @@ public class BsUserController { log.error("LoginController --> phone() error!", "请求参数校验失败"); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } - String vFamilyOpenid = body.getString("vFamilyOpenid"); + String outsideOpenid = body.getString("outsideOpenid"); // 客户端 UserLoginPlatform platform = UserLoginPlatform.getDataByType(body.getString("platform")); @@ -149,7 +149,7 @@ public class BsUserController { if (body.getString("type").equals(UserLoginType.V_FAMILY_OPENID.getCode())) { Map other = new HashMap<>(); - return ResponseMsgUtil.success(userService.login(platform, loginType, vFamilyOpenid, other)); + return ResponseMsgUtil.success(userService.login(platform, loginType, outsideOpenid, other)); } throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "登录失败");