Commit a1212b6f authored by 李灿灿's avatar 李灿灿

订单回复新增,判断订单是否已办结

parent 745fd89b
...@@ -42,6 +42,10 @@ public class OrderConstants { ...@@ -42,6 +42,10 @@ public class OrderConstants {
* 订单不存在 * 订单不存在
*/ */
public static final String ORDER_NO_NOT_EXIST = "订单不存在"; public static final String ORDER_NO_NOT_EXIST = "订单不存在";
/**
* 订单已办结,无法添加回复
*/
public static final String ORDER_STATUS_IS_TWO = "订单已办结,无法添加回复";
/** /**
* 订单已存在 * 订单已存在
*/ */
......
...@@ -234,6 +234,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -234,6 +234,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
); );
if (!Optional.ofNullable(one).isPresent()){ if (!Optional.ofNullable(one).isPresent()){
return R.failed(OrderConstants.ORDER_NO_NOT_EXIST); return R.failed(OrderConstants.ORDER_NO_NOT_EXIST);
}else {
if (CommonConstants.TWO_INT == one.getOrderStatus()){
return R.failed(OrderConstants.ORDER_STATUS_IS_TWO);
}
} }
if (Common.isEmpty(replyContent) && ArrayUtils.isEmpty(file)){ if (Common.isEmpty(replyContent) && ArrayUtils.isEmpty(file)){
return R.failed(OrderConstants.REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY); return R.failed(OrderConstants.REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY);
...@@ -448,6 +452,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -448,6 +452,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
); );
if (!Optional.ofNullable(one).isPresent()){ if (!Optional.ofNullable(one).isPresent()){
return R.failed(OrderConstants.ORDER_NO_NOT_EXIST); return R.failed(OrderConstants.ORDER_NO_NOT_EXIST);
}else {
if (CommonConstants.TWO_INT == one.getOrderStatus()){
return R.failed(OrderConstants.ORDER_STATUS_IS_TWO);
}
} }
if (Common.isEmpty(vo.getCreateName())){ if (Common.isEmpty(vo.getCreateName())){
return R.failed(OrderConstants.REPLY_NAME_IS_EMPTY); return R.failed(OrderConstants.REPLY_NAME_IS_EMPTY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment