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

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

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

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

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

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

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

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

@ -13,6 +13,9 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/**
* @author elf
*/
@ExtensionService("closePurchaseOrder") @ExtensionService("closePurchaseOrder")
@Slf4j @Slf4j
@AllArgsConstructor @AllArgsConstructor
@ -28,8 +31,7 @@ public class ClosePurchaseOrderService extends SPIBaseService implements Extensi
distributionOrderService.closeSourceOrderAndCancelRelatePurchaseOrder(shopId, requestDTO.getOrderId(), requestDTO.getPurchaseOrderSn()); distributionOrderService.closeSourceOrderAndCancelRelatePurchaseOrder(shopId, requestDTO.getOrderId(), requestDTO.getPurchaseOrderSn());
return R.ok(Ret.success()); return R.ok(Ret.success());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("closePurchaseOrder error", e);
log.error("closePurchaseOrder fail" + e.getMessage());
return R.ok(Ret.fail(e.getMessage())); 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.HashMap;
import java.util.Map; import java.util.Map;
/**
* @author elf
*/
@ExtensionService("getDsPurchaseOrderPayUrl") @ExtensionService("getDsPurchaseOrderPayUrl")
@Slf4j @Slf4j
@AllArgsConstructor @AllArgsConstructor
@ -33,7 +36,8 @@ public class GetDsPurchaseOrderPayUrlService extends SPIBaseService implements E
data.put("payUrl", payUrl); data.put("payUrl", payUrl);
return R.ok(Ret.success(data)); return R.ok(Ret.success(data));
} catch (Exception e) { } catch (Exception e) {
log.error("getDsPurchaseOrderPayUrl fail" + e.getMessage());
log.error("getDsPurchaseOrderPayUrl error", e);
return R.ok(Ret.fail(e.getMessage())); 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.HashMap;
import java.util.Map; import java.util.Map;
/**
* @author elf
*/
@ExtensionService("getSourceSkuInfos") @ExtensionService("getSourceSkuInfos")
@Slf4j @Slf4j
@AllArgsConstructor @AllArgsConstructor
@ -43,7 +46,7 @@ public class GetSourceSkuInfosService extends SPIBaseService implements Extensio
data.put("sourceItemIdAndProductApiRetMap", response.getSourceItemIdAndProductApiRetMap()); data.put("sourceItemIdAndProductApiRetMap", response.getSourceItemIdAndProductApiRetMap());
return R.ok(Ret.success(data)); return R.ok(Ret.success(data));
} catch (Exception e) { } catch (Exception e) {
log.error("getSourceSkuInfos fail" + e.getMessage()); log.error("getSourceSkuInfos error", e);
return R.ok(Ret.fail(e.getMessage())); return R.ok(Ret.fail(e.getMessage()));
} }
} }

Loading…
Cancel
Save