|
|
@@ -38,6 +38,7 @@ import shop.alien.mapper.LawyerUserMapper;
|
|
|
import shop.alien.mapper.LifeNoticeMapper;
|
|
|
import shop.alien.mapper.LifeUserMapper;
|
|
|
import shop.alien.util.common.constant.LawyerStatusEnum;
|
|
|
+import shop.alien.util.common.constant.OrderActionType;
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
|
@@ -49,21 +50,6 @@ import java.util.stream.Collectors;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
- * 操作类型常量
|
|
|
- */
|
|
|
-class OrderActionType {
|
|
|
- /**
|
|
|
- * 接单
|
|
|
- */
|
|
|
- static final String ACCEPT = "1";
|
|
|
-
|
|
|
- /**
|
|
|
- * 取消
|
|
|
- */
|
|
|
- static final String CANCEL = "2";
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
* 咨询订单 服务实现类
|
|
|
*
|
|
|
* @author system
|
|
|
@@ -670,8 +656,8 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
|
|
|
|
|
|
// 操作类型格式校验
|
|
|
String trimmedActionType = actionType.trim();
|
|
|
- if (!OrderActionType.ACCEPT.equals(trimmedActionType)
|
|
|
- && !OrderActionType.CANCEL.equals(trimmedActionType)) {
|
|
|
+ OrderActionType actionTypeEnum = OrderActionType.getByCode(trimmedActionType);
|
|
|
+ if (actionTypeEnum == null) {
|
|
|
log.warn("律师确认订单失败:操作类型无效,actionType={}", actionType);
|
|
|
return R.fail("操作类型无效,1-接单,2-取消");
|
|
|
}
|
|
|
@@ -705,7 +691,7 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
|
|
|
}
|
|
|
|
|
|
// 根据操作类型处理
|
|
|
- if (OrderActionType.ACCEPT.equals(trimmedActionType)) {
|
|
|
+ if (actionTypeEnum == OrderActionType.ACCEPT) {
|
|
|
// 接单:更新订单状态为进行中
|
|
|
Integer inProgressStatus = LawyerStatusEnum.INPROGRESS.getStatus();
|
|
|
Date acceptTime = new Date();
|