|
|
@@ -46,6 +46,22 @@ import java.time.LocalDateTime;
|
|
|
import java.time.ZoneId;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
+import java.util.Objects;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 操作类型常量
|
|
|
+ */
|
|
|
+class OrderActionType {
|
|
|
+ /**
|
|
|
+ * 接单
|
|
|
+ */
|
|
|
+ static final String ACCEPT = "1";
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 取消
|
|
|
+ */
|
|
|
+ static final String CANCEL = "2";
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
* 咨询订单 服务实现类
|
|
|
@@ -627,82 +643,111 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
|
|
|
/**
|
|
|
* 律师确认订单
|
|
|
* <p>
|
|
|
- * 支持两种操作:
|
|
|
- * 1. 接单:将订单状态从待接单(1)修改为进行中(2)
|
|
|
- * 2. 取消:将订单状态修改为已取消(4),并进行退款
|
|
|
+ * 支持两种操作类型:
|
|
|
+ * 1. 接单:将订单状态从待接单更新为进行中
|
|
|
+ * 2. 取消:将订单状态更新为已取消
|
|
|
* </p>
|
|
|
*
|
|
|
- * @param id 订单ID
|
|
|
+ * @param id 订单ID
|
|
|
* @param actionType 操作类型:1-接单,2-取消
|
|
|
* @return 确认结果
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public R<Boolean> confirmOrder(Integer id, Integer actionType) {
|
|
|
+ public R<Boolean> confirmOrder(String id, String actionType) {
|
|
|
log.info("开始律师确认订单,订单ID={}, 操作类型={}", id, actionType);
|
|
|
|
|
|
// 参数校验
|
|
|
- if (id == null) {
|
|
|
+ if (id == null || id.trim().isEmpty()) {
|
|
|
log.warn("律师确认订单失败:订单ID为空");
|
|
|
return R.fail("订单ID不能为空");
|
|
|
}
|
|
|
|
|
|
- if (actionType == null || (actionType != 1 && actionType != 2)) {
|
|
|
+ if (actionType == null || actionType.trim().isEmpty()) {
|
|
|
+ log.warn("律师确认订单失败:操作类型为空");
|
|
|
+ return R.fail("操作类型不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 操作类型格式校验
|
|
|
+ String trimmedActionType = actionType.trim();
|
|
|
+ if (!OrderActionType.ACCEPT.equals(trimmedActionType)
|
|
|
+ && !OrderActionType.CANCEL.equals(trimmedActionType)) {
|
|
|
log.warn("律师确认订单失败:操作类型无效,actionType={}", actionType);
|
|
|
return R.fail("操作类型无效,1-接单,2-取消");
|
|
|
}
|
|
|
|
|
|
+ // 将订单ID转换为Integer
|
|
|
+ Integer orderId;
|
|
|
+ try {
|
|
|
+ orderId = Integer.parseInt(id.trim());
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ log.warn("律师确认订单失败:订单ID格式错误,id={}", id, e);
|
|
|
+ return R.fail("订单ID格式错误");
|
|
|
+ }
|
|
|
+
|
|
|
// 查询订单信息
|
|
|
- LawyerConsultationOrder order = consultationOrderMapper.selectById(id);
|
|
|
+ LawyerConsultationOrder order = consultationOrderMapper.selectById(orderId);
|
|
|
if (order == null) {
|
|
|
- log.warn("律师确认订单失败:订单不存在,订单ID={}", id);
|
|
|
+ log.warn("律师确认订单失败:订单不存在,订单ID={}", orderId);
|
|
|
return R.fail("订单不存在");
|
|
|
}
|
|
|
|
|
|
- //清除redis缓存,避免调用订单超时处理
|
|
|
+ // 清除redis缓存,避免调用订单超时处理
|
|
|
orderExpirationService.cancelOrderAcceptTimeout(order.getOrderNumber());
|
|
|
|
|
|
-
|
|
|
- // 验证订单状态是否为待接单(1)
|
|
|
+ // 验证订单状态是否为待接单
|
|
|
Integer orderStatus = order.getOrderStatus();
|
|
|
- Integer waitAcceptStatus = 1; // 待接单
|
|
|
+ Integer waitAcceptStatus = LawyerStatusEnum.WAIT_ACCEPT.getStatus();
|
|
|
if (!waitAcceptStatus.equals(orderStatus)) {
|
|
|
log.warn("律师确认订单失败:订单状态不是待接单,订单ID={}, 订单编号={}, 当前状态={}",
|
|
|
- id, order.getOrderNumber(), orderStatus);
|
|
|
+ orderId, order.getOrderNumber(), orderStatus);
|
|
|
return R.fail("订单状态不是待接单,无法确认");
|
|
|
}
|
|
|
|
|
|
// 根据操作类型处理
|
|
|
- if (actionType == 1) {
|
|
|
- // 接单:更新订单状态为进行中(2)
|
|
|
- Integer inProgressStatus = LawyerStatusEnum.INPROGRESS.getStatus(); // 2:进行中
|
|
|
+ if (OrderActionType.ACCEPT.equals(trimmedActionType)) {
|
|
|
+ // 接单:更新订单状态为进行中
|
|
|
+ Integer inProgressStatus = LawyerStatusEnum.INPROGRESS.getStatus();
|
|
|
+ Date acceptTime = new Date();
|
|
|
order.setOrderStatus(inProgressStatus);
|
|
|
- order.setUpdatedTime(new Date());
|
|
|
+ order.setAcceptOrdersTime(acceptTime);
|
|
|
+ order.setUpdatedTime(acceptTime);
|
|
|
|
|
|
// 执行更新操作
|
|
|
boolean result = this.updateById(order);
|
|
|
if (result) {
|
|
|
log.info("律师接单成功,订单ID={}, 订单编号={}, 状态从{}变更为{}",
|
|
|
- id, order.getOrderNumber(), waitAcceptStatus, inProgressStatus);
|
|
|
+ orderId, order.getOrderNumber(), waitAcceptStatus, inProgressStatus);
|
|
|
+
|
|
|
+ // 发送接单通知
|
|
|
+ sendAcceptOrderNotice(order, acceptTime);
|
|
|
+
|
|
|
return R.data(true, "接单成功");
|
|
|
} else {
|
|
|
- log.error("律师接单失败:数据库操作失败,订单ID={}, 订单编号={}", id, order.getOrderNumber());
|
|
|
+ log.error("律师接单失败:数据库操作失败,订单ID={}, 订单编号={}", orderId, order.getOrderNumber());
|
|
|
return R.fail("接单失败");
|
|
|
}
|
|
|
} else {
|
|
|
- // 取消:更新订单状态为已取消(4),并进行退款
|
|
|
- Integer cancelStatus = LawyerStatusEnum.REFUNDED.getStatus(); // 4:已取消
|
|
|
+ // 取消:更新订单状态为已取消
|
|
|
+ Integer cancelStatus = LawyerStatusEnum.REFUNDED.getStatus();
|
|
|
order.setOrderStatus(cancelStatus);
|
|
|
order.setUpdatedTime(new Date());
|
|
|
|
|
|
// 执行更新操作
|
|
|
boolean result = this.updateById(order);
|
|
|
- if (!result) {
|
|
|
- log.error("律师取消订单失败:数据库操作失败,订单ID={}, 订单编号={}", id, order.getOrderNumber());
|
|
|
+ if (result) {
|
|
|
+ log.info("律师取消订单成功,订单ID={}, 订单编号={}, 状态从{}变更为{}",
|
|
|
+ orderId, order.getOrderNumber(), waitAcceptStatus, cancelStatus);
|
|
|
+
|
|
|
+ // 发送拒绝接单通知
|
|
|
+ sendRejectOrderNotice(order);
|
|
|
+
|
|
|
+ return R.data(true, "取消订单成功");
|
|
|
+ } else {
|
|
|
+ log.error("律师取消订单失败:数据库操作失败,订单ID={}, 订单编号={}", orderId, order.getOrderNumber());
|
|
|
return R.fail("取消订单失败");
|
|
|
}
|
|
|
}
|
|
|
- return R.success("接单成功");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -800,62 +845,117 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
|
|
|
* - 拒绝退款:将申请退款状态设置为已拒绝(2),更新拒绝原因,并发送拒绝通知
|
|
|
* </p>
|
|
|
*
|
|
|
- * @param lawyerId 律师ID
|
|
|
- * @param orderId 订单ID
|
|
|
- * @param processAction 处理动作:1-同意,2-拒绝
|
|
|
- * @param rejectRefundReason 拒绝原因(拒绝时必填)
|
|
|
+ * @param lawyerConsultationOrder 订单对象
|
|
|
* @return 处理结果
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public R<Boolean> refundApplyProcess(Integer lawyerId, Integer orderId, String processAction, String rejectRefundReason) {
|
|
|
- log.info("开始处理退款申请,律师ID={}, 订单ID={}, 处理动作={}, 拒绝原因={}",
|
|
|
- lawyerId, orderId, processAction, rejectRefundReason);
|
|
|
+ public R<Boolean> refundApplyProcess(LawyerConsultationOrder lawyerConsultationOrder) {
|
|
|
+ Integer lawyerId = lawyerConsultationOrder.getLawyerUserId();
|
|
|
+ Integer orderId = lawyerConsultationOrder.getId();
|
|
|
+ String processAction = lawyerConsultationOrder.getProcessAction();
|
|
|
+ String rejectRefundReason = lawyerConsultationOrder.getRejectRefundReason();
|
|
|
+
|
|
|
+ log.info("开始处理退款申请,律师ID={}, 订单ID={}, 处理动作={}", lawyerId, orderId, processAction);
|
|
|
|
|
|
// 1. 参数校验
|
|
|
- if (lawyerId == null || lawyerId <= 0) {
|
|
|
+ R<Boolean> paramValidateResult = validateRefundProcessParams(lawyerId, orderId, processAction, rejectRefundReason);
|
|
|
+ if (paramValidateResult != null) {
|
|
|
+ return paramValidateResult;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2. 查询订单信息
|
|
|
+ LawyerConsultationOrder order = consultationOrderMapper.selectById(orderId);
|
|
|
+ if (Objects.isNull(order)) {
|
|
|
+ log.warn("处理退款申请失败:订单不存在,订单ID={}", orderId);
|
|
|
+ return R.fail("订单不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 3. 业务校验
|
|
|
+ R<Boolean> businessValidateResult = validateRefundProcessBusiness(lawyerId, order);
|
|
|
+ if (businessValidateResult != null) {
|
|
|
+ return businessValidateResult;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 4. 取消退款超时计时器
|
|
|
+ try {
|
|
|
+ orderExpirationService.cancelOrderRefundTimeout(order.getOrderNumber());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("取消退款超时计时器失败,订单编号={}", order.getOrderNumber(), e);
|
|
|
+ // 继续执行,不因取消计时器失败而中断
|
|
|
+ }
|
|
|
+
|
|
|
+ // 5. 根据处理动作进行相应处理
|
|
|
+ if (ACTION_AGREE.equals(processAction)) {
|
|
|
+ return processAgreeRefund(order);
|
|
|
+ } else {
|
|
|
+ return processRejectRefund(order, rejectRefundReason);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 校验退款处理参数
|
|
|
+ *
|
|
|
+ * @param lawyerId 律师ID
|
|
|
+ * @param orderId 订单ID
|
|
|
+ * @param processAction 处理动作
|
|
|
+ * @param rejectRefundReason 拒绝原因
|
|
|
+ * @return 校验失败时返回错误结果,校验通过返回null
|
|
|
+ */
|
|
|
+ private R<Boolean> validateRefundProcessParams(Integer lawyerId, Integer orderId,
|
|
|
+ String processAction, String rejectRefundReason) {
|
|
|
+ // 律师ID校验
|
|
|
+ if (Objects.isNull(lawyerId) || lawyerId <= 0) {
|
|
|
log.warn("处理退款申请失败:律师ID为空或无效,lawyerId={}", lawyerId);
|
|
|
return R.fail("律师ID不能为空");
|
|
|
}
|
|
|
|
|
|
- if (orderId == null || orderId <= 0) {
|
|
|
+ // 订单ID校验
|
|
|
+ if (Objects.isNull(orderId) || orderId <= 0) {
|
|
|
log.warn("处理退款申请失败:订单ID为空或无效,orderId={}", orderId);
|
|
|
return R.fail("订单ID不能为空");
|
|
|
}
|
|
|
|
|
|
+ // 处理动作校验
|
|
|
if (!StringUtils.hasText(processAction)) {
|
|
|
log.warn("处理退款申请失败:处理动作为空,订单ID={}", orderId);
|
|
|
return R.fail("处理动作不能为空");
|
|
|
}
|
|
|
|
|
|
- // 2. 处理动作校验
|
|
|
+ // 处理动作值校验
|
|
|
if (!ACTION_AGREE.equals(processAction) && !ACTION_REJECT.equals(processAction)) {
|
|
|
log.warn("处理退款申请失败:处理动作无效,订单ID={}, 处理动作={}", orderId, processAction);
|
|
|
return R.fail("处理动作无效,1-同意,2-拒绝");
|
|
|
}
|
|
|
|
|
|
- // 3. 拒绝原因校验:拒绝时必须提供拒绝原因
|
|
|
+ // 拒绝原因校验:拒绝时必须提供拒绝原因
|
|
|
if (ACTION_REJECT.equals(processAction) && !StringUtils.hasText(rejectRefundReason)) {
|
|
|
log.warn("处理退款申请失败:拒绝退款时必须提供拒绝原因,订单ID={}", orderId);
|
|
|
return R.fail("拒绝退款时必须提供拒绝原因");
|
|
|
}
|
|
|
|
|
|
- // 4. 查询订单信息
|
|
|
- LawyerConsultationOrder order = consultationOrderMapper.selectById(orderId);
|
|
|
- if (order == null) {
|
|
|
- log.warn("处理退款申请失败:订单不存在,订单ID={}", orderId);
|
|
|
- return R.fail("订单不存在");
|
|
|
- }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
|
|
|
- // 5. 订单归属校验:订单必须属于该律师
|
|
|
+ /**
|
|
|
+ * 校验退款处理业务规则
|
|
|
+ *
|
|
|
+ * @param lawyerId 律师ID
|
|
|
+ * @param order 订单对象
|
|
|
+ * @return 校验失败时返回错误结果,校验通过返回null
|
|
|
+ */
|
|
|
+ private R<Boolean> validateRefundProcessBusiness(Integer lawyerId, LawyerConsultationOrder order) {
|
|
|
+ Integer orderId = order.getId();
|
|
|
+
|
|
|
+ // 订单归属校验:订单必须属于该律师
|
|
|
Integer orderLawyerId = order.getLawyerUserId();
|
|
|
- if (orderLawyerId == null || !lawyerId.equals(orderLawyerId)) {
|
|
|
+ if (Objects.isNull(orderLawyerId) || !lawyerId.equals(orderLawyerId)) {
|
|
|
log.warn("处理退款申请失败:订单不属于该律师,订单ID={}, 订单律师ID={}, 请求律师ID={}",
|
|
|
orderId, orderLawyerId, lawyerId);
|
|
|
return R.fail("订单不属于该律师,无法处理退款申请");
|
|
|
}
|
|
|
|
|
|
- // 6. 退款状态校验:订单必须处于已申请退款状态
|
|
|
+ // 退款状态校验:订单必须处于已申请退款状态
|
|
|
String applyRefundStatus = order.getApplyRefundStatus();
|
|
|
if (!REFUND_STATUS_APPLIED.equals(applyRefundStatus)) {
|
|
|
log.warn("处理退款申请失败:订单未申请退款或已处理,订单ID={}, 订单编号={}, 退款状态={}",
|
|
|
@@ -863,15 +963,7 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
|
|
|
return R.fail("订单未申请退款或已处理,无法重复处理");
|
|
|
}
|
|
|
|
|
|
- // 7.取消退款超时计时器
|
|
|
- orderExpirationService.cancelOrderRefundTimeout(order.getOrderNumber());
|
|
|
-
|
|
|
- // 8. 根据处理动作进行相应处理
|
|
|
- if (ACTION_AGREE.equals(processAction)) {
|
|
|
- return processAgreeRefund(order);
|
|
|
- } else {
|
|
|
- return processRejectRefund(order, rejectRefundReason);
|
|
|
- }
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1116,5 +1208,134 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
|
|
|
log.error("发送WebSocket消息异常,接收人ID={}, 异常信息={}", receiverId, e.getMessage(), e);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发送接单通知给客户端用户
|
|
|
+ *
|
|
|
+ * @param order 订单对象
|
|
|
+ * @param acceptTime 接单时间
|
|
|
+ */
|
|
|
+ private void sendAcceptOrderNotice(LawyerConsultationOrder order, Date acceptTime) {
|
|
|
+ try {
|
|
|
+ Integer clientUserId = order.getClientUserId();
|
|
|
+ if (clientUserId == null) {
|
|
|
+ log.warn("发送接单通知失败:客户端用户ID为空,订单ID={}", order.getId());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取客户端用户接收ID
|
|
|
+ String receiverId = getClientReceiverId(clientUserId);
|
|
|
+ if (!StringUtils.hasText(receiverId)) {
|
|
|
+ log.warn("发送接单通知失败:获取客户端用户接收ID失败,订单ID={}, 用户ID={}",
|
|
|
+ order.getId(), clientUserId);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 格式化日期
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String acceptTimeStr = dateFormat.format(acceptTime);
|
|
|
+ String validityPeriodStr = "";
|
|
|
+ if (order.getValidityPeriod() != null) {
|
|
|
+ validityPeriodStr = dateFormat.format(order.getValidityPeriod());
|
|
|
+ } else {
|
|
|
+ // 如果有效期为空,使用默认提示
|
|
|
+ validityPeriodStr = "待定";
|
|
|
+ }
|
|
|
+
|
|
|
+ // 构建通知消息
|
|
|
+ String orderNumber = order.getOrderNumber() != null ? order.getOrderNumber() : "";
|
|
|
+ String message = String.format("您的编号为%s的订单已于%s被律师接单,有效期至%s。请在有效期内与律师沟通。",
|
|
|
+ orderNumber, acceptTimeStr, validityPeriodStr);
|
|
|
+
|
|
|
+ // 创建并保存通知
|
|
|
+ LifeNotice lifeNotice = createOrderNotice(order.getId(), receiverId, "接单通知", message);
|
|
|
+ int noticeResult = lifeNoticeMapper.insert(lifeNotice);
|
|
|
+ if (noticeResult <= 0) {
|
|
|
+ log.warn("发送接单通知失败:保存通知失败,订单ID={}", order.getId());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 发送WebSocket消息
|
|
|
+ sendWebSocketMessage(receiverId, lifeNotice);
|
|
|
+
|
|
|
+ log.info("发送接单通知成功,接收人ID={}, 订单编号={}", receiverId, orderNumber);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("发送接单通知异常,订单ID={}, 异常信息={}", order.getId(), e.getMessage(), e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发送拒绝接单通知给客户端用户
|
|
|
+ *
|
|
|
+ * @param order 订单对象
|
|
|
+ */
|
|
|
+ private void sendRejectOrderNotice(LawyerConsultationOrder order) {
|
|
|
+ try {
|
|
|
+ Integer clientUserId = order.getClientUserId();
|
|
|
+ if (clientUserId == null) {
|
|
|
+ log.warn("发送拒绝接单通知失败:客户端用户ID为空,订单ID={}", order.getId());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取客户端用户接收ID
|
|
|
+ String receiverId = getClientReceiverId(clientUserId);
|
|
|
+ if (!StringUtils.hasText(receiverId)) {
|
|
|
+ log.warn("发送拒绝接单通知失败:获取客户端用户接收ID失败,订单ID={}, 用户ID={}",
|
|
|
+ order.getId(), clientUserId);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取拒绝原因
|
|
|
+ String rejectReason = order.getReasonOrderRefusal();
|
|
|
+ if (!StringUtils.hasText(rejectReason)) {
|
|
|
+ rejectReason = "无";
|
|
|
+ }
|
|
|
+
|
|
|
+ // 构建通知消息
|
|
|
+ String orderNumber = order.getOrderNumber() != null ? order.getOrderNumber() : "";
|
|
|
+ String message = String.format("您的编号为%s的订单已被拒绝,拒绝原因:%s。订单金额将在1-3个工作日原路返还,请注意查收。",
|
|
|
+ orderNumber, rejectReason);
|
|
|
+
|
|
|
+ // 创建并保存通知
|
|
|
+ LifeNotice lifeNotice = createOrderNotice(order.getId(), receiverId, "拒绝接单通知", message);
|
|
|
+ int noticeResult = lifeNoticeMapper.insert(lifeNotice);
|
|
|
+ if (noticeResult <= 0) {
|
|
|
+ log.warn("发送拒绝接单通知失败:保存通知失败,订单ID={}", order.getId());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 发送WebSocket消息
|
|
|
+ sendWebSocketMessage(receiverId, lifeNotice);
|
|
|
+
|
|
|
+ log.info("发送拒绝接单通知成功,接收人ID={}, 订单编号={}", receiverId, orderNumber);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("发送拒绝接单通知异常,订单ID={}, 异常信息={}", order.getId(), e.getMessage(), e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 创建订单通知对象
|
|
|
+ *
|
|
|
+ * @param businessId 业务ID(订单ID)
|
|
|
+ * @param receiverId 接收人ID
|
|
|
+ * @param title 通知标题
|
|
|
+ * @param message 通知消息
|
|
|
+ * @return 通知对象
|
|
|
+ */
|
|
|
+ private LifeNotice createOrderNotice(Integer businessId, String receiverId, String title, String message) {
|
|
|
+ LifeNotice lifeNotice = new LifeNotice();
|
|
|
+ lifeNotice.setSenderId(SYSTEM_SENDER_ID);
|
|
|
+ lifeNotice.setBusinessId(businessId);
|
|
|
+ lifeNotice.setReceiverId(receiverId);
|
|
|
+ lifeNotice.setTitle(title);
|
|
|
+ lifeNotice.setNoticeType(1);
|
|
|
+ lifeNotice.setIsRead(0);
|
|
|
+
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("message", message);
|
|
|
+ lifeNotice.setContext(jsonObject.toJSONString());
|
|
|
+
|
|
|
+ return lifeNotice;
|
|
|
+ }
|
|
|
}
|
|
|
|