20230922-ljl-fixBug
ljl 1 year ago
parent 38562f5076
commit a6535d8ca2

@ -390,7 +390,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
purchaseOrderCustom.setOperateIp("");
purchaseOrderCustom.setGmtCreate(new Date());
purchaseOrderCustom.setGmtModified(new Date());
if (purchaseOrderCustom.getPurchaseOrderCustomId() > 0) {
if (purchaseOrderCustom.getPurchaseOrderCustomId() != null && purchaseOrderCustom.getPurchaseOrderCustomId() > 0) {
purchaseOrderCustomService.updateByPrimaryKeySelective(purchaseOrderCustom);
} else {
purchaseOrderCustomService.insertSelective(purchaseOrderCustom);

@ -60,7 +60,7 @@ public class OpOrderDelayOutstorageBufferServiceImpl implements OpOrderDelayOuts
buffer.setGmtCreate(new Date());
}
buffer.setGmtModified(new Date());
if (buffer.getOpOrderDelayOutstorageBufferId() > 0) {
if (buffer.getOpOrderDelayOutstorageBufferId() != null && buffer.getOpOrderDelayOutstorageBufferId() > 0) {
opOrderDelayOutstorageBufferMapper.updateByPrimaryKeySelective(buffer);
} else {
opOrderDelayOutstorageBufferMapper.insertSelective(buffer);

@ -84,7 +84,7 @@ public class OpPackageOrderChildServiceImpl implements OpPackageOrderChildServic
child.setShippedNum(child.getShippedNum() + shippedNum);
}
child.setGmtModified(new Date());
if (child.getOpPackageOrderChildId() > 0) {
if (child.getOpPackageOrderChildId() != null && child.getOpPackageOrderChildId() > 0) {
updateByPrimaryKeySelective(child);
} else {
insertSelective(child);

@ -93,7 +93,7 @@ public class OpPackageOrderServiceImpl implements OpPackageOrderService{
packageOrder.setGmtCreate(new Date());
}
packageOrder.setGmtModified(new Date());
if (packageOrder.getOpPackageOrderId() > 0) {
if (packageOrder.getOpPackageOrderId() != null && packageOrder.getOpPackageOrderId() > 0) {
updateByPrimaryKeySelective(packageOrder);
} else {
insertSelective(packageOrder);

@ -141,7 +141,7 @@ public class OpPackageServiceImpl implements OpPackageService{
opPackage.setGmtShipped(new Date());
opPackage.setGmtModified(new Date());
if (opPackage.getOpPackageId() > 0) {
if (opPackage.getOpPackageId() != null && opPackage.getOpPackageId() > 0) {
updateByPrimaryKeySelective(opPackage);
} else {
insertSelective(opPackage);

@ -16,6 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.Map;
/**
* @author elf
*/
@ExtensionService("batchAddDsPurchaseConfirmLog")
@Slf4j
@AllArgsConstructor
@ -33,7 +36,7 @@ public class BatchAddDsPurchaseConfirmLogService extends SPIBaseService implemen
data.put("platformItemIdAndSourceItemInfoMap", platformOrderIdAndPurchaseConfirmLogIdMap);
return R.ok(Ret.success(data));
} catch (Exception e) {
log.error("batchAddDsPurchaseConfirmLog fail" + e.getMessage());
log.error("batchAddDsPurchaseConfirmLog error", e);
return R.ok(Ret.fail(e.getMessage()));
}
}

@ -14,6 +14,9 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author elf
*/
@ExtensionService("cancelPurchaseOrder")
@Slf4j
@AllArgsConstructor
@ -30,8 +33,7 @@ public class CancelPurchaseOrderService extends SPIBaseService implements Extens
distributionOrderService.cancelPurchaseOrder(shopId, requestDTO.getOrderId(), requestDTO.getSkuIds(), source, false);
return R.ok(Ret.success());
} catch (Exception e) {
e.printStackTrace();
log.error("cancelPurchaseOrder fail" + e.getMessage());
log.error("cancelPurchaseOrder error", e);
return R.ok(Ret.fail(e.getMessage()));
}
}

@ -13,6 +13,9 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author elf
*/
@ExtensionService("closePurchaseOrder")
@Slf4j
@AllArgsConstructor
@ -28,8 +31,7 @@ public class ClosePurchaseOrderService extends SPIBaseService implements Extensi
distributionOrderService.closeSourceOrderAndCancelRelatePurchaseOrder(shopId, requestDTO.getOrderId(), requestDTO.getPurchaseOrderSn());
return R.ok(Ret.success());
} catch (Exception e) {
e.printStackTrace();
log.error("closePurchaseOrder fail" + e.getMessage());
log.error("closePurchaseOrder error", e);
return R.ok(Ret.fail(e.getMessage()));
}
}

@ -16,6 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.Map;
/**
* @author elf
*/
@ExtensionService("getDsPurchaseOrderPayUrl")
@Slf4j
@AllArgsConstructor
@ -33,7 +36,8 @@ public class GetDsPurchaseOrderPayUrlService extends SPIBaseService implements E
data.put("payUrl", payUrl);
return R.ok(Ret.success(data));
} catch (Exception e) {
log.error("getDsPurchaseOrderPayUrl fail" + e.getMessage());
log.error("getDsPurchaseOrderPayUrl error", e);
return R.ok(Ret.fail(e.getMessage()));
}
}

@ -18,6 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.Map;
/**
* @author elf
*/
@ExtensionService("getSourceSkuInfos")
@Slf4j
@AllArgsConstructor
@ -43,7 +46,7 @@ public class GetSourceSkuInfosService extends SPIBaseService implements Extensio
data.put("sourceItemIdAndProductApiRetMap", response.getSourceItemIdAndProductApiRetMap());
return R.ok(Ret.success(data));
} catch (Exception e) {
log.error("getSourceSkuInfos fail" + e.getMessage());
log.error("getSourceSkuInfos error", e);
return R.ok(Ret.fail(e.getMessage()));
}
}

Loading…
Cancel
Save