Refactor surcharge management by replacing PrcPriceSetVersionSurcharge with PrcSurchargeRel, introducing price type handling (PRODUCT, SALES, REDLINE) and updating related services, mappers, and front-end components. Enhance validation and error messaging for price type and detail ID requirements. Update database schema to support new relationships and constraints.
This commit is contained in:
-36
@@ -1,36 +0,0 @@
|
||||
package com.bms.price.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.bms.price.domain.PrcPriceSetVersionSurcharge;
|
||||
|
||||
/**
|
||||
* Price set version surcharge snapshot
|
||||
*/
|
||||
public interface PrcPriceSetVersionSurchargeMapper
|
||||
{
|
||||
public PrcPriceSetVersionSurcharge selectPrcPriceSetVersionSurchargeById(Long psvsId);
|
||||
|
||||
public List<PrcPriceSetVersionSurcharge> selectPrcPriceSetVersionSurchargeList(PrcPriceSetVersionSurcharge surcharge);
|
||||
|
||||
public int insertPrcPriceSetVersionSurcharge(PrcPriceSetVersionSurcharge surcharge);
|
||||
|
||||
public int updatePrcPriceSetVersionSurcharge(PrcPriceSetVersionSurcharge surcharge);
|
||||
|
||||
public int deletePrcPriceSetVersionSurchargeByIds(Long[] psvsIds);
|
||||
|
||||
public int deleteByPsvId(Long psvId);
|
||||
|
||||
public int deleteByPsdId(Long psdId);
|
||||
|
||||
public List<PrcPriceSetVersionSurcharge> selectByPsdIds(@Param("psdIds") List<Long> psdIds);
|
||||
|
||||
/** Snapshot all applicable product-rel surcharges for details under psvId (library create). */
|
||||
public int insertFromLibraryRels(@Param("psvId") Long psvId, @Param("createBy") String createBy);
|
||||
|
||||
/** Copy surcharge snapshots from src version onto new version details (match by detail keys). */
|
||||
public int copySurchargesFromVersion(
|
||||
@Param("srcPsvId") Long srcPsvId,
|
||||
@Param("newPsvId") Long newPsvId,
|
||||
@Param("createBy") String createBy);
|
||||
}
|
||||
@@ -5,24 +5,36 @@ import org.apache.ibatis.annotations.Param;
|
||||
import com.bms.price.domain.PrcSurchargeRel;
|
||||
|
||||
/**
|
||||
* 附加费与产品/明细关联 数据层
|
||||
* 附加费与产品/明细/套餐关联 数据层
|
||||
*
|
||||
* @author bms
|
||||
*/
|
||||
public interface PrcSurchargeRelMapper
|
||||
{
|
||||
/**
|
||||
* 查询关联列表(JOIN 附加费 + 明细),支持按 productCode / scId 过滤
|
||||
* 查询关联列表(JOIN 附加费 + 明细),支持按 productCode / scId / priceType / detailId 过滤
|
||||
*/
|
||||
public List<PrcSurchargeRel> selectPrcSurchargeRelList(PrcSurchargeRel rel);
|
||||
|
||||
public List<PrcSurchargeRel> selectByDetailIdsAndPriceType(
|
||||
@Param("detailIds") List<Long> detailIds,
|
||||
@Param("priceType") String priceType);
|
||||
|
||||
public int insertPrcSurchargeRel(PrcSurchargeRel rel);
|
||||
|
||||
public int deletePrcSurchargeRelByIds(Long[] relIds);
|
||||
|
||||
/** 删除产品时清理其关联 */
|
||||
/** 删除产品时清理 PRODUCT/REDLINE 关联 */
|
||||
public int deleteRelByProductCodes(String[] productCodes);
|
||||
|
||||
public int deleteByDetailIdsAndPriceType(
|
||||
@Param("detailIds") List<Long> detailIds,
|
||||
@Param("priceType") String priceType);
|
||||
|
||||
public int deleteByProductIdsAndPriceType(
|
||||
@Param("productIds") List<Long> productIds,
|
||||
@Param("priceType") String priceType);
|
||||
|
||||
/** 附加费版本化编辑后,把产品关联从旧记录重指向新记录 */
|
||||
public int rebindRelScId(@Param("oldScId") Long oldScId, @Param("newScId") Long newScId, @Param("operator") String operator);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user