master:storeProductColorSize增加storeId字段;
parent
becb581b34
commit
7ac5794d37
|
|
@ -356,7 +356,7 @@ public class GtAndFhbBizController extends BaseController {
|
|||
final String otherSnPrefix = fhbMatchSkuList.get(i).getSupplierId()
|
||||
+ String.format("%05d", fhbMatchSkuList.get(i).getSupplierSkuId()) + Constants.SIZE_LIST.get(j);
|
||||
prodColorSizeList.add(new StoreProductColorSize().setSize(Constants.SIZE_LIST.get(j)).setStoreColorId(storeColor.getId())
|
||||
.setStoreProdId(storeProd.getId()).setPrice(minPrice).setOtherSnPrefix(otherSnPrefix).setNextSn(0)
|
||||
.setStoreProdId(storeProd.getId()).setPrice(minPrice).setOtherSnPrefix(otherSnPrefix).setNextSn(0).setStoreId(storeProd.getStoreId())
|
||||
.setStandard(gtStandardSizeList.contains(Constants.SIZE_LIST.get(j)) ? 1 : 0));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3526,6 +3526,7 @@ CREATE TABLE `store_product_color_size`
|
|||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '档口商品颜色尺码ID',
|
||||
`store_color_id` bigint UNSIGNED NOT NULL COMMENT '档口商品颜色ID',
|
||||
`store_prod_id` bigint UNSIGNED NOT NULL COMMENT '档口商品ID',
|
||||
`store_id` bigint UNSIGNED NOT NULL COMMENT '档口ID',
|
||||
`size` int UNSIGNED NOT NULL COMMENT '商品尺码',
|
||||
`price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '档口商品定价',
|
||||
`sn_prefix` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '档口商品颜色尺码的前缀',
|
||||
|
|
|
|||
|
|
@ -6,15 +6,13 @@ import com.ruoyi.common.core.domain.XktBaseEntity;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 档口商品颜色的尺码对象 store_product_color_size
|
||||
* 条码规则 5位档口ID + 8位 store_product_color_size.id + 8位 nextBarcode
|
||||
* eg: 100010000000100000001
|
||||
* eg: 100010000000100000001
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
|
|
@ -40,6 +38,10 @@ public class StoreProductColorSize extends XktBaseEntity {
|
|||
*/
|
||||
@Excel(name = "档口商品ID")
|
||||
private Long storeProdId;
|
||||
/**
|
||||
* 档口ID
|
||||
*/
|
||||
private Long storeId;
|
||||
/**
|
||||
* 商品尺码
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
// 不存在则新增
|
||||
dbProdColorSizeList.add(new StoreProductColorSize().setSize(updateColorSize.getSize()).setStoreProdId(storeProdId)
|
||||
.setStandard(updateColorSize.getStandard()).setStoreColorId(storeColorMap.get(updateColorSize.getColorName()))
|
||||
.setPrice(updateColorSize.getPrice()).setNextSn(0));
|
||||
.setPrice(updateColorSize.getPrice()).setNextSn(0).setStoreId(storeId));
|
||||
}
|
||||
});
|
||||
this.storeProdColorSizeMapper.insertOrUpdate(dbProdColorSizeList);
|
||||
|
|
@ -496,7 +496,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
this.storeProdColorMapper.insert(prodColorList);
|
||||
// 新增档口颜色尺码对应价格
|
||||
List<StoreProductColorSize> prodColorSizeList = createDTO.getSizeList().stream().map(x -> new StoreProductColorSize().setSize(x.getSize()).setStoreProdId(storeProdId)
|
||||
.setStandard(x.getStandard()).setStoreColorId(storeColorMap.get(x.getColorName())).setPrice(x.getPrice()).setNextSn(0))
|
||||
.setStandard(x.getStandard()).setStoreColorId(storeColorMap.get(x.getColorName())).setPrice(x.getPrice()).setNextSn(0).setStoreId(storeId))
|
||||
.collect(Collectors.toList());
|
||||
this.storeProdColorSizeMapper.insert(prodColorSizeList);
|
||||
// 设置档口商品价格尺码的barcode_prefix
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
spcs.del_flag = 0
|
||||
AND spcs.sn_prefix = #{snPrefix}
|
||||
AND sp.store_id = #{storeId}
|
||||
AND spcs.store_id = #{storeId}
|
||||
</select>
|
||||
|
||||
<select id="selectOtherSn" resultType="com.ruoyi.xkt.dto.storeProdColorSize.StoreSaleSnResDTO">
|
||||
|
|
@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
spcs.del_flag = 0
|
||||
AND spcs.other_sn_prefix = #{snPrefix}
|
||||
AND sp.store_id = #{storeId}
|
||||
AND spcs.store_id = #{storeId}
|
||||
</select>
|
||||
|
||||
<select id="selectStorageBuJuSnList">
|
||||
|
|
@ -82,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
JOIN store_product_color spc ON spcs.store_color_id = spc.store_color_id AND spcs.store_prod_id = spc.store_prod_id AND spc.del_flag = 0
|
||||
WHERE
|
||||
spcs.del_flag = 0
|
||||
AND sp.store_id = #{storeId}
|
||||
AND spcs.store_id = #{storeId}
|
||||
<if test="buJuPrefixSnList != null and buJuPrefixSnList.size() > 0">
|
||||
AND spcs.sn_prefix IN
|
||||
<foreach item="item" index="index" collection="buJuPrefixSnList" separator="," open="(" close=")" >
|
||||
|
|
@ -107,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
JOIN store_product_color spc ON spcs.store_color_id = spc.store_color_id AND spcs.store_prod_id = spc.store_prod_id AND spc.del_flag = 0
|
||||
WHERE
|
||||
spcs.del_flag = 0
|
||||
AND sp.store_id = #{storeId}
|
||||
AND spcs.store_id = #{storeId}
|
||||
<if test="otherPrefixSnList != null and otherPrefixSnList.size() > 0">
|
||||
AND spcs.other_sn_prefix IN
|
||||
<foreach item="item" index="index" collection="otherPrefixSnList" separator="," open="(" close=")" >
|
||||
|
|
@ -129,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
JOIN store_product_color spc ON spcs.store_color_id = spc.store_color_id AND spcs.store_prod_id = spc.store_prod_id AND spc.del_flag = 0
|
||||
WHERE
|
||||
spcs.del_flag = 0
|
||||
AND spcs.store_id = #{storeId}
|
||||
<if test="buJuPrefixSnList != null and buJuPrefixSnList.size() > 0">
|
||||
AND spcs.sn_prefix IN
|
||||
<foreach item="item" index="index" collection="buJuPrefixSnList" separator="," open="(" close=")" >
|
||||
|
|
@ -150,6 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
JOIN store_product_color spc ON spcs.store_color_id = spc.store_color_id AND spcs.store_prod_id = spc.store_prod_id AND spc.del_flag = 0
|
||||
WHERE
|
||||
spcs.del_flag = 0
|
||||
AND spcs.store_id = #{storeId}
|
||||
<if test="otherPrefixSnList != null and otherPrefixSnList.size() > 0">
|
||||
AND spcs.other_sn_prefix IN
|
||||
<foreach item="item" index="index" collection="otherPrefixSnList" separator="," open="(" close=")" >
|
||||
|
|
|
|||
Loading…
Reference in New Issue