|
@@ -14,6 +14,7 @@ import com.chelvc.cloud.vehicle.server.dao.OmsOrderSettingMapper;
|
|
|
import com.chelvc.cloud.vehicle.server.entity.*;
|
|
|
import com.chelvc.cloud.vehicle.server.service.*;
|
|
|
import com.chelvc.framework.base.context.SessionContextHolder;
|
|
|
+import com.chelvc.framework.base.exception.ResourceUnavailableException;
|
|
|
import com.chelvc.framework.common.model.Pagination;
|
|
|
import com.chelvc.framework.common.util.StringUtils;
|
|
|
import com.chelvc.framework.database.util.PagingUtils;
|
|
@@ -741,6 +742,32 @@ public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> i
|
|
|
return PagingUtils.convert(page, OrderCopier.INSTANCE::copying);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void orderVerification(Long orderId, Long merchantId) {
|
|
|
+ if(orderId == null){
|
|
|
+ throw new ResourceUnavailableException("订单不存在");
|
|
|
+ }
|
|
|
+ OmsOrder omsOrder = baseMapper.selectById(orderId);
|
|
|
+ if(omsOrder == null){
|
|
|
+ throw new ResourceUnavailableException("订单不存在");
|
|
|
+ }
|
|
|
+ if(omsOrder.getMerchantId() == null || !omsOrder.getMerchantId().equals(merchantId)){
|
|
|
+ throw new ResourceUnavailableException("该订单商品不属于此商家");
|
|
|
+ }
|
|
|
+ Integer status = omsOrder.getStatus();
|
|
|
+ if(status != 1){
|
|
|
+ throw new ResourceUnavailableException("该订单不可用");
|
|
|
+ }
|
|
|
+ omsOrder.setStatus(4);
|
|
|
+ omsOrder.setConfirmStatus(1);
|
|
|
+ omsOrder.setReceiveTime(new Date());
|
|
|
+ omsOrder.setUpdateTime(new Date());
|
|
|
+ int i = baseMapper.updateById(omsOrder);
|
|
|
+ if(i != 1){
|
|
|
+ throw new ResourceUnavailableException("处理失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public BigDecimal queryAmountByLastMonth(Long merchantId) {
|