袁野 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;
@Resource
private BsOrderChildService orderChildService;
@RequestMapping(value="/tradeOrder",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "退款交易订单")

@ -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);
}
}

@ -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<String , Object> 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());
}
}

@ -161,6 +161,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());

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

@ -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<BsUser> list = userMapper.selectByExample(example);
if (!list.isEmpty()) {
@ -145,7 +145,7 @@ public class BsUserServiceImpl implements BsUserService {
public BsUser register(String outsideOpenid, Map<String, Object> 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<String, Object> other) throws Exception {
BsUser user = getUserByVFamilyOpenid(outsideOpenid);
BsUser user = getUserByOutsideOpenid(outsideOpenid);
if (user == null ) {
user = register(outsideOpenid, other);
}

@ -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<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, "登录失败");

Loading…
Cancel
Save