增加软删除
This commit is contained in:
@@ -23,10 +23,13 @@ public interface BmsProductCountryMapper
|
||||
/** Import overlay: update price/zone/attrs on matched country row */
|
||||
public int updateBmsProductCountryImport(BmsProductCountry country);
|
||||
|
||||
/** Soft delete by product_id */
|
||||
public int deleteByProductId(Long productId);
|
||||
|
||||
/** Soft delete by product_code */
|
||||
public int deleteByProductCode(String productCode);
|
||||
|
||||
/** Soft delete by product_code + effective_date */
|
||||
public int deleteByProductCodeAndEffectiveDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("effectiveDate") Date effectiveDate);
|
||||
|
||||
@@ -31,6 +31,7 @@ public interface BmsProductMapper
|
||||
|
||||
public int updateBmsProduct(BmsProduct product);
|
||||
|
||||
/** Soft delete: set del_flag = 2 */
|
||||
public int deleteBmsProductByIds(Long[] productIds);
|
||||
|
||||
/** Close previous open versions: expire_date = newEffectiveDate */
|
||||
|
||||
+5
@@ -39,6 +39,11 @@ public interface BmsRedlineProductCountryMapper
|
||||
@Param("productCode") String productCode,
|
||||
@Param("newEffectiveDate") Date newEffectiveDate);
|
||||
|
||||
/** After deleting a pending version: reopen rows closed at that effective date */
|
||||
public int reopenExpiredByProductCodeAndExpireDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("expireDate") Date expireDate);
|
||||
|
||||
/**
|
||||
* Close open rows for one product + country where effective_date < newEffectiveDate.
|
||||
* Match by country_code when present, otherwise country_name.
|
||||
|
||||
@@ -39,6 +39,11 @@ public interface BmsRedlineProductMapper
|
||||
@Param("newEffectiveDate") Date newEffectiveDate,
|
||||
@Param("excludeId") Long excludeId);
|
||||
|
||||
/** After deleting a pending version: reopen rows closed at that effective date */
|
||||
public int reopenExpiredByProductCodeAndExpireDate(
|
||||
@Param("productCode") String productCode,
|
||||
@Param("expireDate") Date expireDate);
|
||||
|
||||
/** Recompute status from effective_date / expire_date vs today */
|
||||
public int refreshStatusByDates();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user