|
@@ -355,8 +355,8 @@ public class OrderClubServiceImpl implements OrderClubService {
|
|
|
int beans = userBeans + beansHistory.getNum();
|
|
|
productService.updateUserBeans(beansHistory, beans, note);
|
|
|
}
|
|
|
- //取消订单短信推送
|
|
|
- String bindMobile = baseMapper.getBindMobileByUserId(order.getUserId());
|
|
|
+ //取消订单短信推送(取消推送)
|
|
|
+ /*String bindMobile = baseMapper.getBindMobileByUserId(order.getUserId());
|
|
|
if (StringUtils.isNotBlank(bindMobile)) {
|
|
|
String shortLink = remoteCallService.getShortLink(8, 11, domain + "/user/order/detail.html?orderId=" + orderId);
|
|
|
String content = "您已成功取消订单(订单编号:" + order.getOrderNo() + "),订单金额¥" + order.getPayTotalFee() + "。您可关注采美公众号或者访问采美微信小程序和网站查看订单。" +
|
|
@@ -365,8 +365,40 @@ public class OrderClubServiceImpl implements OrderClubService {
|
|
|
if (!sendSms) {
|
|
|
log.info("取消订单推送失败,orderId>>>>" + orderId);
|
|
|
}
|
|
|
+ }*/
|
|
|
+ // 客服确认注册机构,一天内取消有效
|
|
|
+ Integer clubStatus = baseMapper.getClubStatus(order.getUserId());
|
|
|
+ if (null != clubStatus && 94 == clubStatus) {
|
|
|
+ // 已冻结(客服确认机构)
|
|
|
+ // 查询最后的确认时间
|
|
|
+ Date confirmTime = baseMapper.getClubConfirmTime(order.getUserId());
|
|
|
+ if (confirmTime != null) {
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
+ calendar.setTime(confirmTime);
|
|
|
+ calendar.add(Calendar.DATE, 1);
|
|
|
+ if (calendar.getTime().compareTo(new Date()) > 0) {
|
|
|
+ // 机构状态修改为:已确认(客服确认机构)
|
|
|
+ baseMapper.updateUserClubStatus(93, order.getUserId());
|
|
|
+ baseMapper.updateClubStatus(93, order.getUserId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //优惠券退回
|
|
|
+ if (MathUtil.compare(order.getCouponAmount(), 0) > 0) {
|
|
|
+ CouponOrderRecordPo couponRecord = orderClubMapper.getOrderCouponRecord(order.getOrderId());
|
|
|
+ if (couponRecord != null) {
|
|
|
+ orderClubMapper.deleteCouponClubById(couponRecord.getClubCouponId());
|
|
|
+ CouponClubPo couponClub = orderClubMapper.getCouponClubById(couponRecord.getClubCouponId());
|
|
|
+ couponClub.setOrderId(null);
|
|
|
+ couponClub.setReturnedId(0);
|
|
|
+ couponClub.setSource(3);
|
|
|
+ couponClub.setStatus("1");
|
|
|
+ couponClub.setCreateDate(new Date());
|
|
|
+ couponClub.setUseDate(null);
|
|
|
+ couponClub.setDelFlag("0");
|
|
|
+ orderClubMapper.insertCouponClub(couponClub);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
return ResponseJson.success("取消订单成功!", null);
|
|
|
}
|
|
|
|