袁野 4 months ago
parent f089a8882b
commit 54b53ab709
  1. 1
      order/src/main/java/com/order/controller/OrderRefundController.java
  2. 4
      service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java
  3. 8
      service/src/main/java/com/hfkj/service/order/OrderRefundSuccessService.java
  4. 1
      service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java
  5. 2
      service/src/main/java/com/hfkj/service/user/BsUserService.java
  6. 8
      service/src/main/java/com/hfkj/service/user/impl/BsUserServiceImpl.java
  7. 4
      user/src/main/java/com/user/controller/BsUserController.java

@ -50,6 +50,7 @@ public class OrderRefundController {
private BsOrderRefundService orderRefundService; private BsOrderRefundService orderRefundService;
@Resource @Resource
private BsOrderChildService orderChildService; private BsOrderChildService orderChildService;
@RequestMapping(value="/tradeOrder",method = RequestMethod.POST) @RequestMapping(value="/tradeOrder",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "退款交易订单") @ApiOperation(value = "退款交易订单")

@ -238,7 +238,7 @@ public class CinemaService {
if (object.getBoolean("success") && object.getInteger("code") == 10000) { if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object; return object;
} else { } 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) { if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object; return object;
} else { } else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object);
} }
} }

@ -47,7 +47,7 @@ public class OrderRefundSuccessService {
cinema(orderChild); cinema(orderChild);
} }
} catch (Exception e) { } catch (Exception e) {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , e.getMessage());
} }
} }
@ -60,14 +60,18 @@ public class OrderRefundSuccessService {
if (orderCinema != null) { if (orderCinema != null) {
Map<String , Object> map = new HashMap<>(); Map<String , Object> map = new HashMap<>();
map.put("orderNo", childOrder.getOrderNo()); map.put("orderNo", childOrder.getOrderNo());
CinemaService.refundMovieOrder(map); JSONObject object = CinemaService.refundMovieOrder(map);
System.out.println("=========================================");
System.out.println(object);
orderCinema.setStatus(-5); orderCinema.setStatus(-5);
orderCinema.setExceptionStatus(false);
bsOrderCinemaService.update(orderCinema); bsOrderCinemaService.update(orderCinema);
} }
} catch (Exception e) { } catch (Exception e) {
orderCinema.setExceptionStatus(true); orderCinema.setExceptionStatus(true);
orderCinema.setExceptionMsg(e.getMessage()); orderCinema.setExceptionMsg(e.getMessage());
bsOrderCinemaService.update(orderCinema); bsOrderCinemaService.update(orderCinema);
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , e.getMessage());
} }
} }

@ -161,6 +161,7 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService {
if (order == null) { if (order == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的交易订单"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的交易订单");
} }
// 创建退款订单 // 创建退款订单
BsOrderRefund orderRefund = new BsOrderRefund(); BsOrderRefund orderRefund = new BsOrderRefund();
orderRefund.setMerId(orderChild.getMerId()); orderRefund.setMerId(orderChild.getMerId());

@ -40,7 +40,7 @@ public interface BsUserService {
* @param vFamilyOpenid 手机号 * @param vFamilyOpenid 手机号
* @return * @return
*/ */
BsUser getUserByVFamilyOpenid(String vFamilyOpenid); BsUser getUserByOutsideOpenid(String vFamilyOpenid);
/** /**

@ -79,10 +79,10 @@ public class BsUserServiceImpl implements BsUserService {
} }
@Override @Override
public BsUser getUserByVFamilyOpenid(String vFamilyOpenid) { public BsUser getUserByOutsideOpenid(String outsideOpenid) {
BsUserExample example = new BsUserExample(); BsUserExample example = new BsUserExample();
example.createCriteria() example.createCriteria()
.andVFamilyOpenidEqualTo(vFamilyOpenid) .andOutsideOpenidEqualTo(outsideOpenid)
.andStatusNotEqualTo(UserStatusEnum.status0.getCode()); .andStatusNotEqualTo(UserStatusEnum.status0.getCode());
List<BsUser> list = userMapper.selectByExample(example); List<BsUser> list = userMapper.selectByExample(example);
if (!list.isEmpty()) { if (!list.isEmpty()) {
@ -145,7 +145,7 @@ public class BsUserServiceImpl implements BsUserService {
public BsUser register(String outsideOpenid, Map<String, Object> other) { public BsUser register(String outsideOpenid, Map<String, Object> other) {
// 查询手机号 // 查询手机号
BsUser user = new BsUser(); BsUser user = new BsUser();
user.setvFamilyOpenid(outsideOpenid); user.setOutsideOpenid(outsideOpenid);
user.setIntegral(0L); user.setIntegral(0L);
user.setWxMaOpenid(MapUtils.getString(other, "maOpenId")); user.setWxMaOpenid(MapUtils.getString(other, "maOpenId"));
user.setWxMpOpenid(MapUtils.getString(other, "mpOpenId")); user.setWxMpOpenid(MapUtils.getString(other, "mpOpenId"));
@ -186,7 +186,7 @@ public class BsUserServiceImpl implements BsUserService {
@Override @Override
public SessionObject login(UserLoginPlatform platform, UserLoginType loginType, String outsideOpenid, Map<String, Object> other) throws Exception { public SessionObject login(UserLoginPlatform platform, UserLoginType loginType, String outsideOpenid, Map<String, Object> other) throws Exception {
BsUser user = getUserByVFamilyOpenid(outsideOpenid); BsUser user = getUserByOutsideOpenid(outsideOpenid);
if (user == null ) { if (user == null ) {
user = register(outsideOpenid, other); user = register(outsideOpenid, other);
} }

@ -130,7 +130,7 @@ public class BsUserController {
log.error("LoginController --> phone() error!", "请求参数校验失败"); log.error("LoginController --> phone() error!", "请求参数校验失败");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_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")); UserLoginPlatform platform = UserLoginPlatform.getDataByType(body.getString("platform"));
@ -149,7 +149,7 @@ public class BsUserController {
if (body.getString("type").equals(UserLoginType.V_FAMILY_OPENID.getCode())) { if (body.getString("type").equals(UserLoginType.V_FAMILY_OPENID.getCode())) {
Map<String, Object> other = new HashMap<>(); Map<String, Object> 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, "登录失败"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "登录失败");

Loading…
Cancel
Save